Skip to content

Commit d336a3b

Browse files
committed
clean up a bit
1 parent c9d17e9 commit d336a3b

6 files changed

Lines changed: 18 additions & 614 deletions

File tree

docs/contributing/developers_guide/dev_cellpy_folder_structure.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ The `cellpy` repository is structured as follows:
3535
├── 📄 requirements.txt
3636
├── 🐍 noxfile.py
3737
├── 🐍 setup.py
38-
└── 🐍 tasks.py <-- invoke tasks
3938
```
4039

4140
The `cellpy` source code is structured as follows:

environment_dev.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies:
1414
- fabric
1515
- graphviz
1616
- hdf5
17-
- invoke
1817
- ipykernel
1918
- ipython
2019
- ipywidgets

noxfile.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1+
"""Nox sessions for cellpy.
2+
3+
Installs the project and its extras/dev group from ``pyproject.toml``
4+
"""
5+
16
import nox
27

3-
from yaml import safe_load
4-
from pathlib import Path
8+
PYTHON_VERSIONS = ["3.13", "3.14"]
9+
510

6-
CONDA_ENV = "github_actions_environment.yml"
7-
PYTHON_VERSIONS = ["3.13","3.14"]
11+
def _install_project(session: nox.Session) -> None:
12+
"""Editable install with optional extras + ``[dependency-groups].dev``."""
13+
session.install("-e", ".[all]", "--group", "dev")
814

915

1016
@nox.session(python=PYTHON_VERSIONS)
11-
def tests(session):
12-
"""Run the test suite."""
13-
session.install("-r", "requirements_dev.txt")
14-
session.run("pytest")
17+
def tests(session: nox.Session) -> None:
18+
"""Run the test suite in a virtualenv."""
19+
_install_project(session)
20+
session.run("pytest", *session.posargs)
1521

1622

1723
@nox.session(python=PYTHON_VERSIONS, venv_backend="conda")
18-
def conda_tests(session):
19-
"""Run the test suite."""
20-
environment = safe_load(Path(CONDA_ENV).read_text())
21-
conda = environment.get("dependencies")
22-
requirements = conda.pop(-1).get("pip")
23-
24-
for package in conda:
25-
session.conda_install(package)
26-
for requirement in requirements:
27-
session.install(requirement)
28-
session.run("pytest")
24+
def conda_tests(session: nox.Session) -> None:
25+
"""Run the test suite in a conda-backed env (same pyproject deps)."""
26+
_install_project(session)
27+
session.run("pytest", *session.posargs)

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ dev = [
8787
"build",
8888
"coverage",
8989
"flake8",
90-
"invoke",
9190
"ipykernel",
9291
"nox",
9392
"lmfit",

0 commit comments

Comments
 (0)