Skip to content
Merged
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML

14 changes: 5 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ jobs:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
environment: [test310, test311, test312, test313]

permissions:
actions: none

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup pixi
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
with:
Expand All @@ -21,11 +25,3 @@ jobs:
- name: Tests
run: >
pixi run --environment ${{ matrix.environment }} test

- name: Lint
if: contains(${{ matrix.os }}, "ubuntu") && ${{ matrix.environment }} == "test310"
run: >
pixi run --environment test310 lint



2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@ xarray_subset_grid/_version.py
.pixi
*.egg-info

.ruff_cache/
.ruff_cache/
55 changes: 55 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-ast
- id: debug-statements
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-added-large-files
exclude_types: [yaml]

- repo: https://github.com/keewis/blackdoc
rev: v0.3.10
hooks:
- id: blackdoc

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
exclude: >
(?x)^(
.*\.ipynb
)$
args:
- --ignore-words-list=astroid,fo

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.13
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.6.0
hooks:
- id: pyproject-fmt

- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.9.0
hooks:
- id: zizmor

ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: []
submodules: false
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ sphinx:

python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
2 changes: 0 additions & 2 deletions DevelopmentNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ First point is not repeated.
Bounding Box:

A tuple of floats: (min_lon, min_lat, max_lon, max_lat).


10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Or clone the project from git and build / install it from there.

## Usage

This package is designed to be used in conjuction with [`xarray`](https://xarray.dev/). Given a [CF Compliant](https://cfconventions.org/) `xarray` dataset named `ds`, this package can be accessed using the `xsg` accessor:
This package is designed to be used in conjunction with [`xarray`](https://xarray.dev/). Given a [CF Compliant](https://cfconventions.org/) `xarray` dataset named `ds`, this package can be accessed using the `xsg` accessor:

```python
# Get the interprested grid class
Expand All @@ -31,9 +31,9 @@ ds_subset_bbox = ds.xsg.subset_bbox([-72, 32, -70, 35])
# or by polygon
poly = np.array([
[-72, 32],
[-72, 33],
[-73, 33],
[-73, 31],
[-72, 33],
[-73, 33],
[-73, 31],
[-72, 32],
])
ds_subset_poly = ds.xsg.subset_polygon(poly)
Expand All @@ -58,7 +58,7 @@ Then install the project in local edit mode:
pip install -e .
```

Once installed, the tests can be run:
Once installed, the tests can be run:

```bash
python -m pytest
Expand Down
1 change: 0 additions & 1 deletion conda_requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ pytest
pytest-cov
sphinx
sphinx-rtd-theme

1 change: 0 additions & 1 deletion docs/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ utils
:members:
:undoc-members:
:show-inheritance:

2 changes: 1 addition & 1 deletion docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

[roms.ipynb](./roms.ipynb): Read and subset [WCOFS](https://tidesandcurrents.noaa.gov/ofs/wcofs/wcofs.html) model data in space and view a plot of the resulting data

[sscofs.ipynb](./sscofs.ipynb): Read [SSCOFS](https://tidesandcurrents.noaa.gov/ofs/dev/sscofs/sscofs_info.html) model data and assign cf compliant topology to allow for subsetting
[sscofs.ipynb](./sscofs.ipynb): Read [SSCOFS](https://tidesandcurrents.noaa.gov/ofs/dev/sscofs/sscofs_info.html) model data and assign cf compliant topology to allow for subsetting
2 changes: 1 addition & 1 deletion docs/examples/RegularGridTHREDDS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"outputs": [],
"source": [
"import xarray as xr\n",
"import xarray_subset_grid\n",
"\n",
"from xarray_subset_grid.utils import format_bytes\n"
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/grids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ UGrid
.. automodule:: xarray_subset_grid.grids.ugrid
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Contents:
design
grids
notebooks
contributing
contributing
3 changes: 1 addition & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Source (Github)
Install `Git <https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>`__
on your system if not already available (check with ``git --version`` at the command line.)

If you are interested in installing xarray-subset-grid from source,
If you are interested in installing xarray-subset-grid from source,
you will first need to get the latest version of the code
::

Expand All @@ -91,4 +91,3 @@ Run the following command from the root-directory
::

pip install .

4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
sphinx
sphinx
sphinx-autodoc-typehints
myst_nb
xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git
sphinxcontrib-bibtex
matplotlib
cf_xarray
xarray
xarray
14 changes: 7 additions & 7 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion profiling/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Use this dir for performance testing and profiling -- code and notes.

Loading
Loading