Skip to content

Commit d5d4fd7

Browse files
Bump to v0.4.0 (#384)
- Bump conda env dependencies and remove unused dependencies - Update GH Actions build workflow with latest dependencies - Fix `mypy` warnings and errors
1 parent e5ef35e commit d5d4fd7

File tree

15 files changed

+136
-108
lines changed

15 files changed

+136
-108
lines changed

.github/workflows/build_workflow.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ jobs:
2626

2727
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
2828
name: Checkout Code Repository
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030

3131
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
32-
name: Set up Python 3.9
33-
uses: actions/setup-python@v2
32+
name: Set up Python 3.10
33+
uses: actions/setup-python@v3
3434
with:
35-
python-version: 3.9
35+
python-version: "3.10"
3636

3737
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
3838
# Run all pre-commit hooks on all the files.
3939
# Getting only staged files can be tricky in case a new PR is opened
4040
# since the action is run on a branch in detached head state
4141
name: Install and Run Pre-commit
42-
uses: pre-commit/action@v2.0.3
42+
uses: pre-commit/action@v3.0.0
4343

4444
build:
4545
name: Build (Python ${{ matrix.python-version }})
@@ -60,11 +60,11 @@ jobs:
6060
do_not_skip: '["push", "workflow_dispatch"]'
6161

6262
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
63-
uses: actions/checkout@v2
63+
uses: actions/checkout@v3
6464

6565
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
6666
name: Cache Conda
67-
uses: actions/cache@v2
67+
uses: actions/cache@v3
6868
env:
6969
# Increase this value to reset cache if conda-env/ci.yml has not changed in the workflow
7070
CACHE_NUMBER: 0
@@ -96,7 +96,7 @@ jobs:
9696
9797
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
9898
name: Upload Coverage Report
99-
uses: codecov/codecov-action@v1
99+
uses: codecov/codecov-action@v3
100100
with:
101101
file: "tests_coverage_reports/coverage.xml"
102102
fail_ci_if_error: true

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: check-yaml
1212

1313
- repo: https://github.com/psf/black
14-
rev: 22.6.0
14+
rev: 22.10.0
1515
hooks:
1616
- id: black
1717

@@ -23,22 +23,22 @@ repos:
2323
# Need to use flake8 GitHub mirror due to CentOS git issue with GitLab
2424
# https://github.com/pre-commit/pre-commit/issues/1206
2525
- repo: https://github.com/pycqa/flake8
26-
rev: 4.0.1
26+
rev: 5.0.4
2727
hooks:
2828
- id: flake8
2929
args: ["--config=setup.cfg"]
3030
additional_dependencies: [flake8-isort]
3131

3232
- repo: https://github.com/pre-commit/mirrors-mypy
33-
rev: v0.971
33+
rev: v0.990
3434
hooks:
3535
- id: mypy
3636
args: ["--config=setup.cfg"]
3737
additional_dependencies:
3838
[
39-
dask==2022.7.1,
40-
numpy==1.22.4,
41-
pandas==1.4.3,
42-
xarray==2022.6.0,
39+
dask==2022.10.2,
40+
numpy==1.23.4,
41+
pandas==1.5.1,
42+
xarray==2022.11.0,
4343
types-python-dateutil==2.8.19,
4444
]

HISTORY.rst

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,79 @@
22
History
33
=======
44

5+
v0.4.0 (9 November 2022)
6+
--------------------------
7+
8+
This minor release includes a feature update to support datasets that
9+
have *N* dimensions mapped to *N* coordinates to represent an axis. This
10+
means ``xcdat`` APIs are able to intelligently select which axis's
11+
coordinates and bounds to work with if multiple are present within the
12+
dataset. Decoding time is now a lazy operation, leading to significant
13+
upfront runtime improvements when opening datasets with
14+
``decode_times=True``.
15+
16+
A new notebook called “A Gentle Introduction to xCDAT” was added to the
17+
documentation gallery to help guide new xarray/xcdat users. xCDAT is now
18+
hosted on Zenodo with a DOI for citations.
19+
20+
There are various bug fixes for bounds, naming of spatial weights, and a
21+
missing flag for ``xesmf`` that broke curvilinear regridding.
22+
23+
Features
24+
~~~~~~~~
25+
26+
- Support for N axis dimensions mapped to N coordinates by
27+
`Tom Vo`_ and `Stephen Po-Chedley`_ in
28+
https://github.com/xCDAT/xcdat/pull/343
29+
30+
- Rename ``get_axis_coord()`` to ``get_dim_coords()`` and
31+
``get_axis_dim()`` to ``get_dim_keys()``
32+
- Update spatial and temporal accessor class methods to refer to the
33+
dimension coordinate variable on the data_var being operated on,
34+
rather than the parent dataset
35+
36+
- Decoding times (``decode_time()``) is now a lazy operation, which
37+
results in significant runtime improvements by `Tom Vo`_ in
38+
https://github.com/xCDAT/xcdat/pull/343
39+
40+
Bug Fixes
41+
~~~~~~~~~
42+
43+
- Fix ``add_bounds()`` not ignoring 0-dim singleton coords by
44+
`Tom Vo`_ and `Stephen Po-Chedley`_ in
45+
https://github.com/xCDAT/xcdat/pull/343
46+
- Fix name of spatial weights with singleton coord by `Tom Vo`_ in
47+
https://github.com/xCDAT/xcdat/pull/379
48+
- Fixes ``xesmf`` flag that was missing which broke curvilinear
49+
regridding by `Jason Boutte`_ and `Stephen Po-Chedley`_ in
50+
https://github.com/xCDAT/xcdat/pull/374
51+
52+
Documentation
53+
~~~~~~~~~~~~~
54+
55+
- Add FAQs section for temporal metadata by `Tom Vo`_ in
56+
https://github.com/xCDAT/xcdat/pull/383
57+
- Add gentle introduction notebook by `Tom Vo`_ in
58+
https://github.com/xCDAT/xcdat/pull/373
59+
- Link repo to Zenodo and upload GitHub releases by `Tom Vo`_ in
60+
https://github.com/xCDAT/xcdat/pull/367
61+
- Update project overview, FAQs, and add a link to xarray tutorials by
62+
`Tom Vo`_ in https://github.com/xCDAT/xcdat/pull/365
63+
- Update feature list, add metadata interpretation to FAQs, and add
64+
``ipython`` syntax highlighting for notebooks by `Tom Vo`_ in
65+
https://github.com/xCDAT/xcdat/pull/362
66+
67+
DevOps
68+
~~~~~~
69+
70+
- Update release-drafter template by `Tom Vo`_ in
71+
https://github.com/xCDAT/xcdat/pull/371 and
72+
https://github.com/xCDAT/xcdat/pull/370
73+
- Automate release notes generation by `Tom Vo`_ in
74+
https://github.com/xCDAT/xcdat/pull/368
75+
76+
**Full Changelog**: https://github.com/xCDAT/xcdat/compare/v0.3.3...v0.4.0
77+
578
v0.3.3 (12 October 2022)
679
------------------------
780

conda-env/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies:
1414
- dask
1515
- esmpy
1616
- netcdf4
17-
- numba >=0.55.2 # TODO: Remove this pin once `numba` is properly patched with `numpy` compatability.
1817
- numpy
1918
- pandas
2019
- xarray

conda-env/dev.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ dependencies:
88
# Base
99
# ==================
1010
# NOTE: If versions are updated, also `additional_dependencies` list for mypy in `.pre-commit-config.yaml`
11-
- python=3.9.13 # TODO: Update to >=3.10 once sphinxcontrib-napoleon supports it.
12-
- pip=22.2.2
11+
- python=3.10.6
12+
- pip=22.3.1
1313
- cf_xarray=0.7.4
14-
- cftime=1.6.1
15-
- dask=2022.8.0
16-
- netcdf4=1.6.0
17-
- numba=0.55.2 # TODO: Remove this pin once `numba` is properly patched with `numpy` compatibility.
18-
- numpy=1.22.4
19-
- pandas=1.4.3
14+
- cftime=1.6.2
15+
- dask=2022.10.2
16+
- netcdf4=1.6.1
17+
- numpy=1.23.4
18+
- pandas=1.5.1
2019
- python-dateutil=2.8.2
21-
- xarray=2022.6.0
20+
- xarray=2022.11.0
2221
# ==================
2322
# Optional
2423
# ==================
@@ -27,32 +26,32 @@ dependencies:
2726
# Documentation
2827
# ==================
2928
- sphinx=4.5.0
30-
- sphinxcontrib-napoleon=0.7
3129
- sphinx-autosummary-accessors=2022.4.0
3230
- sphinx-book-theme=0.3.3
3331
- sphinx-copybutton=0.5.0
3432
- nbsphinx=0.8.9
35-
- pandoc=2.19
33+
- pandoc=2.19.2
34+
- ipython=8.5.0 # Required for nbsphinx syntax highlighting
3635
# ==================
3736
# Quality Assurance
3837
# ==================
3938
# NOTE: If versions are updated, also update 'rev' in `.pre-commit.config.yaml`
40-
- black=22.6.0
39+
- black=22.10.0
4140
- flake8=5.0.4
42-
- flake8-isort=4.2.0
41+
- flake8-isort=5.0.0
4342
- isort=5.10.1
44-
- mypy=0.971
43+
- mypy=0.990
4544
- pre-commit=2.20.0
4645
- types-python-dateutil=2.8.19
4746
# ==================
4847
# Testing
4948
# ==================
50-
- pytest=7.1.2
51-
- pytest-cov=3.0.0
49+
- pytest=7.2.0
50+
- pytest-cov=4.0.0
5251
# ==================
5352
# Developer Tools
5453
# ==================
55-
- matplotlib=3.5.2
56-
- jupyterlab=3.4.5
54+
- matplotlib=3.6.2
55+
- jupyterlab=3.5.0
5756
- tbump=6.9.0
5857
prefix: /opt/miniconda3/envs/xcdat_dev

conda-env/dev_min.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

conda-env/readthedocs.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,32 @@ dependencies:
77
# Base
88
# ==================
99
# NOTE: If versions are updated, also `additional_dependencies` list for mypy in `.pre-commit-config.yaml`
10-
- python=3.9.13 # TODO: Update to >=3.10 once sphinxcontrib-napoleon supports it.
11-
- pip=22.2.2
10+
- python=3.10.6
11+
- pip=22.3.1
1212
- cf_xarray=0.7.4
13-
- cftime=1.6.1
14-
- dask=2022.8.0
15-
- netcdf4=1.6.0
16-
- numba=0.55.2 # TODO: Remove this pin once `numba` is properly patched with `numpy` compatibility.
17-
- numpy=1.22.4
18-
- pandas=1.4.3
13+
- cftime=1.6.2
14+
- dask=2022.10.2
15+
- netcdf4=1.6.1
16+
- numpy=1.23.4
17+
- pandas=1.5.1
1918
- python-dateutil=2.8.2
20-
- types-python-dateutil=2.8.19
21-
- xarray=2022.6.0
19+
- xarray=2022.11.0
2220
# ==================
2321
# Optional
2422
# ==================
2523
- xesmf=0.6.3
2624
# ==================
25+
# ==================
26+
# Quality Assurance
27+
# ==================
28+
- types-python-dateutil=2.8.19
2729
# Documentation
2830
# ==================
2931
- sphinx=4.5.0
30-
- sphinxcontrib-napoleon=0.7
3132
- sphinx-autosummary-accessors=2022.4.0
3233
- sphinx-book-theme=0.3.3
3334
- sphinx-copybutton=0.5.0
3435
- nbsphinx=0.8.9
3536
- pandoc=2.19
36-
- ipython=8.5.0 # Required for nbsphinx syntax highlighting.
37+
- ipython=8.5.0 # Required for nbsphinx syntax highlighting.
3738
prefix: /opt/miniconda3/envs/xcdat_rtd

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
extensions = [
3838
"sphinx.ext.autodoc",
3939
"sphinx.ext.autosummary",
40-
"sphinx_autosummary_accessors",
40+
"sphinx.ext.napoleon",
4141
"sphinx.ext.viewcode",
42+
"sphinx_autosummary_accessors",
4243
"sphinx_copybutton",
43-
"sphinxcontrib.napoleon",
4444
"nbsphinx",
4545
]
4646

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ exclude =
4646
venv
4747

4848
[mypy]
49-
python_version = 3.9
49+
python_version = 3.10
5050
check_untyped_defs = True
5151
ignore_missing_imports = True
5252
warn_unused_ignores = True

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@
3535
test_suite="tests",
3636
tests_require=test_requires,
3737
url="https://github.com/xCDAT/xcdat",
38-
version="0.3.3",
38+
version="0.4.0",
3939
zip_safe=False,
4040
)

0 commit comments

Comments
 (0)