Skip to content

Commit

Permalink
add lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Jul 2, 2024
1 parent 54d10fe commit 4e6b150
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ jobs:
cache: true
# auth-host: prefix.dev
# auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
- run: pixi run --environment ${{ matrix.environment }} lint
- run: pixi run --environment ${{ matrix.environment }} test


58 changes: 27 additions & 31 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,38 @@ build-backend = "setuptools.build_meta"

[project]
name = "xarray_subset_grid"
authors = [{ name = "Matthew Iannucci", email = "[email protected]" },
{ name = "Christopher H. Barker", email = "[email protected]" }]
authors = [
{ name = "Matthew Iannucci", email = "[email protected]" },
{ name = "Christopher H. Barker", email = "[email protected]" },
]
description = "Subset Xarray datasets in space"
readme = "README.md"
requires-python = ">=3.10"
keywords = ["xarray"]
license = { file = "LICENSE" }

classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]

dynamic = ["version"]

dependencies = [
"numpy",
"xarray>=2023.10.0",
"cf_xarray",
"numpy",
"xarray>=2023.10.0",
"cf_xarray",
"dask[complete]",
"netcdf4",
]
]

[project.optional-dependencies]
dev = [
Expand All @@ -45,13 +47,7 @@ dev = [
"sphinx",
"sphinx-rtd-theme",
]
examples = [
"fsspec",
"s3fs",
"zarr",
"matplotlib",
"h5netcdf"
]
examples = ["fsspec", "s3fs", "zarr", "matplotlib", "h5netcdf"]

[project.urls]
"Homepage" = "https://github.com/asascience-open/xarray-subset-grid"
Expand All @@ -64,9 +60,7 @@ write_to = "xarray_subset_grid/_version.py"

[tool.ruff]
builtins = ["ellipsis"]
extend-exclude = [
"xarray_subset_grid/_version.py"
]
extend-exclude = ["xarray_subset_grid/_version.py"]
target-version = "py310"
# Use a longer line length.
line-length = 100
Expand All @@ -77,12 +71,12 @@ ignore = [
"E731", # do not assign a lambda expression, use a def
]
select = [
"F", # Pyflakes
"E", # Pycodestyle
"F", # Pyflakes
"E", # Pycodestyle
"W",
"TID", # flake8-tidy-imports (absolute imports)
"I", # isort
"UP", # Pyupgrade
"I", # isort
"UP", # Pyupgrade
]
extend-safe-fixes = [
"TID252", # absolute imports
Expand All @@ -104,7 +98,7 @@ default = { solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }
examples = { features = ["examples"], solve-group = "default" }
all = { features = ["dev", "examples"], solve-group = "default" }
test310 = ["dev", "py310"] # implicit: test310 = ["dev", "py310", "default"]
test310 = ["dev", "py310"] # implicit: test310 = ["dev", "py310", "default"]
test311 = ["dev", "py311"]
test312 = ["dev", "py312"]

Expand Down Expand Up @@ -134,7 +128,9 @@ pytest-cov = "*"
sphinx = "*"
sphinx-rtd-theme = "*"


[tool.pixi.feature.dev.tasks]
lint = "ruff check"
test = "pytest tests/"

[tool.pixi.feature.examples.dependencies]
Expand Down

0 comments on commit 4e6b150

Please sign in to comment.