Skip to content

Commit 82e6ee5

Browse files
authored
Merge pull request PyDMD#536 from PyDMD/pyproject-toml
Migrate `setup.py` to `pyproject.toml`, and CalVer
2 parents 8e5417d + 0a17c39 commit 82e6ee5

File tree

16 files changed

+189
-319
lines changed

16 files changed

+189
-319
lines changed

.github/workflows/deploy_after_push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up Python
18-
uses: actions/setup-python@v4.5.0
18+
uses: actions/setup-python@v5.1.1
1919
- name: Set Dynamic Matrix
2020
id: setmatrix
2121
run: |
@@ -43,13 +43,13 @@ jobs:
4343
matrix: ${{ fromJson(needs.prepare_matrix.outputs.matrix) }}
4444

4545
steps:
46-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4.1.7
4747
- name: Set up Python
48-
uses: actions/setup-python@v4.5.0
48+
uses: actions/setup-python@v5.1.1
4949
with:
5050
python-version: ${{ matrix.python-version }}
5151
cache: 'pip'
52-
cache-dependency-path: setup.py
52+
cache-dependency-path: pyproject.toml
5353
- name: Install Python dependencies
5454
run: |
5555
pip install --upgrade pip

.github/workflows/deploy_after_tag.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up Python
18-
uses: actions/setup-python@v4.5.0
18+
uses: actions/setup-python@v5.1.1
1919
- name: Set Dynamic Matrix
2020
id: setmatrix
2121
run: |
@@ -55,9 +55,9 @@ jobs:
5555
strategy:
5656
matrix: ${{ fromJson(needs.prepare_matrix.outputs.matrix) }}
5757
steps:
58-
- uses: actions/checkout@v3
58+
- uses: actions/checkout@v4.1.7
5959
- name: Set up Python
60-
uses: actions/setup-python@v4.5.0
60+
uses: actions/setup-python@v5.1.1
6161
with:
6262
python-version: ${{ matrix.python-version }}
6363
- name: Install build

.github/workflows/export_tutorials.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
env:
1515
TUTORIAL_TIMEOUT: 1200s
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4.1.7
1818

1919
- name: Set up Python
20-
uses: actions/setup-python@v4.5.0
20+
uses: actions/setup-python@v5.1.1
2121
with:
2222
python-version: 3.8
2323

.github/workflows/monthly-tag.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
python-version: ["3.7", "3.8", "3.9", "3.10"]
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4.1.7
1818

1919
- name: Set up Python
20-
uses: actions/setup-python@v4.5.0
20+
uses: actions/setup-python@v5.1.1
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323

@@ -40,12 +40,9 @@ jobs:
4040

4141
- name: Create and push the tag
4242
run: |
43-
python utils/mathlab_versioning.py set --only-date "dev$(date +%y%m)"
44-
cat pydmd/meta.py
45-
VERS=$(python utils/mathlab_versioning.py get)
43+
# CalVer, e.g. 2024.07.19
44+
VERS=$(date +%Y.%m.%d)
4645
git config --global user.name 'Monthly Tag bot'
4746
git config --global user.email '[email protected]'
48-
git add pydmd/meta.py
49-
git commit -m "monthly version $VERS"
50-
git tag -a "v$VERS" -m "Monthly version $VERS"
51-
git push origin "v$VERS"
47+
git tag "$VERS" -a -m "Monthly version $VERS"
48+
git push origin "$VERS"

.github/workflows/testing_pr.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
matrix_tutorial_test: ${{ steps.setmatrix.outputs.matrix2 }}
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4.1.7
1717

1818
- name: Set up Python
19-
uses: actions/setup-python@v4.5.0
19+
uses: actions/setup-python@v5.1.1
2020

2121
- name: Set Dynamic Matrix
2222
id: setmatrix
@@ -43,14 +43,14 @@ jobs:
4343
black: ######################################################################################
4444
runs-on: ubuntu-latest
4545
steps:
46-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4.1.7
4747
- name: Install black
4848
run: |
49-
pip install black[jupyter]==24.2.0
49+
pip install black[jupyter]==24.4.2
5050
5151
- name: Run black formatter on PyDMD source code
5252
run: |
53-
black --check --diff --color pydmd/ utils/ tests/ setup.py
53+
black --check --diff --color pydmd/ utils/ tests/
5454
if [[ $? -ne "0" ]]; then
5555
echo "Source code needs re-formatting"
5656
exit 1
@@ -67,7 +67,7 @@ jobs:
6767
sort_dependencies: ##########################################################################
6868
runs-on: ubuntu-latest
6969
steps:
70-
- uses: actions/checkout@v3
70+
- uses: actions/checkout@v4.1.7
7171
- name: Install isort
7272
run: |
7373
pip install isort
@@ -89,13 +89,13 @@ jobs:
8989
fail-fast: false
9090

9191
steps:
92-
- uses: actions/checkout@v3
92+
- uses: actions/checkout@v4.1.7
9393
- name: Set up Python
94-
uses: actions/setup-python@v4.5.0
94+
uses: actions/setup-python@v5.1.1
9595
with:
9696
python-version: ${{ matrix.python-version }}
9797
cache: 'pip'
98-
cache-dependency-path: setup.py
98+
cache-dependency-path: pyproject.toml
9999
- name: Install Python dependencies
100100
run: |
101101
pip install --upgrade pip
@@ -114,14 +114,14 @@ jobs:
114114
TUTORIAL_TIMEOUT: 1200s
115115

116116
steps:
117-
- uses: actions/checkout@v3
117+
- uses: actions/checkout@v4.1.7
118118

119119
- name: Set up Python
120-
uses: actions/setup-python@v4.5.0
120+
uses: actions/setup-python@v5.1.1
121121
with:
122122
python-version: ${{ matrix.python-version }}
123123
cache: 'pip'
124-
cache-dependency-path: setup.py
124+
cache-dependency-path: pyproject.toml
125125

126126
- name: Install dependencies
127127
run: |
File renamed without changes.

0 commit comments

Comments
 (0)