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

Implement open_data and support tiff, netcdf and zarr for s3 and https protocol #17

Closed
wants to merge 14 commits into from
20 changes: 18 additions & 2 deletions .github/workflows/unittest-workflow.yml
Original file line number Diff line number Diff line change
@@ -9,17 +9,33 @@ jobs:
unittest:
runs-on: ubuntu-latest
steps:
- name: checkout xcube
uses: actions/checkout@v4
with:
repository: xcube-dev/xcube
path: xcube

- name: checkout xcube-stac
uses: actions/checkout@v4
with:
path: xcube-stac

- name: Set up MicroMamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-file: xcube-stac/environment_workflow.yml

- name: Install xcube and start xcube server
shell: bash -l {0}
run: |
cd /home/runner/work/xcube-stac/xcube-stac/xcube
ls
pip install .
xcube serve -c examples/serve/demo/config.yml &

- name: Run unit tests
shell: bash -l {0}
run: |
cd /home/runner/work/xcube-stac/xcube-stac
cd /home/runner/work/xcube-stac/xcube-stac/xcube-stac
ls
pytest
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -59,5 +59,9 @@ HTTP request. During development run
pytest -v -s --record-mode new_episodes
```

which saves the responses to `cassettes/**.yaml`. The testing can be then
performed as usual.
which saves the responses to `cassettes/**.yaml`. Note that `--record-mode new_episodes`
overwrites all cassettes. If the user only wants to write cassettes which are not saved
already, `--record-mode once` can be used.
[pytest-recording](https://pypi.org/project/pytest-recording/) supports all records modes
given by [VCR.py](https://vcrpy.readthedocs.io/en/latest/usage.html#record-modes).
After recording the cassettes, testing can be then performed as usual.
54 changes: 54 additions & 0 deletions environment_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: xcube-stac
channels:
- conda-forge
- defaults
dependencies:
# Python
- python >=3.9
# Required xcube
- affine >=2.2
- botocore >=1.34.51
- cftime >=1.6.3
- click >=8.0
- cmocean >=2.0
- dask >=2021.6
- dask-image >=0.6
- deprecated >=1.2
- distributed >=2021.6
- fiona >=1.8
- fsspec >=2021.6
- gdal >=3.0
- geopandas >=0.8
- jdcal >=1.4
- jsonschema >=3.2
- mashumaro
- matplotlib-base >=3.8.3
- netcdf4 >=1.5
- numba >=0.52
- numcodecs >=0.12.1
- numpy >=1.16
- pandas >=1.3
- pillow >=6.0
- pyjwt >=1.7
- pyproj >=3.0
- pyyaml >=5.4
- rasterio >=1.2
- requests >=2.25
- rfc3339-validator >=0.1 # for python-jsonschema date-time format validation
- rioxarray >=0.11
- s3fs >=2021.6
- setuptools >=41.0
- shapely >=1.6
- tornado >=6.0
- urllib3 >=1.26
- xarray >=2022.6
- zarr >=2.11
# Required xcube-stac
- pystac
- pystac-client
# for testing
- black
- flake8
- pytest
- pytest-cov
- pytest-recording
Loading