Skip to content

Commit 7677942

Browse files
committed
Merge branch 'main' into parallel-processing
2 parents d9cff99 + 12db98b commit 7677942

867 files changed

Lines changed: 43877 additions & 23887 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/build-py/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
steps:
1010
- name: Install dependencies
1111
shell: bash
12-
run: yum install ninja-build -qy
12+
run: yum install ninja-build cmake git -qy
1313
- name: Make artifact dir
1414
shell: bash
1515
run: |
@@ -19,8 +19,12 @@ runs:
1919
shell: bash
2020
run: |
2121
cd pycode/memilio-${{ inputs.package }}/
22-
/opt/python/cp38-cp38/bin/python setup.py bdist_wheel
23-
/opt/python/cp311-cp311/bin/python setup.py bdist_wheel
22+
/opt/python/cp38-cp38/bin/python -m pip install --upgrade pip setuptools wheel
23+
/opt/python/cp38-cp38/bin/python -m pip install scikit-build scikit-build-core
24+
/opt/python/cp38-cp38/bin/python -m build --no-isolation --wheel
25+
/opt/python/cp312-cp312/bin/python -m pip install --upgrade pip setuptools wheel
26+
/opt/python/cp312-cp312/bin/python -m pip install scikit-build scikit-build-core
27+
/opt/python/cp312-cp312/bin/python -m build --no-isolation --wheel
2428
# Exclude memilio-generation, because its a pure python package, cmake is only used in the build process to retrieve data from cpp
2529
if [[ -f "CMakeLists.txt" ]] && [ "${{ inputs.package }}" != "generation" ]; then
2630
# includes native dependencies in the wheel
@@ -35,4 +39,3 @@ runs:
3539
with:
3640
name: python-wheels-${{ inputs.package }}
3741
path: pycode/wheelhouse
38-
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "SBML Compile and Run Test"
2+
description: "Compile the SBML integrator, run it on a test example and compile the result."
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Install Dependencies
7+
shell: bash
8+
run: |
9+
sudo apt-get -qq update
10+
sudo apt-get -qq -y install gcc-13 g++-13 libbz2-dev libbz2-1.0 libsbml5t64 libsbml5-dev ccache libhdf5-dev
11+
sudo apt-get -qq update
12+
- name: ccache
13+
id: ccache
14+
uses: hendrikmuhs/[email protected]
15+
with:
16+
# free total space for cache available on github is limited to 10GB, so only save on main branch;
17+
# other branches will try to use cache from main, but branches that are too old won't benefit;
18+
save: false
19+
# set enough space per build cache to keep a few previous versions to be used by older branches
20+
# debug builds require more space
21+
max-size: 200M
22+
# saves cache as `ccache-<key>-<timestamp>` (timestamp added automatically, key must be unique, github caches are never overwritten)
23+
# key should be a composite of all options that affect the compilation
24+
key: linux-gcc-latest-Release-covOFF-depON-ompOFF-sanOFF
25+
# load most recent cache where a prefix of the key matches a restore-key, e.g. from the most recent nightly run of the same build
26+
restore-keys: linux-gcc-latest-Release-covOFF-depON-ompOFF-sanOFF
27+
- name: Download built test directory
28+
uses: actions/download-artifact@v4
29+
with:
30+
name: build-cpp-linux-gcc-latest-Release
31+
path: cpp
32+
- name: extract build archive
33+
shell: bash
34+
run: |
35+
cd cpp
36+
tar -xzf build.tar.gz
37+
- name: Build SBML converter
38+
shell: bash
39+
run: |
40+
cd cpp/build
41+
cmake -DCMAKE_BUILD_TYPE=Release -Dsbml_DIR=/usr/lib/x86_64-linux-gnu/cmake ..
42+
cmake --build . -j 4
43+
- name: Run SBML importer
44+
shell: bash
45+
run: |
46+
cd cpp
47+
./build/bin/sbml_to_memilio tests/data/sbml_test.sbml
48+
- name: Compile result
49+
shell: bash
50+
run: |
51+
cd cpp/build
52+
cmake -DCMAKE_BUILD_TYPE=Release -Dsbml_DIR=/usr/lib/x86_64-linux-gnu/cmake ..
53+
cmake --build . -j 4

.github/actions/test-py/action.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
else
2525
sudo apt-get -qq -y install python3-pip gnupg
2626
fi
27-
python -m pip install --upgrade pip
27+
python -m pip install --upgrade pip setuptools
2828
- name: Download Python Wheels
2929
uses: actions/download-artifact@v4
3030
with:
@@ -50,19 +50,20 @@ runs:
5050
shell: bash
5151
run: |
5252
export PYTHON_VERSION_NO_DOT=$(echo "${{ inputs.version }}" | sed 's/\.//g')
53-
for pkg in `ls pycode/wheelhouse/*cp$PYTHON_VERSION_NO_DOT*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
54-
for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
55-
pip install -r pycode/memilio-${{ inputs.package }}/requirements-dev.txt
53+
shopt -s nullglob
54+
for pkg in pycode/wheelhouse/*cp$PYTHON_VERSION_NO_DOT*.whl; do python -m pip install "$pkg"; done # packages that contain native extensions are version specific
55+
for pkg in pycode/wheelhouse/*py3*.whl; do python -m pip install "$pkg"; done # pure python packages are not version specific
56+
python -m pip install --upgrade-strategy only-if-needed --prefer-binary --find-links pycode/wheelhouse "memilio-${{ inputs.package }}[dev]"
5657
- name: Run unit tests
5758
shell: bash
5859
run: |
59-
cd pycode/memilio-${{inputs.package}}/memilio/${{inputs.package}}_test
60+
cd pycode/memilio-${{inputs.package}}/tests
6061
if [[ "${{ inputs.coverage }}" == "ON" ]]; then
6162
python -W ignore::DeprecationWarning -m coverage run --include=**/site-packages/memilio/* -m unittest
6263
python -m coverage report
6364
python -m coverage xml -o coverage_python.xml
6465
python -m coverage html -d coverage_python
65-
cp -r coverage_python ../../../../
66+
cp -r coverage_python ../../../
6667
else
6768
python -m unittest
6869
fi

.github/actions/test-pylint/action.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,29 @@ runs:
1313
sudo apt-get -qq update
1414
sudo apt-get -qq -y install python3-pip gnupg
1515
python -m pip install --upgrade pip
16+
# Pylint runs against the prebuilt wheels in pycode/wheelhouse/*cp312*.
17+
# So, use current latest supported Python version.
18+
- name: Set up Python 3.12
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
1622
- name: Download Python Wheels
1723
uses: actions/download-artifact@v4
1824
with:
1925
name: python-wheels-${{ inputs.package }}
26+
path: pycode/wheelhouse
2027
- name: Install Python Wheels
2128
shell: bash
2229
run: |
23-
for pkg in `ls pycode/wheelhouse/*cp311*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
24-
for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
25-
pip install -r pycode/memilio-${{ inputs.package }}/requirements-dev.txt
30+
shopt -s nullglob
31+
for pkg in pycode/wheelhouse/*cp312*.whl; do python -m pip install "$pkg"; done # packages that contain native extensions are version specific
32+
for pkg in pycode/wheelhouse/*py3*.whl; do python -m pip install "$pkg"; done # pure python packages are not version specific
33+
python -m pip install --upgrade-strategy only-if-needed --prefer-binary --find-links pycode/wheelhouse "memilio-${{ inputs.package }}[dev]"
2634
- name: Run pylint
2735
shell: bash
2836
run: |
29-
cd pycode/memilio-${{ inputs.package }}
30-
mkdir -p build_pylint
31-
python setup.py pylint
32-
pylint-json2html -f jsonextended -o build_pylint/pylint.html < build_pylint/pylint_extended.json
37+
python pycode/run_pylint.py --package-dir memilio-${{ inputs.package }}
38+
pylint-json2html -f jsonextended -o pycode/memilio-${{ inputs.package }}/build_pylint/pylint.html < pycode/memilio-${{ inputs.package }}/build_pylint/pylint_extended.json
3339
- name: Upload Pylint Report
3440
uses: actions/upload-artifact@v4
3541
with:

.github/actions/windows-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343
mkdir build-win
4444
cd build-win
4545
if min==${{ inputs.version }} (
46-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
46+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
4747
) else (
4848
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
4949
)

.github/pull_request_template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Please check our [git workflow](https://memilio.readthedocs.io/en/latest/develop
2222
- [ ] New code adheres to [coding guidelines](https://memilio.readthedocs.io/en/latest/development.html#coding-guidelines)
2323
- [ ] No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
2424
- [ ] Tests are added for new functionality and a local test run was successful (with and without OpenMP)
25-
- [ ] Appropriate **documentation** for new functionality has been added (Doxygen in the code and Markdown files if necessary)
25+
- [ ] Appropriate **documentation within the code** (Doxygen) for new functionality has been added in the code
26+
- [ ] Appropriate **external documentation** (ReadTheDocs) for new functionality has been added to the online documentation
2627
- [ ] Proper attention to licenses, especially no new third-party software with conflicting license has been added
2728
- [ ] (For ABM development) Checked [benchmark results](https://memilio.readthedocs.io/en/latest/development.html#agent-based-model-development) and ran and posted a local test above from before and after development to ensure performance is monitored.
2829

.github/workflows/epidata_main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626
- uses: actions/setup-python@v5
2727
with:
28-
python-version: 3.11
28+
python-version: 3.12
2929
- uses: pre-commit/[email protected]
3030

3131
build-py-epidata:
@@ -51,7 +51,7 @@ jobs:
5151
needs: build-py-epidata
5252
strategy:
5353
matrix:
54-
version: ["3.8", "3.11"]
54+
version: ["3.8", "3.12"]
5555
runs-on: ubuntu-latest
5656
steps:
5757
- uses: actions/checkout@v4
@@ -66,7 +66,7 @@ jobs:
6666
needs: [build-py-plot, build-py-epidata]
6767
strategy:
6868
matrix:
69-
version: ["3.8", "3.11"]
69+
version: ["3.8", "3.12"]
7070
runs-on: ubuntu-latest
7171
steps:
7272
- uses: actions/checkout@v4
@@ -123,13 +123,13 @@ jobs:
123123
with:
124124
name: python-wheels-epidata
125125
path: pycode/wheelhouse
126-
- name: Set up Python 3.11
126+
- name: Set up Python 3.12
127127
uses: actions/setup-python@v5
128128
with:
129-
python-version: 3.11
129+
python-version: 3.12
130130
- name: Install Python Wheels
131131
run: |
132-
for pkg in `ls pycode/wheelhouse/*cp311*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
132+
for pkg in `ls pycode/wheelhouse/*cp312*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
133133
for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
134134
- name: Download Data
135135
run: |

.github/workflows/main.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ on:
1717
- "**/memilio-epidata/**"
1818
workflow_dispatch:
1919

20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }}
22+
cancel-in-progress: true
23+
2024
jobs:
2125
pre-commit:
2226
runs-on: ubuntu-latest
2327
steps:
2428
- uses: actions/checkout@v4
2529
- uses: actions/setup-python@v5
2630
with:
27-
python-version: 3.11
31+
python-version: 3.12
2832
- uses: pre-commit/[email protected]
2933

3034
build-cpp-gcc_clang:
@@ -82,9 +86,9 @@ jobs:
8286
version: ["latest", "min"]
8387
include:
8488
- version: "latest"
85-
os: "windows-2022"
89+
os: "windows-2025"
8690
- version: "min"
87-
os: "windows-2019"
91+
os: "windows-2022"
8892
runs-on: ${{ matrix.os }}
8993
steps:
9094
- uses: actions/checkout@v4
@@ -95,7 +99,7 @@ jobs:
9599

96100
build-cpp-msvc-no-optional-deps:
97101
if: github.event.pull_request.draft == false
98-
runs-on: windows-2022
102+
runs-on: windows-2025
99103
steps:
100104
- uses: actions/checkout@v4
101105
- uses: ./.github/actions/windows-build
@@ -125,6 +129,14 @@ jobs:
125129
artifact-pattern: ${{ matrix.compiler }}-${{ matrix.version }}-${{ matrix.config }}
126130
coverage: ${{ (matrix.compiler == 'gcc' && matrix.version == 'latest' && matrix.config == 'Debug') && 'ON' || 'OFF' }}
127131

132+
test-cpp-gcc-sbml:
133+
if: github.event.pull_request.draft == false
134+
needs: build-cpp-gcc_clang
135+
runs-on: ubuntu-latest
136+
steps:
137+
- uses: actions/checkout@v4
138+
- uses: ./.github/actions/sbml-test
139+
128140
merge-test-artifacts:
129141
needs: [test-cpp-gcc_clang, test-cpp-msvc, test-py-surrogatemodel]
130142
runs-on: ubuntu-latest
@@ -185,9 +197,9 @@ jobs:
185197
version: ["latest", "min"]
186198
include:
187199
- version: "latest"
188-
os: "windows-2022"
200+
os: "windows-2025"
189201
- version: "min"
190-
os: "windows-2019"
202+
os: "windows-2022"
191203
runs-on: ${{ matrix.os }}
192204
steps:
193205
- uses: actions/checkout@v4
@@ -198,7 +210,7 @@ jobs:
198210
test-cpp-msvc-no-optional-deps:
199211
if: github.event.pull_request.draft == false
200212
needs: build-cpp-msvc-no-optional-deps
201-
runs-on: windows-latest
213+
runs-on: windows-2025
202214
steps:
203215
- uses: actions/checkout@v4
204216
- uses: ./.github/actions/windows-test
@@ -235,9 +247,9 @@ jobs:
235247
version: ["latest", "min"]
236248
include:
237249
- version: "latest"
238-
os: "windows-2022"
250+
os: "windows-2025"
239251
- version: "min"
240-
os: "windows-2019"
252+
os: "windows-2022"
241253
runs-on: ${{ matrix.os }}
242254
steps:
243255
- uses: actions/checkout@v4
@@ -279,7 +291,7 @@ jobs:
279291
if: github.event.pull_request.draft == false
280292
strategy:
281293
matrix:
282-
version: ["3.8", "3.11"]
294+
version: ["3.8", "3.12"]
283295
needs: build-py-generation
284296
runs-on: ubuntu-latest
285297
steps:
@@ -293,7 +305,7 @@ jobs:
293305
needs: build-py-simulation
294306
strategy:
295307
matrix:
296-
version: ["3.8", "3.11"]
308+
version: ["3.8", "3.12"]
297309
runs-on: ubuntu-latest
298310
steps:
299311
- uses: actions/checkout@v4
@@ -306,7 +318,7 @@ jobs:
306318
needs: [build-py-surrogatemodel, build-py-simulation]
307319
strategy:
308320
matrix:
309-
version: ["3.8", "3.11"]
321+
version: ["3.8", "3.12"]
310322
runs-on: ubuntu-latest
311323
steps:
312324
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)