Skip to content

Commit

Permalink
main.yml CI installs from pyproject.toml (#90)
Browse files Browse the repository at this point in the history
* main.yml CI installs from pyproject

* specify engine

* swap netcdf4 for h5netcdf
  • Loading branch information
norlandrhagen authored Apr 24, 2024
1 parent 9920b45 commit 2599ddb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 35 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
- name: Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
cache-downloads: true
micromamba-version: 'latest'
environment-file: ci/environment.yml
extra-specs: |
python=${{ matrix.python-version }}
- name: Conda info
run: conda info
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Install virtualizarr
run: |
python -m pip install -e ".[test]"
- name: Conda list
run: conda list
- name: Running Tests
run: |
Expand Down
18 changes: 0 additions & 18 deletions ci/environment.yml

This file was deleted.

12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,27 @@ classifiers = [
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"xarray",
"xarray@git+https://github.com/TomNicholas/xarray.git@concat-no-indexes#egg=xarray",
"kerchunk==0.2.2",
"h5netcdf",
"pydantic",
"numpy",
"ujson",
"packaging",
]

[project.optional-dependencies]
test = [
"codecov",
"pre-commit",
"pytest-mypy",
"pytest-cov",
"pytest",
"scipy",
"pooch",
]


"ruff",

]


[project.urls]
Expand Down
3 changes: 2 additions & 1 deletion virtualizarr/tests/test_kerchunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def test_automatically_determine_filetype_netcdf3_netcdf4():

# write two version of NetCDF
ds.to_netcdf(netcdf3_file_path, engine="scipy", format="NETCDF3_CLASSIC")
ds.to_netcdf(netcdf4_file_path)
ds.to_netcdf(netcdf4_file_path, engine="h5netcdf")

assert FileType("netcdf3") == _automatically_determine_filetype(netcdf3_file_path)
assert FileType("netcdf4") == _automatically_determine_filetype(netcdf4_file_path)

Expand Down

0 comments on commit 2599ddb

Please sign in to comment.