-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHANGE: move to uv for CI / environments (#80)
* first step at moving to uv * move to uv for CI, no need for environment.yml * debugging github actions * use uv to build for docs * let it go * use their recommendation * remove yaml file we no longer need
- Loading branch information
Showing
6 changed files
with
72 additions
and
95 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 |
---|---|---|
|
@@ -31,24 +31,19 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags. | ||
fetch-depth: 0 | ||
|
||
- name: Create conda environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
cache-downloads: true | ||
environment-file: ci/environment.yml | ||
environment-name: intake-esgf-dev | ||
create-args: >- | ||
python=${{ matrix.python-version }} | ||
- name: Install uv environment | ||
uses: astral-sh/setup-uv@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
run: uv python install ${{ matrix.python-version }} | ||
|
||
- name: Install intake-esgf | ||
run: | | ||
python -m pip install -e . --no-deps --force-reinstall | ||
- name: Install intake-esgf and dependencies | ||
run: uv sync | ||
|
||
- name: Run Tests | ||
run: | | ||
python -m pytest | ||
run: uv run pytest | ||
|
||
- name: Upload code coverage to Codecov | ||
uses: codecov/[email protected] | ||
|
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 |
---|---|---|
@@ -1,7 +1,12 @@ | ||
version: 2 | ||
conda: | ||
environment: ci/environment-docs.yml | ||
|
||
build: | ||
os: "ubuntu-20.04" | ||
os: "ubuntu-24.04" | ||
tools: | ||
python: "mambaforge-4.10" | ||
python: "3.12" | ||
commands: | ||
- asdf plugin add uv | ||
- asdf install uv latest | ||
- asdf global uv latest | ||
- uv sync --extra docs | ||
- uv run -m sphinx -T -b html -d doc/_build/doctrees -D language=en doc $READTHEDOCS_OUTPUT/html |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,54 @@ | ||
# https://snarky.ca/what-the-heck-is-pyproject-toml/ | ||
[project] | ||
name = "intake-esgf" | ||
description = "Programmatic access to the ESGF holdings" | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Nathan Collier", email = "[email protected]" } | ||
] | ||
classifiers = ["Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering"] | ||
license = { file="LICENSE" } | ||
requires-python = ">=3.10" | ||
dependencies = [ | ||
"dask", | ||
"globus-sdk", | ||
"netcdf4", | ||
"pandas", | ||
"pyyaml", | ||
"requests", | ||
"tqdm", | ||
"xarray", | ||
] | ||
dynamic=["version"] | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"pytest-cov", | ||
] | ||
|
||
[project.optional-dependencies] | ||
docs = [ | ||
"distributed", | ||
"furo", | ||
"ipywidgets", | ||
"matplotlib", | ||
"myst-nb", | ||
"nc-time-axis", | ||
"numpydoc", | ||
"sphinx-autosummary-accessors", | ||
"sphinx-copybutton", | ||
] | ||
notebook = [ | ||
"ipywidgets", | ||
"tqdm[notebook]", | ||
] | ||
|
||
[build-system] | ||
requires = ["setuptools", "setuptools_scm", "wheel"] | ||
|
@@ -8,8 +58,8 @@ build-backend = "setuptools.build_meta" | |
version_scheme = "no-guess-dev" | ||
local_scheme = "node-and-date" | ||
fallback_version = "0.0.0" | ||
write_to = "intake_esgf/_version.py" | ||
write_to_template = '__version__ = "{version}"' | ||
version_file = "intake_esgf/_version.py" | ||
version_file_template = '__version__ = "{version}"' | ||
|
||
[tool.pytest.ini_options] | ||
console_output_style = "count" | ||
|
@@ -24,7 +74,7 @@ omit = ["*/intake_esgf/tests/*"] | |
[tool.ruff] | ||
target-version = "py310" | ||
ignore = [ | ||
"E501", # line too long - let black worry about that | ||
"E501", # let black worry about line length | ||
] | ||
select = [ | ||
"F", # Pyflakes | ||
|