Skip to content

Commit ce61e14

Browse files
minor cleanup of README.
1 parent 78f7c65 commit ce61e14

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,37 @@ Subset Xarray datasets in space while retaining the original grid for complex gr
44

55
## Installation
66

7-
### `pip compatible`
7+
### `pip`
88

99
This package is available on pypi:
1010

1111
```
1212
python -m pip install xarray-subset-grid
1313
```
1414

15-
And also on conda-forge:
15+
### conda / pixi
16+
17+
This package is available on conda-forge:
1618

1719
```
1820
conda install -c conda-forge xarray-subset-grid
1921
```
2022

2123
## Usage
2224

23-
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:
25+
This package is designed to be used in conjunction with [`xarray`](https://xarray.dev/).
26+
Given a [CF Compliant](https://cfconventions.org/) `xarray` dataset named `ds`, this package can be accessed using the `xsg` accessor:
2427

2528
```python
29+
2630
import numpy as np
2731

28-
# Get the interpreted grid class
32+
# xarray_subset_gris should detect the grid type.
33+
# To check what it found:
2934
grid = ds.xsg
3035

31-
# subset to only include temperature
36+
# subsetting to include only certain variables:
37+
# Only temperature
3238
ds_temp = ds.xsg.subset_vars(["temp"])
3339

3440
# subset by bounding box
@@ -47,11 +53,12 @@ poly = np.array(
4753
ds_subset_poly = ds.xsg.subset_polygon(poly)
4854
```
4955

50-
For full usage, see the [example notebooks](https://github.com/ioos/xarray-subset-grid/tree/main/docs/examples) and the [Sphinx documentation on Read the Docs](https://xarray-subset-grid.readthedocs.io/).
56+
For full usage, see the [example notebooks](https://github.com/ioos/xarray-subset-grid/tree/main/docs/examples)
57+
and the [Sphinx documentation on Read the Docs](https://xarray-subset-grid.readthedocs.io/).
5158

5259
## Development
5360

54-
### `pip compatible`
61+
### `pip`
5562

5663
First, create a new `virtualenv` and activate it:
5764

@@ -109,13 +116,14 @@ pixi run -e test312 test
109116
Options are: `test310` `test311` `test312` `test313`
110117

111118

112-
To run a shell to do dev work:
119+
To run a shell to do development work:
113120

114121
```bash
115122
pixi shell -e dev
116123
```
117124

118-
To run a shell in which you can run the examples (notebooks and al that):
125+
To run a shell in which you can run the examples
126+
(notebooks and all that):
119127

120128
```bash
121129
pixi shell -e examples
@@ -127,10 +135,11 @@ To run a shell with everything (dev and example deps:
127135
pixi shell -e all
128136
```
129137

130-
Finally, to when the `pyproject.toml` is updated, be sure to update the `pixi` lockfile:
138+
Finally, when the `pixi.toml` file is updated,
139+
be sure to update the `pixi` lockfile:
131140

132141
```bash
133-
pixi install
142+
pixi update
134143
```
135144

136145
### `conda`

0 commit comments

Comments
 (0)