Skip to content

Commit 82faf7a

Browse files
kshitij-mathsguglielmopadulandem0
authored
Review and modernization (#282)
* replaced setup.py by pyproject.toml * updated tutorials --------- Co-authored-by: guglielmopadula <[email protected]> Co-authored-by: Nicola Demo <[email protected]>
1 parent 3c11eb1 commit 82faf7a

28 files changed

+2224
-1064
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,43 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-latest]
11-
python-version: [3.8]
11+
python-version: ["3.10"]
1212

1313
steps:
14-
- uses: actions/checkout@v2
15-
16-
- name: Set up Python
17-
uses: actions/setup-python@v2
18-
with:
19-
python-version: ${{ matrix.python-version }}
20-
21-
- name: Install Python dependencies
22-
run: |
23-
python3 -m pip install --upgrade pip
24-
python3 -m pip install numpy scipy matplotlib pytest pytest-cov
25-
26-
- name: Test with pytest
27-
env:
28-
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
29-
run: |
30-
if [ -z "$CODACY_API_TOKEN" ]
31-
then
32-
python3 -m pytest
33-
else
34-
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pygem
35-
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
36-
chmod +x CodacyCoverageReporter.sh
37-
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN
38-
fi
14+
- uses: actions/checkout@v4
3915

16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Setup Conda
22+
uses: s-weigand/setup-conda@v1
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
update-conda: true
26+
conda-channels: conda-forge, anaconda
27+
28+
- name: Install pythonocc-core (Conda)
29+
run: conda install --yes -c conda-forge -c anaconda pythonocc-core
30+
shell: bash
31+
32+
- name: Install pip dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install numpy scipy matplotlib pytest pytest-cov
36+
python -m pip install smithers[vtk]
37+
python -m pip install .[test]
38+
39+
- name: Run tests with pytest
40+
env:
41+
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
42+
run: |
43+
if [ -z "$CODACY_API_TOKEN" ]; then
44+
python -m pytest
45+
else
46+
python -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pygem
47+
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
48+
chmod +x CodacyCoverageReporter.sh
49+
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN
50+
fi

.github/workflows/testing_pr.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,34 @@ on:
55
branches:
66
- "master"
77

8-
98
jobs:
109
build:
1110
runs-on: ${{ matrix.os }}
1211
strategy:
1312
fail-fast: false
1413
matrix:
1514
os: [windows-latest, macos-latest, ubuntu-latest]
16-
python-version: [3.7, 3.8]
17-
15+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1816
steps:
1917
- uses: actions/checkout@v2
2018

21-
22-
- name: Set up Python
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
27-
- name: Setup conda
28-
uses: s-weigand/setup-conda@v1
19+
20+
- name: Installing conda
21+
uses: conda-incubator/setup-miniconda@v3
22+
2923
with:
30-
update-conda: true
24+
auto-update-conda: true
3125
python-version: ${{ matrix.python-version }}
32-
conda-channels: anaconda, conda-forge
33-
34-
- name: Install Python dependencies
26+
channels: conda-forge
27+
28+
- name: Installing packages
29+
shell: bash -el {0}
3530
run: |
36-
conda install --yes pythonocc-core=7.4.0
37-
python3 -m pip install --upgrade pip
38-
python3 -m pip install smithers[vtk]
39-
python3 -m pip install .[test]
40-
31+
conda install --yes -c conda-forge pythonocc-core=7.4.0
32+
python -m pip install --upgrade pip
33+
python -m pip install .[test]
34+
4135
- name: Test with pytest
36+
shell: bash -el {0}
4237
run: |
43-
python3 -m pytest
38+
python -m pytest

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77
build/
88
dist/
99
pygem.egg-info/
10+
11+
12+
# virtual environments
13+
venv_pygem/
14+
venv_pygem
15+

0 commit comments

Comments
 (0)