File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,24 +14,30 @@ jobs:
1414 runs-on : ${{ matrix.os }}
1515 strategy :
1616 matrix :
17- python-version : ["3.10", "3. 11"] # , "3.12"]
17+ python-version : ["3.11"] # , "3.12"]
1818 os : [ubuntu-latest] # , macos-latest]
1919
2020 steps :
21- - uses : actions/checkout@v2
22-
21+ - uses : actions/checkout@v4
22+ - name : Install uv
23+ uses : astral-sh/setup-uv@v5
24+ with :
25+ uv-version : latest
2326 - name : Set up Python ${{ matrix.python-version }}
24- uses : actions/setup-python@v4.2.0
27+ uses : actions/setup-python@v5
2528 with :
2629 python-version : ${{ matrix.python-version }}
30+ - name : Install dependencies
31+ run : |
32+ make install-dev-deps PYTHON_VERSION=${{ matrix.python-version }}
33+ uv cache prune --ci
34+ source .venv/bin/activate
2735
28- - name : Install PyElastica
29- run : pip install . -v
30-
31- - name : Install elasticapp backend
32- run : pip install ./backend -v
33-
36+ - name : Install PyElastica + backend
37+ run : |
38+ uv pip install . -v
39+ uv pip install ./backend -v
3440 - name : Run elasticapp tests
3541 run : |
36- python -m pip install pytest
37- pytest backend/tests
42+ cd backend
43+ make test
Original file line number Diff line number Diff line change 4444 run : python -c "import sys; print(sys.version)"
4545 # Set up cache
4646 - name : Set up cache
47- uses : actions/cache@v4
47+ uses : actions/cache@v5
4848 with :
4949 path : ${{ matrix.path }}
5050 key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
Original file line number Diff line number Diff line change @@ -71,15 +71,15 @@ mypy:
7171
7272.PHONY : test
7373test :
74- uv run pytest -c pyproject.toml
74+ uv run pytest -c pyproject.toml tests
7575
7676.PHONY : test_coverage
7777test_coverage :
78- NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica -c pyproject.toml
78+ NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica -c pyproject.toml tests
7979
8080.PHONY : test_coverage_xml
8181test_coverage_xml :
82- NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica --cov-report=xml -c pyproject.toml
82+ NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica --cov-report=xml -c pyproject.toml tests
8383
8484.PHONY : check-codestyle
8585check-codestyle : black-check flake8 autoflake-check
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ warn_unused_ignores = false
139139
140140exclude = [
141141 " elastica/experimental/*" ,
142+ " backend/*"
142143]
143144
144145[tool .coverage .report ]
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ class BaseSimulatorClass(
168168
169169 return np .concatenate (recorded_list )
170170
171- @pytest .mark .parametrize ("final_time" , [0.2 , 1.0 ])
171+ @pytest .mark .parametrize ("final_time" , [0.002 , 0.01 ])
172172 def test_save_restart_run_sim (self , tmp_path , final_time ):
173173
174174 # First half of simulation
You can’t perform that action at this time.
0 commit comments