Skip to content

Commit

Permalink
Merge pull request PyDMD#536 from PyDMD/pyproject-toml
Browse files Browse the repository at this point in the history
Migrate `setup.py` to `pyproject.toml`, and CalVer
  • Loading branch information
mtezzele authored Aug 8, 2024
2 parents 8e5417d + 0a17c39 commit 82e6ee5
Show file tree
Hide file tree
Showing 16 changed files with 189 additions and 319 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy_after_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
- name: Set Dynamic Matrix
id: setmatrix
run: |
Expand Down Expand Up @@ -43,13 +43,13 @@ jobs:
matrix: ${{ fromJson(needs.prepare_matrix.outputs.matrix) }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Install Python dependencies
run: |
pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_after_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
- name: Set Dynamic Matrix
id: setmatrix
run: |
Expand Down Expand Up @@ -55,9 +55,9 @@ jobs:
strategy:
matrix: ${{ fromJson(needs.prepare_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.python-version }}
- name: Install build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/export_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
env:
TUTORIAL_TIMEOUT: 1200s
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7

- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
with:
python-version: 3.8

Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/monthly-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7

- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -40,12 +40,9 @@ jobs:

- name: Create and push the tag
run: |
python utils/mathlab_versioning.py set --only-date "dev$(date +%y%m)"
cat pydmd/meta.py
VERS=$(python utils/mathlab_versioning.py get)
# CalVer, e.g. 2024.07.19
VERS=$(date +%Y.%m.%d)
git config --global user.name 'Monthly Tag bot'
git config --global user.email '[email protected]'
git add pydmd/meta.py
git commit -m "monthly version $VERS"
git tag -a "v$VERS" -m "Monthly version $VERS"
git push origin "v$VERS"
git tag "$VERS" -a -m "Monthly version $VERS"
git push origin "$VERS"
24 changes: 12 additions & 12 deletions .github/workflows/testing_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
matrix_tutorial_test: ${{ steps.setmatrix.outputs.matrix2 }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7

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

- name: Set Dynamic Matrix
id: setmatrix
Expand All @@ -43,14 +43,14 @@ jobs:
black: ######################################################################################
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7
- name: Install black
run: |
pip install black[jupyter]==24.2.0
pip install black[jupyter]==24.4.2
- name: Run black formatter on PyDMD source code
run: |
black --check --diff --color pydmd/ utils/ tests/ setup.py
black --check --diff --color pydmd/ utils/ tests/
if [[ $? -ne "0" ]]; then
echo "Source code needs re-formatting"
exit 1
Expand All @@ -67,7 +67,7 @@ jobs:
sort_dependencies: ##########################################################################
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7
- name: Install isort
run: |
pip install isort
Expand All @@ -89,13 +89,13 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Install Python dependencies
run: |
pip install --upgrade pip
Expand All @@ -114,14 +114,14 @@ jobs:
TUTORIAL_TIMEOUT: 1200s

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7

- name: Set up Python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
Expand Down
File renamed without changes.
Loading

0 comments on commit 82e6ee5

Please sign in to comment.