-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from ecmwf-ifs/69-python-3.11-compatibility
Python 3.11 compatibility
- Loading branch information
Showing
6 changed files
with
52 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: code-checks | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push events | ||
push: | ||
branches: [ 'main' ] | ||
tags-ignore: [ '**' ] | ||
|
||
# Triggers the workflow on pull request events | ||
pull_request: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
code_checks: | ||
name: code checks | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false # false: try to complete all jobs | ||
matrix: | ||
python-version: ["3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[tests,examples] ./transformations ./lint_rules | ||
pip list | ||
- name: Add pylint annotator | ||
uses: pr-annotators/[email protected] | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint --rcfile=.pylintrc loki tests | ||
pushd transformations && pylint --rcfile=../.pylintrc transformations tests; popd | ||
pushd lint_rules && pylint --rcfile=../.pylintrc lint_rules tests; popd | ||
jupyter nbconvert --to=script --output-dir=example_converted example/*.ipynb | ||
pylint --rcfile=.pylintrc_ipynb example_converted/*.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,45 +14,14 @@ on: | |
workflow_dispatch: | ||
|
||
jobs: | ||
code_checks: | ||
name: code checks | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false # false: try to complete all jobs | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[tests,examples] ./transformations ./lint_rules | ||
pip list | ||
- name: Add pylint annotator | ||
uses: pr-annotators/[email protected] | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint --rcfile=.pylintrc loki tests | ||
pushd transformations && pylint --rcfile=../.pylintrc transformations tests; popd | ||
pushd lint_rules && pylint --rcfile=../.pylintrc lint_rules tests; popd | ||
jupyter nbconvert --to=script --output-dir=example_converted example/*.ipynb | ||
pylint --rcfile=.pylintrc_ipynb example_converted/*.py | ||
pytest: | ||
name: Python ${{ matrix.python-version }} | ||
|
||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false # false: try to complete all jobs | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters