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 branch 'main' into hypothesis-strategies
- Loading branch information
Showing
219 changed files
with
27,196 additions
and
10,452 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ |
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,23 @@ | ||
# Comment to be posted to on first time issues | ||
newIssueWelcomeComment: > | ||
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! | ||
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes. | ||
See the [Contributing Guide](https://docs.xarray.dev/en/latest/contributing.html) for more. | ||
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better. | ||
Thank you! | ||
# Comment to be posted to on PRs from first time contributors in your repository | ||
newPRWelcomeComment: > | ||
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. | ||
If you have questions, some answers may be found in our [contributing guidelines](http://docs.xarray.dev/en/stable/contributing.html). | ||
# Comment to be posted to on pull requests merged by a first time user | ||
firstPRMergeComment: > | ||
Congratulations on completing your first pull request! Welcome to Xarray! | ||
We are proud of you, and hope to see you again! | ||
![celebration gif](https://media.giphy.com/media/umYMU8G2ixG5mJBDo5/giphy.gif) |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Benchmark compare last release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
benchmark: | ||
name: Linux | ||
runs-on: ubuntu-20.04 | ||
env: | ||
ASV_DIR: "./asv_bench" | ||
CONDA_ENV_FILE: ci/requirements/environment.yml | ||
|
||
steps: | ||
# We need the full repo to avoid this issue | ||
# https://github.com/actions/checkout/issues/23 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up conda environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: ${{env.CONDA_ENV_FILE}} | ||
environment-name: xarray-tests | ||
cache-environment: true | ||
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark" | ||
create-args: >- | ||
asv | ||
- name: 'Get Previous tag' | ||
id: previoustag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
# with: | ||
# fallback: 1.0.0 # Optional fallback tag to use when no tag can be found | ||
|
||
- name: Run benchmarks | ||
shell: bash -l {0} | ||
id: benchmark | ||
env: | ||
OPENBLAS_NUM_THREADS: 1 | ||
MKL_NUM_THREADS: 1 | ||
OMP_NUM_THREADS: 1 | ||
ASV_FACTOR: 1.5 | ||
ASV_SKIP_SLOW: 1 | ||
run: | | ||
set -x | ||
# ID this runner | ||
asv machine --yes | ||
echo "Baseline: ${{ steps.previoustag.outputs.tag }} " | ||
echo "Contender: ${{ github.sha }}" | ||
# Use mamba for env creation | ||
# export CONDA_EXE=$(which mamba) | ||
export CONDA_EXE=$(which conda) | ||
# Run benchmarks for current commit against base | ||
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR" | ||
asv continuous $ASV_OPTIONS ${{ steps.previoustag.outputs.tag }} ${{ github.sha }} \ | ||
| sed "/Traceback \|failed$\|PERFORMANCE DECREASED/ s/^/::error::/" \ | ||
| tee benchmarks.log | ||
# Report and export results for subsequent steps | ||
if grep "Traceback \|failed\|PERFORMANCE DECREASED" benchmarks.log > /dev/null ; then | ||
exit 1 | ||
fi | ||
working-directory: ${{ env.ASV_DIR }} | ||
|
||
- name: Add instructions to artifact | ||
if: always() | ||
run: | | ||
cp benchmarks/README_CI.md benchmarks.log .asv/results/ | ||
working-directory: ${{ env.ASV_DIR }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: asv-benchmark-results-${{ runner.os }} | ||
path: ${{ env.ASV_DIR }}/.asv/results |
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- uses: xarray-contrib/ci-trigger@v1.1 | ||
- uses: xarray-contrib/ci-trigger@v1 | ||
id: detect-trigger | ||
with: | ||
keyword: "[skip-ci]" | ||
|
@@ -53,14 +53,15 @@ jobs: | |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: ${{env.CONDA_ENV_FILE}} | ||
environment-name: xarray-tests | ||
extra-specs: | | ||
create-args: >- | ||
python=${{env.PYTHON_VERSION}} | ||
cache-env: true | ||
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
conda | ||
cache-environment: true | ||
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
|
||
- name: Install xarray | ||
run: | | ||
|
@@ -72,7 +73,10 @@ jobs: | |
python xarray/util/print_versions.py | ||
- name: Run doctests | ||
run: | | ||
python -m pytest --doctest-modules xarray --ignore xarray/tests | ||
# Raise an error if there are warnings in the doctests, with `-Werror`. | ||
# This is a trial; if it presents an problem, feel free to remove. | ||
# See https://github.com/pydata/xarray/issues/7164 for more info. | ||
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror | ||
mypy: | ||
name: Mypy | ||
|
@@ -96,14 +100,15 @@ jobs: | |
run: | | ||
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: ${{env.CONDA_ENV_FILE}} | ||
environment-name: xarray-tests | ||
extra-specs: | | ||
create-args: >- | ||
python=${{env.PYTHON_VERSION}} | ||
cache-env: true | ||
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
conda | ||
cache-environment: true | ||
cache-environment-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 . | ||
|
@@ -114,11 +119,76 @@ jobs: | |
python xarray/util/print_versions.py | ||
- name: Install mypy | ||
run: | | ||
python -m pip install mypy | ||
python -m pip install mypy --force-reinstall | ||
- name: Run mypy | ||
run: | | ||
python -m mypy --install-types --non-interactive | ||
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report | ||
- name: Upload mypy coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: mypy_report/cobertura.xml | ||
flags: mypy | ||
env_vars: PYTHON_VERSION | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
|
||
mypy39: | ||
name: Mypy 3.9 | ||
runs-on: "ubuntu-latest" | ||
needs: detect-ci-trigger | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
env: | ||
CONDA_ENV_FILE: ci/requirements/environment.yml | ||
PYTHON_VERSION: "3.9" | ||
|
||
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/setup-micromamba@v1 | ||
with: | ||
environment-file: ${{env.CONDA_ENV_FILE}} | ||
environment-name: xarray-tests | ||
create-args: >- | ||
python=${{env.PYTHON_VERSION}} | ||
conda | ||
cache-environment: true | ||
cache-environment-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 --force-reinstall | ||
- name: Run mypy | ||
run: | | ||
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report | ||
- name: Upload mypy coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: mypy_report/cobertura.xml | ||
flags: mypy39 | ||
env_vars: PYTHON_VERSION | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
|
||
|
||
|
||
min-version-policy: | ||
name: Minimum Version Policy | ||
|
@@ -140,16 +210,14 @@ jobs: | |
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
|
||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@34071ca7df4983ccd272ed0d3625818b27b70dcc | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-name: xarray-tests | ||
environment-file: false | ||
extra-specs: | | ||
create-args: >- | ||
python=3.10 | ||
pyyaml | ||
conda | ||
python-dateutil | ||
channels: conda-forge | ||
- name: minimum versions policy | ||
run: | | ||
|
Oops, something went wrong.