-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fixed type errors in mypy
GitHub Action
#6963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e1733f3
4e9ea53
1dbae6c
afdb930
6674f93
7018b95
50ad45d
69692a6
88e6f7c
d845fec
aabbf7f
27cdc33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,64 @@ jobs: | |
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
|
||
mypy38: | ||
name: Mypy 3.8 | ||
runs-on: "ubuntu-latest" | ||
needs: detect-ci-trigger | ||
# temporarily skipping due to https://github.com/pydata/xarray/issues/6551 | ||
if: needs.detect-ci-trigger.outputs.triggered == 'false' | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
env: | ||
CONDA_ENV_FILE: ci/requirements/environment.yml | ||
PYTHON_VERSION: "3.8" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
|
||
- name: set environment variables | ||
run: | | ||
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@v14 | ||
with: | ||
environment-file: ${{env.CONDA_ENV_FILE}} | ||
environment-name: xarray-tests | ||
extra-specs: | | ||
python=${{env.PYTHON_VERSION}} | ||
conda | ||
cache-env: true | ||
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
- name: Install xarray | ||
run: | | ||
python -m pip install --no-deps -e . | ||
- name: Version info | ||
run: | | ||
conda info -a | ||
conda list | ||
python xarray/util/print_versions.py | ||
- name: Install mypy | ||
run: | | ||
python -m pip install 'mypy<0.990' | ||
|
||
- name: Run mypy | ||
run: | | ||
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report | ||
|
||
- name: Upload mypy coverage to Codecov | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to upload this to codecov? The coverage should be the same as for the newest python. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really, I just kept it simple with the copy/pasting as I suspect we can do this workflow in a smarter way; similar way as the pytest CI or the I think we can just focus on getting the xarray bugs fixed in this PR and not get stuck with the CI semantics. |
||
uses: codecov/[email protected] | ||
with: | ||
file: mypy_report/cobertura.xml | ||
flags: mypy38 | ||
env_vars: PYTHON_VERSION | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
|
||
|
||
|
||
min-version-policy: | ||
name: Minimum Version Policy | ||
runs-on: "ubuntu-latest" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is mypy=0.990 still crashing?