Skip to content

Commit 54ba891

Browse files
committed
chore: format codebase, run format in CI, remove unused code
1 parent f2ac010 commit 54ba891

16 files changed

+94
-906
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,24 +13,12 @@
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

@@ -39,7 +27,7 @@
3927
MUNSELL_RGB_LAB_PATH = f"{DATA_PATH}/LandPKS_munsell_rgb_lab.csv"
4028

4129
# Database
42-
DB_NAME = os.environ.get("DB_NAME", "terraso_backend")
30+
DB_NAME = os.environ.get("DB_NAME", "soil_id")
4331
DB_HOST = os.environ.get("DB_HOST")
4432
DB_USERNAME = os.environ.get("DB_USERNAME")
4533
DB_PASSWORD = os.environ.get("DB_PASSWORD")

0 commit comments

Comments
 (0)