Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
intake_dataframe_catalog/_version.py export-subst
src/intake_dataframe_catalog/_version.py export-subst
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
58 changes: 21 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,25 @@ jobs:
max-parallel: 10 # ACCESS-NRI has a limit of 20. This leaves room for other jobs.
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

environment: [test-py310, test-py311, test-py312, test-py313]
steps:
- name: Checkout source
uses: actions/checkout@v5

- name: Setup conda environment
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
environment-file: ci/environment-${{ matrix.python-version }}.yml
activate-environment: intake-df-cat-test
auto-activate-base: false

- name: Test build distribution
shell: bash -l {0}
run: |
git clean -xdf
pyproject-build

- name: Install source
shell: bash -l {0}
run: python -m pip install .

- name: List installed packages
shell: bash -l {0}
run: conda list

- name: Run tests
shell: bash -l {0}
run: python -m pytest -s --cov=intake_dataframe_catalog --cov-report=xml .

- name: Upload code coverage
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/checkout@v5.0.0
- uses: prefix-dev/setup-pixi@v0.9.2
with:
environments: ${{ matrix.environment }}
frozen: true # This seems hacky?

- name: Clean git workspace
run: |
git clean -fdx
git reset --hard HEAD

- name: Run tests and generate coverage report
run: |
pixi clean && pixi run -e ${{ matrix.environment }} test-cov

- name: Upload code coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.codecov_token }}
files: ./coverage.xml
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@ dmypy.json
# Files
sandpit.ipynb
.DS_Store
# pixi environments
.pixi/*
!.pixi/config.toml
20 changes: 0 additions & 20 deletions ci/environment-3.10.yml

This file was deleted.

20 changes: 0 additions & 20 deletions ci/environment-3.11.yml

This file was deleted.

20 changes: 0 additions & 20 deletions ci/environment-3.12.yml

This file was deleted.

19 changes: 0 additions & 19 deletions ci/environment-3.13.yml

This file was deleted.

15,624 changes: 15,624 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

55 changes: 47 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,10 @@ dependencies = [
"intake >= 0.7.0",
"itables",
"pandas",
"polars>=1.12,<1.33"
"polars>=1.12"
]
dynamic = ["version"]

[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"tox",
]

[project.entry-points."intake.drivers"]
df_catalog = "intake_dataframe_catalog.core:DfFileCatalog"

Expand Down Expand Up @@ -105,3 +98,49 @@ max-complexity = 18
[tool.ruff.isort]
known-first-party = ["intake_dataframe_catalog"]

[tool.pixi.workspace]
channels = ["conda-forge","accessnri"]
platforms = ["osx-arm64", "linux-64", "win-64"]

[tool.pixi.environments]
default = { features = ["dev","py313"], solve-group = "default" }
test-py310 = { features = ["py310", "test"] }
test-py311 = { features = ["py311", "test"] }
test-py312 = { features = ["py312", "test"] }
test-py313 = { features = ["py313", "test"] }

[tool.pixi.feature.dev.pypi-dependencies]
intake_dataframe_catalog = { path = ".", editable = true }

[tool.pixi.feature.test.pypi-dependencies]
intake_dataframe_catalog = { path = ".", editable = false }

[tool.pixi.feature.test.tasks]
test = {cmd = "pytest tests", description = "Run tests"}
test-cov = {cmd = "pytest -s --cov=intake_dataframe_catalog --cov-report=xml tests && coverage xml", description = "Run tests with coverage and generate xml report"}

[tool.pixi.feature.test.dependencies]
pytest = ">=8.4.1,<9"
pytest-cov = ">=7.0.0,<8"
xarray = ">=2025.6.1,<2026"
intake-esm-access = { version = ">=2025.10.14,<2026", channel = "accessnri" }

[tool.pixi.feature.dev.tasks]
pre-commit-install = { cmd = "pre-commit install", description = "Install pre-commit hooks" }
dump-conda-env = { cmd = "pixi workspace export conda-environment --name intake-dfcat-test > env.yml", description = "Dump conda environment to env.yml" }

[tool.pixi.feature.dev.dependencies]
pytest = ">=8.4.2,<9"
pytest-cov = ">=7.0.0,<8"

[tool.pixi.feature.py310.dependencies]
python = "3.10.*"

[tool.pixi.feature.py311.dependencies]
python = "3.11.*"

[tool.pixi.feature.py312.dependencies]
python = "3.12.*"

[tool.pixi.feature.py313.dependencies]
python = "3.13.*"
Loading