Skip to content

Commit 179e47c

Browse files
authored
Merge pull request #11 from djmarques/main
Upload new test suite
2 parents db90c06 + 1cbae14 commit 179e47c

26 files changed

Lines changed: 5449 additions & 606 deletions

‎.github/workflows/tests.yml‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
# circStudio requires Python 3.12 (pyproject: requires-python = ">=3.12").
14+
PYTHON_VERSION: "3.12"
15+
# Keep every test headless; conftest.py also sets this, belt and braces.
16+
MPLBACKEND: Agg
17+
18+
jobs:
19+
unit:
20+
name: library tests
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 20
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v5
29+
with:
30+
enable-cache: true
31+
cache-dependency-glob: pyproject.toml
32+
33+
- name: Set up Python
34+
run: uv python install ${{ env.PYTHON_VERSION }}
35+
36+
- name: Create the environment
37+
run: |
38+
uv venv --python ${{ env.PYTHON_VERSION }}
39+
# Library runtime dependencies, pinned to the ranges in pyproject.
40+
uv pip install \
41+
'pandas>=2.3.3,<3' 'numpy>=2.4.1,<3' 'scipy>=1.17.0,<2' \
42+
'statsmodels>=0.14.6,<1' 'lmfit>=1.3.4,<2' 'plotly>=6.5.2,<7' \
43+
'seaborn>=0.13.2,<1' 'matplotlib>=3.10.8,<4' 'pyexcel>=0.7.4,<1' \
44+
pyexcel-ods pingouin
45+
# Test dependencies.
46+
uv pip install pytest pytest-mock
47+
48+
- name: Run the library tests
49+
run: uv run pytest tests -q --durations=10

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
*.pyc
22
.DS_Store
3+
__pycache__/
4+
.pytest_cache/
5+
.ipynb_checkpoints/

‎pyproject.toml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "uv_build"
44

55
[project]
66
name = "circStudio"
7-
version = "1.1.1"
7+
version = "1.1.2"
88
authors = [
99
{ name="Daniel Marques", email="daniel.marques@gimm.pt" },
1010
{ name="Nuno Morais", email="nuno.morais@nms.unl.pt" },
@@ -62,3 +62,17 @@ Issues = "https://github.com/djmarques/circStudio/issues"
6262

6363
[tool.uv.build-backend]
6464
source-include = ["src/circstudio/data/**"]
65+
66+
[tool.pyrefly]
67+
# The Shiny app in ``app/`` imports the ``modules`` package and adds ``app/``
68+
# and ``src/`` to ``sys.path`` at runtime. Pyrefly can't see that dynamic
69+
# manipulation, so declare both roots here to resolve ``modules.*`` and
70+
# ``circstudio`` during static analysis.
71+
search-path = ["src", "app"]
72+
73+
[tool.pytest.ini_options]
74+
testpaths = ["tests"]
75+
markers = [
76+
"slow: takes more than a few seconds",
77+
"needs_data: requires a bundled file in src/circstudio/data",
78+
]

‎tests/README.md‎

Lines changed: 153 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)