Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
python-version: "3.11"
- name: Install dependencies
run: |
pip install poetry
poetry install
pip install uv
uv sync
- name: Lint with ruff
run: poetry run ruff check
run: uv run ruff check
- name: Check formatting with ruff
run: poetry run ruff format --check
run: uv run ruff format --check
- name: Typecheck with mypy
run: poetry run mypy --strict src
run: uv run mypy --strict src
- name: Test with pytest
run: poetry run pytest tests
run: uv run pytest tests
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The `config` file is a file that is sourced in other bash scripts, and so must
follow bash syntax. It describes which sources to install where.

The install procedure is done through the following commands:
1. Create a python virtual environment (e.g. `python -m venv /path/to/venv`) and source it (`source /path/to/venv/bin/activate`)
2. Run `pip install .` in root folder. The cli tool `deploy` has been installed (`deploy --help` for information)
1. Install [uv](https://docs.astral.sh/uv/getting-started/installation/): the package manager that we use
2. Run `uv sync` in root folder. The cli tool `deploy` has been installed (`deploy --help` for information)
3. Run `deploy build` in order to start the build process.

# Development Using Docker
Expand Down
6 changes: 3 additions & 3 deletions deploy_tests/test_pflotran.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def test_version() -> None:
)

match = re.search(r" Pflotran (\d+\.\d+sv\d+)\+\n", proc.stdout.decode())
assert (
match
), f"Version not found in the following pflotran output: {proc.stdout.decode()}"
assert match, (
f"Version not found in the following pflotran output: {proc.stdout.decode()}"
)

# Get the version as set by `deploy test`
version = semver.Version.parse(os.environ["pflotran_version"])
Expand Down
75 changes: 49 additions & 26 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1735883199,
"lastModified": 1772143911,
"owner": "cachix",
"repo": "devenv",
"rev": "d67d04ae2dd3bc3723e615003034ba752e8db8c3",
"rev": "83c4b5682b84fe04c049970792f38d5879d3c0f1",
"type": "github"
},
"original": {
Expand All @@ -19,30 +19,51 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"owner": "edolstra",
"lastModified": 1767039857,
"owner": "NixOS",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1772024342,
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"lastModified": 1762808025,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
"type": "github"
},
"original": {
Expand All @@ -52,11 +73,14 @@
}
},
"nixpkgs": {
"inputs": {
"nixpkgs-src": "nixpkgs-src"
},
"locked": {
"lastModified": 1733477122,
"lastModified": 1770434727,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
"rev": "8430f16a39c27bdeef236f1eeb56f0b51b33d348",
"type": "github"
},
"original": {
Expand All @@ -66,32 +90,31 @@
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"nixpkgs-src": {
"flake": false,
"locked": {
"lastModified": 1735882644,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
"lastModified": 1769922788,
"narHash": "sha256-H3AfG4ObMDTkTJYkd8cz1/RbY9LatN5Mk4UF48VuSXc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "207d15f1a6603226e1e223dc79ac29c7846da32e",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
"pre-commit-hooks": [
"git-hooks"
]
}
}
},
Expand Down
18 changes: 5 additions & 13 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
{ pkgs, lib, config, inputs, ... }:
{
...
}:

{
languages.python = {
enable = true;
package = pkgs.python311;
poetry.enable = true;
poetry.install.enable = true;
uv.enable = true;
venv.enable = true;
};

# Build requirements
packages = with pkgs; [
autoconf
automake
libtool
gfortran
m4
];
}
Loading