Skip to content
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

Update upstream-dev testing infrastructure #654

Open
dcherian opened this issue Mar 20, 2023 · 4 comments
Open

Update upstream-dev testing infrastructure #654

dcherian opened this issue Mar 20, 2023 · 4 comments
Labels
proposal Idea for a new feature. upstream Issue is related to a dependency (upstream package).

Comments

@dcherian
Copy link

dcherian commented Mar 20, 2023

Xarray has a fancy new nightly upstream testing workflow.

It runs nightly and opens nice issues with test logs (example). It'd be nice to copy that over here so things like #652 can be caught more proactively.

@dcherian dcherian added the proposal Idea for a new feature. label Mar 20, 2023
@snowman2
Copy link
Member

Sounds great. Current state of rioxarray latest testing:

test_latest:
needs: linting
name: Test latest dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
python-version: 3.9
conda-channels: conda-forge
- name: Install Env
shell: bash
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n test python=3.9 proj libgdal cython netcdf4
source activate test
python -m pip install \
--index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple \
--trusted-host pypi.anaconda.org \
--no-deps --pre --upgrade \
numpy \
pandas \
scipy;
python -m pip install --upgrade \
git+https://github.com/dask/dask.git@main \
git+https://github.com/dask/distributed.git@main \
git+https://github.com/mapbox/rasterio.git@main \
git+https://github.com/pyproj4/pyproj.git@main \
git+https://github.com/pydata/xarray.git@main;
python -m pip install -e .[all]
- name: Check and Log Environment
shell: bash
run: |
source activate test
python -V
python -c "import rioxarray; rioxarray.show_versions();"
conda info
- name: Test
shell: bash
run: |
source activate test
pytest --cov-report term-missing --cov=rioxarray --cov-report xml

@snowman2
Copy link
Member

The issue with latest was that the build failed often due to installation issues or other noise that unfortunately made it less useful. It just barely stabilized enough to get useful testing information.

@Zeitsperre
Copy link

That's really cool! @dcherian mind if I grab that for xclim?

@dcherian
Copy link
Author

@Zeitsperre go for it!

The cf-xarray version also supports adding a test-upstream label.

@snowman2 snowman2 added the upstream Issue is related to a dependency (upstream package). label Mar 20, 2023
Zeitsperre added a commit to Ouranosinc/xclim that referenced this issue Mar 23, 2023
### What kind of change does this PR introduce?

* Splits the existing upstream testing stage into its own workflow
* This workflow uses xarray-developed actions for opening issues when
this workflow fails
  * Is triggered when a PR is merged to master or every day at midnight.
* Can be triggered via cron job or manually (using `workflow_dispatch`)
* Unites the CI workflows for PyPI/`tox`-based jobs into one action with
a strategy matrix

### Does this PR introduce a breaking change?

No.

### Other information:

See: corteva/rioxarray#654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Idea for a new feature. upstream Issue is related to a dependency (upstream package).
Projects
None yet
Development

No branches or pull requests

3 participants