Skip to content

Commit d9b6d18

Browse files
authored
Merge pull request #21 from DEMENT-Model/iss12-env-dependency
Iss12 env dependency
2 parents bfa674e + ba4884d commit d9b6d18

File tree

3 files changed

+41
-5
lines changed

3 files changed

+41
-5
lines changed

.pre-commit-config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
# Ruff version.
4+
rev: v0.11.4
5+
hooks:
6+
# Run the linter.
7+
- id: ruff
8+
types_or: [ python, pyi ]
9+
args: [ --fix ]
10+
# Run the formatter.
11+
- id: ruff-format
12+

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,20 @@ git clone https://github.com/bioatmosphere/DEMENTpy
5757

5858
**Run DEMENTpy**:
5959

60-
- Configure Environment
61-
- - Python >= 3.7
62-
- - Numpy >= 1.16.4
63-
- - Pandas >= 0.24.2
60+
[UV](https://github.com/astral-sh/uv) can be used to manage dependencies in `pyproject.toml`. In order to create a virtual ennviroment with DEMENTpy dependencies, do the following:
6461

65-
A simple example of bash script, dementpy.sh, for running jobs on HPC is provided.
62+
```
63+
uv venv
64+
uv sync --dev
65+
source .venv/bin/activate
66+
```
67+
if you are not running as developer then leave off the `--dev` switch.
68+
69+
A simple example of bash script, dementpy.sh, for running jobs on HPC is provided. For testing, a simple run can be carried out as follows:
70+
71+
```
72+
python dementpy.py grassland output 20250402 scrubland
73+
```
6674

6775
### Contribution
6876

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[project]
2+
name = "dementpy"
3+
version = "0.1.0"
4+
description = "DEMENT (Decomposition Model of Enzymatic Traits): A trait- and individual-based spatially explicit soil microbial systems modelling framework"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
dependencies = [
8+
"pandas>=2.2.3",
9+
"scipy>=1.15.2",
10+
]
11+
12+
[dependency-groups]
13+
dev = [
14+
"pre-commit>=4.2.0",
15+
"ruff>=0.11.4",
16+
]

0 commit comments

Comments
 (0)