forked from pydata/xarray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into groupby-aggs-using-…
…numpy-groupies * upstream/main: [pre-commit.ci] pre-commit autoupdate (pydata#6562) Run mypy tests (but always pass) (pydata#6557) Update issue template to include a checklist (pydata#6522) Remove duplicate tests, v3 (pydata#6550) Skip mypy tests in CI (pydata#6552) Direct usage questions to GH discussions (pydata#6539) Revert "Attempt to improve CI caching (pydata#6534)" (pydata#6543) Revert "Remove duplicate tests (pydata#6536)" (pydata#6540) Remove duplicate tests (pydata#6536) Add a slighly cheesy contributors panel to readme (pydata#6520) Fix doctest & mypy CI jobs (pydata#6535) Attempt to improve CI caching (pydata#6534) Attempt to consolidate tests in CI (pydata#6533) Restrict annotations to a single run in GHA (pydata#6532) Fix some mypy issues (pydata#6531) Pin version of black in pre-commit blackdoc (pydata#6492) Scale numfocus image in readme (pydata#6519) Use new importlib.metadata.entry_points interface where available. (pydata#6516) Add a badge for binder (pydata#6518) Bump codecov/codecov-action from 3.0.0 to 3.1.0 (pydata#6509)
- Loading branch information
Showing
22 changed files
with
212 additions
and
144 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
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
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 |
---|---|---|
|
@@ -30,96 +30,50 @@ jobs: | |
with: | ||
keyword: "[skip-ci]" | ||
|
||
test: | ||
name: ${{ matrix.os }} ${{ matrix.env }} | ||
runs-on: ${{ matrix.os }} | ||
doctest: | ||
name: Doctests | ||
runs-on: "ubuntu-latest" | ||
needs: detect-ci-trigger | ||
if: needs.detect-ci-trigger.outputs.triggered == 'false' | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
env: | ||
[ | ||
# Minimum python version: | ||
"py38-bare-minimum", | ||
"py38-min-all-deps", | ||
|
||
# Latest python version: | ||
"py39-all-but-dask", | ||
"py39-flaky", | ||
] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
|
||
- name: Set environment variables | ||
run: | | ||
if [[ ${{ matrix.env }} == "py39-flaky" ]] ; | ||
then | ||
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV | ||
echo "PYTEST_EXTRA_FLAGS=--run-flaky --run-network-tests" >> $GITHUB_ENV | ||
else | ||
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV | ||
fi | ||
- name: Cache conda | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
${{ runner.os }}-conda-${{ matrix.env }}-${{ | ||
hashFiles('ci/requirements/**.yml') }} | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
channels: conda-forge | ||
channel-priority: strict | ||
mamba-version: "*" | ||
activate-environment: xarray-tests | ||
auto-update-conda: false | ||
python-version: 3.9 | ||
use-only-tar-bz2: true | ||
python-version: "3.9" | ||
|
||
- name: Install conda dependencies | ||
run: | | ||
mamba env update -f $CONDA_ENV_FILE | ||
mamba env update -f ci/requirements/environment.yml | ||
- 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: Import xarray | ||
run: | | ||
python -c "import xarray" | ||
- name: Run tests | ||
- name: Run doctests | ||
run: | | ||
python -m pytest -n 4 \ | ||
--cov=xarray \ | ||
--cov-report=xml \ | ||
$PYTEST_EXTRA_FLAGS | ||
python -m pytest --doctest-modules xarray --ignore xarray/tests | ||
- name: Upload code coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests,${{ matrix.env }} | ||
env_vars: RUNNER_OS | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
doctest: | ||
name: Doctests | ||
mypy: | ||
name: Mypy | ||
runs-on: "ubuntu-latest" | ||
if: needs.detect-ci-trigger.outputs.triggered == 'false' | ||
needs: detect-ci-trigger | ||
# temporarily skipping due to https://github.com/pydata/xarray/issues/6551 | ||
# if: needs.detect-ci-trigger.outputs.triggered == 'false' | ||
if: false | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
@@ -148,9 +102,15 @@ jobs: | |
conda info -a | ||
conda list | ||
python xarray/util/print_versions.py | ||
- name: Run doctests | ||
- name: Install mypy | ||
run: | | ||
python -m pytest --doctest-modules xarray --ignore xarray/tests | ||
python -m pip install mypy | ||
# Temporarily overriding to be true due to https://github.com/pydata/xarray/issues/6551 | ||
# python -m mypy --install-types --non-interactive | ||
- name: Run mypy | ||
run: | | ||
python -m mypy --install-types --non-interactive || true | ||
min-version-policy: | ||
name: Minimum Version Policy | ||
|
@@ -176,5 +136,5 @@ jobs: | |
- name: minimum versions policy | ||
run: | | ||
mamba install -y pyyaml conda python-dateutil | ||
python ci/min_deps_check.py ci/requirements/py38-bare-minimum.yml | ||
python ci/min_deps_check.py ci/requirements/py38-min-all-deps.yml | ||
python ci/min_deps_check.py ci/requirements/bare-minimum.yml | ||
python ci/min_deps_check.py ci/requirements/min-all-deps.yml |
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
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
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.