Skip to content

Commit 6c9d5d5

Browse files
committed
build: update Makefile README.md pyproject.toml requirements-dev.txt requirements.txt requirements/dev.in setup.cfg from main
1 parent 9a7a523 commit 6c9d5d5

File tree

7 files changed

+746
-692
lines changed

7 files changed

+746
-692
lines changed

Makefile

+18-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
pip-tools: ${VIRTUAL_ENV}/scripts/pip-sync
2-
3-
format:
4-
isort --atomic soil_id
5-
black soil_id
1+
ifeq ($(DC_ENV),ci)
2+
UV_FLAGS = "--system"
3+
endif
64

75
install:
8-
pip install -r requirements.txt
6+
uv pip install -r requirements.txt $(UV_FLAGS)
97

108
install-dev:
11-
pip install -r requirements-dev.txt
9+
uv pip install -r requirements-dev.txt $(UV_FLAGS)
10+
11+
setup-git-hooks:
12+
@pre-commit install
1213

1314
lint:
14-
flake8 soil_id && isort -c soil_id && black --check soil_id
15+
ruff check soil_id
16+
17+
format:
18+
ruff format soil_id
1519

16-
lock: pip-tools
17-
CUSTOM_COMPILE_COMMAND="make lock" pip-compile --upgrade --generate-hashes --strip-extras --resolver=backtracking --output-file requirements.txt requirements/base.in
20+
lock:
21+
CUSTOM_COMPILE_COMMAND="make lock" uv pip compile --upgrade --generate-hashes requirements/base.in -o requirements.txt
1822

19-
lock-dev: pip-tools
20-
CUSTOM_COMPILE_COMMAND="make lock-dev" pip-compile --upgrade --generate-hashes --strip-extras --resolver=backtracking --output-file requirements-dev.txt requirements/dev.in
23+
lock-dev:
24+
CUSTOM_COMPILE_COMMAND="make lock-dev" uv pip compile --upgrade --generate-hashes requirements/dev.in -o requirements-dev.txt
2125

2226
build:
2327
echo "Building TK..."
@@ -50,18 +54,12 @@ graphs:
5054
gprof2dot -f pstats prof/test_soil_location.prof | dot -Tsvg -o prof/test_soil_location.svg
5155
flameprof prof/test_soil_location.prof > prof/test_soil_location_flame.svg
5256

53-
generate_bulk_test_results_us:
57+
generate_bulk_test_results:
5458
python -m soil_id.tests.us.generate_bulk_test_results
5559

56-
process_bulk_test_results_us:
60+
process_bulk_test_results:
5761
python -m soil_id.tests.us.process_bulk_test_results $(RESULTS_FILE)
5862

59-
generate_bulk_test_results_global:
60-
python -m soil_id.tests.global.generate_bulk_test_results
61-
62-
process_bulk_test_results_global:
63-
python -m soil_id.tests.global.process_bulk_test_results $(RESULTS_FILE)
64-
6563
# Donwload Munsell CSV, SHX, SHP, SBX, SBN, PRJ, DBF
6664
download-soil-data:
6765
mkdir -p Data
@@ -73,6 +71,3 @@ download-soil-data:
7371
gdown 185Qjb9pJJn4AzOissiTz283tINrDqgI0; \
7472
gdown 1P3xl1YRlfcMjfO_4PM39tkrrlL3hoLzv; \
7573
gdown 1K0GkqxhZiVUND6yfFmaI7tYanLktekyp \
76-
77-
${VIRTUAL_ENV}/scripts/pip-sync:
78-
pip install pip-tools

README.md

+25-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Soil ID Algorithm
22

3+
## Requirements
4+
5+
- Python: 3.12 or better
6+
7+
# Contributing
8+
9+
Configure git to automatically lint your code and validate validate your commit messages:
10+
11+
```sh
12+
$ make setup-git-hooks
13+
```
14+
15+
Set up a virtual environment and install dependencies:
16+
17+
```sh
18+
$ uv venv
19+
$ source .venv/bin/activate
20+
$ make install && make install-dev
21+
```
22+
323
## explanation of algorithm
424

525
### terminology
@@ -63,8 +83,8 @@ There is a large suite of integration tests which takes many hours to run. It co
6383

6484
## Acknowledgements
6585

66-
* Beaudette, D., Roudier, P., Brown, A. (2023). [aqp: Algorithms for Quantitative Pedology](https://CRAN.R-project.org/package=aqp). R package version 2.0.
67-
68-
* Beaudette, D.E., Roudier, P., O'Geen, A.T. [Algorithms for quantitative pedology: A toolkit for soil scientists, Computers & Geosciences](http://dx.doi.org/10.1016/j.cageo.2012.10.020), Volume 52, March 2013, Pages 258-268, ISSN 0098-3004.
69-
70-
* soilDB: Beaudette, D., Skovlin, J., Roecker, S., Brown, A. (2024). [soilDB: Soil Database Interface](https://CRAN.R-project.org/package=soilDB). R package version 2.8.3.
86+
- Beaudette, D., Roudier, P., Brown, A. (2023). [aqp: Algorithms for Quantitative Pedology](https://CRAN.R-project.org/package=aqp). R package version 2.0.
87+
88+
- Beaudette, D.E., Roudier, P., O'Geen, A.T. [Algorithms for quantitative pedology: A toolkit for soil scientists, Computers & Geosciences](http://dx.doi.org/10.1016/j.cageo.2012.10.020), Volume 52, March 2013, Pages 258-268, ISSN 0098-3004.
89+
90+
- soilDB: Beaudette, D., Skovlin, J., Roecker, S., Brown, A. (2024). [soilDB: Soil Database Interface](https://CRAN.R-project.org/package=soilDB). R package version 2.8.3.

pyproject.toml

+7-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ authors = [
99
]
1010
dynamic = ["version", "description", "classifiers", "dependencies"]
1111

12-
[tool.black]
12+
[tool.ruff]
13+
exclude = ["migrations"]
1314
line-length = 100
1415

15-
[tool.isort]
16-
profile = "black"
17-
known_first_party = "soil_id"
16+
[tool.ruff.lint.isort]
17+
known-first-party = ["soil_id"]
18+
19+
[tool.ruff.lint]
20+
extend-ignore = ["E203"]
1821

1922
[tool.pytest.ini_options]
2023
log_cli = true

0 commit comments

Comments
 (0)