Skip to content

Commit d5e711e

Browse files
committed
feat: remove unused code, format, run format in CI
1 parent f685b95 commit d5e711e

15 files changed

+98
-514
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ prof/
2929
Data/
3030
bulk_test_result*
3131

32-
get-pip.py*
32+
get-pip.py*

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ setup-git-hooks:
1313

1414
lint:
1515
ruff check soil_id
16+
ruff format soil_id --diff
1617

1718
format:
1819
ruff format soil_id

soil_id/config.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,20 @@
1313
# You should have received a copy of the GNU Affero General Public License
1414
# along with this program. If not, see https://www.gnu.org/licenses/.
1515
import os
16-
import tempfile
17-
18-
from platformdirs import user_cache_dir
1916

2017
DATA_PATH = os.environ.get("DATA_PATH", "Data")
2118

2219
# Numpy seeding
2320
RANDOM_SEED = os.environ.get("RANDOM_SEED", 19)
2421

25-
# Output
26-
APP_NAME = os.environ.get("APP_NAME", "org.terraso.soilid")
27-
TEMP_DIR = tempfile.TemporaryDirectory()
28-
CACHE_DIR = user_cache_dir(APP_NAME)
29-
OUTPUT_PATH = TEMP_DIR.name
30-
SOIL_ID_RANK_PATH = f"{OUTPUT_PATH}/soil_id_rank.csv"
31-
SOIL_ID_PROB_PATH = f"{OUTPUT_PATH}/soil_id_cond_prob.csv"
32-
REQUESTS_CACHE_PATH = f"{CACHE_DIR}/requests_cache"
33-
3422
# Determines if in/out of US
3523
US_AREA_PATH = f"{DATA_PATH}/SoilID_US_Areas.shz"
3624

3725
# US Soil ID
3826
STATSGO_PATH = f"{DATA_PATH}/gsmsoilmu_a_us.shp"
3927

4028
# Database
41-
DB_NAME = os.environ.get("DB_NAME", "terraso_backend")
29+
DB_NAME = os.environ.get("DB_NAME", "soil_id")
4230
DB_HOST = os.environ.get("DB_HOST")
4331
DB_USERNAME = os.environ.get("DB_USERNAME")
4432
DB_PASSWORD = os.environ.get("DB_PASSWORD")

0 commit comments

Comments
 (0)