forked from pydata/xarray
-
Notifications
You must be signed in to change notification settings - Fork 1
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-binary-ops-…
…lazy-array * upstream/main: (153 commits) Add HDF5 Section to read/write docs page (pydata#8012) [pre-commit.ci] pre-commit autoupdate (pydata#8014) Update interpolate_na in dataset.py (pydata#7974) improved docstring of to_netcdf (issue pydata#7127) (pydata#7947) Expose "Coordinates" as part of Xarray's public API (pydata#7368) Core team member guide (pydata#7999) join together duplicate entries in the text `repr` (pydata#7225) Update copyright year in README (pydata#8007) Allow opening datasets with nD dimenson coordinate variables. (pydata#7989) Move whats-new entry [pre-commit.ci] pre-commit autoupdate (pydata#7997) Add documentation on custom indexes (pydata#6975) Use variable name in all exceptions raised in `as_variable` (pydata#7995) Bump pypa/gh-action-pypi-publish from 1.8.7 to 1.8.8 (pydata#7994) New whatsnew section Remove future release notes before this release Update whats-new.rst for new release (pydata#7993) Remove hue_style from plot1d docstring (pydata#7925) Add new what's new section (pydata#7986) Release summary for v2023.07.0 (pydata#7979) ...
- Loading branch information
Showing
154 changed files
with
9,957 additions
and
3,808 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,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
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 |
---|---|---|
|
@@ -53,15 +53,15 @@ jobs: | |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
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}} | ||
conda | ||
cache-env: true | ||
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
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: | | ||
|
@@ -100,15 +100,15 @@ jobs: | |
run: | | ||
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
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}} | ||
conda | ||
cache-env: true | ||
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
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 . | ||
|
@@ -119,14 +119,14 @@ jobs: | |
python xarray/util/print_versions.py | ||
- name: Install mypy | ||
run: | | ||
python -m pip install 'mypy<0.990' | ||
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].1 | ||
uses: codecov/[email protected].4 | ||
with: | ||
file: mypy_report/cobertura.xml | ||
flags: mypy | ||
|
@@ -154,15 +154,15 @@ jobs: | |
run: | | ||
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
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}} | ||
conda | ||
cache-env: true | ||
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
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 . | ||
|
@@ -173,14 +173,14 @@ jobs: | |
python xarray/util/print_versions.py | ||
- name: Install mypy | ||
run: | | ||
python -m pip install 'mypy<0.990' | ||
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].1 | ||
uses: codecov/[email protected].4 | ||
with: | ||
file: mypy_report/cobertura.xml | ||
flags: mypy39 | ||
|
@@ -210,16 +210,14 @@ jobs: | |
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
|
||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
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: | | ||
|
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 |
---|---|---|
|
@@ -92,13 +92,13 @@ jobs: | |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | ||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: ${{ env.CONDA_ENV_FILE }} | ||
environment-name: xarray-tests | ||
cache-env: true | ||
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
extra-specs: | | ||
cache-environment: true | ||
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | ||
create-args: >- | ||
python=${{matrix.python-version}} | ||
conda | ||
|
@@ -139,7 +139,7 @@ jobs: | |
path: pytest.xml | ||
|
||
- name: Upload code coverage to Codecov | ||
uses: codecov/[email protected].1 | ||
uses: codecov/[email protected].4 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
|
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,44 @@ | ||
name: Upload nightly wheels | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
jobs: | ||
cron: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'pydata/xarray' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build twine | ||
- name: Build tarball and wheels | ||
run: | | ||
git clean -xdf | ||
git restore -SW . | ||
python -m build | ||
- name: Check built artifacts | ||
run: | | ||
python -m twine check --strict dist/* | ||
pwd | ||
if [ -f dist/xarray-0.0.0.tar.gz ]; then | ||
echo "❌ INVALID VERSION NUMBER" | ||
exit 1 | ||
else | ||
echo "✅ Looks good" | ||
fi | ||
- name: Upload wheel | ||
uses: scientific-python/upload-nightly-action@main | ||
with: | ||
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }} | ||
artifacts_path: dist |
Oops, something went wrong.