From 870b334af2a7aac6f5b9e5004b64cb97373b9726 Mon Sep 17 00:00:00 2001 From: Tom Vo Date: Fri, 7 Jul 2023 10:58:39 -0700 Subject: [PATCH] Bump to 0.6.0rc1 (#515) --- .github/workflows/build_workflow.yml | 24 +++++++++++++----------- README.rst | 28 +++++++++++++++++++--------- docs/index.rst | 28 +++++++++++++++++++--------- setup.py | 2 +- tbump.toml | 2 +- xcdat/__init__.py | 2 +- xcdat/bounds.py | 4 ++-- xcdat/temporal.py | 10 +++++----- 8 files changed, 61 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml index 73391e1c..fa8f6038 100644 --- a/.github/workflows/build_workflow.yml +++ b/.github/workflows/build_workflow.yml @@ -24,17 +24,17 @@ jobs: cancel_others: ${{ env.CANCEL_OTHERS }} paths_ignore: ${{ env.PATHS_IGNORE }} - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} name: Checkout Code Repository uses: actions/checkout@v3 - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} name: Set up Python 3.10 uses: actions/setup-python@v3 with: python-version: "3.10" - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} # Run all pre-commit hooks on all the files. # Getting only staged files can be tricky in case a new PR is opened # since the action is run on a branch in detached head state @@ -59,10 +59,10 @@ jobs: paths_ignore: ${{ env.PATHS_IGNORE }} do_not_skip: '["push", "workflow_dispatch"]' - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} uses: actions/checkout@v3 - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} name: Set up Conda Environment uses: conda-incubator/setup-miniconda@v2 with: @@ -77,13 +77,13 @@ jobs: # Refresh the cache every 24 hours to avoid inconsistencies of package versions # between the CI pipeline and local installations. - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} id: get-date name: Get Date run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT shell: bash - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} id: cache name: Cache Conda env uses: actions/cache@v3 @@ -96,25 +96,27 @@ jobs: # Increase this value to reset cache if conda-env/ci.yml has not changed in the workflow CACHE_NUMBER: 0 - - if: $${{ steps.skip_check.outputs.should_skip != 'true' || steps.cache.outputs.cache-hit != 'true' }} + - if: | + steps.skip_check.outputs.should_skip == 'false' && + steps.cache.outputs.cache-hit == 'false' name: Update environment run: | mamba env update -n xcdat_ci -f conda-env/ci.yml # Make sure the Python version in the env matches the current matrix version. mamba install -c conda-forge python=${{ matrix.python-version }} - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} name: Install xcdat # Source: https://github.com/conda/conda-build/issues/4251#issuecomment-1053460542 run: | python -m pip install --no-build-isolation --no-deps -e . - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} name: Run Tests run: | pytest - - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + - if: ${{ steps.skip_check.outputs.should_skip == 'false' }} name: Upload Coverage Report uses: codecov/codecov-action@v3 with: diff --git a/README.rst b/README.rst index 6c8eff09..894a6bd7 100644 --- a/README.rst +++ b/README.rst @@ -70,7 +70,7 @@ robust analysis of climate data. xCDAT's design philosophy is focused on reducin overhead required to accomplish certain tasks in xarray. xCDAT aims to be compatible with structured grids that are `CF-compliant`_ (e.g., CMIP6). Some key xCDAT features are inspired by or ported from the core CDAT library, while others leverage powerful -libraries in the xarray ecosystem (e.g., `xESMF`_ and `cf_xarray`_) to deliver +libraries in the xarray ecosystem (e.g., `xESMF`_, `xgcm`_, `cf_xarray`_) to deliver robust APIs. The xCDAT core team's mission is to provide a maintainable and extensible package @@ -123,8 +123,8 @@ For more instructions on how to contribute, please checkout our `Contributing Gu .. _GitHub Issue Tracker: https://github.com/xCDAT/xcdat/issues .. _Contributing Guide: https://xcdat.readthedocs.io/en/stable/contributing.html -Available Features ------------------- +Features +-------- * Extension of xarray's ``open_dataset()`` and ``open_mfdataset()`` with post-processing options @@ -153,15 +153,13 @@ Available Features * Horizontal structured regridding * Supports rectilinear and curvilinear grids - * Python implementation of `regrid2`_ for handling cartesian latitude longitude grids - * API that wraps `xESMF`_ - -Planned Features ----------------- + * Extends the `xESMF`_ horizontal regridding API + * Python implementation of `regrid2`_ for handling cartesian latitude longitude grids * Vertical structured regridding * Support rectilinear and curvilinear grids + * Extends the `xgcm`_ vertical regridding API Things We Are Striving For -------------------------- @@ -184,8 +182,9 @@ Things We Are Striving For * Support for parallelism using `dask`_ where it is both possible and makes sense .. _Metadata Interpretation: https://xcdat.readthedocs.io/en/stable/faqs.html#metadata-interpretation -.. _regrid2: https://cdms.readthedocs.io/en/latest/regrid2.html .. _xESMF: https://pangeo-xesmf.readthedocs.io/en/latest/ +.. _regrid2: https://cdms.readthedocs.io/en/latest/regrid2.html +.. _xgcm: https://xgcm.readthedocs.io/en/latest/index.html .. _dask: https://dask.org/ .. _cf_xarray: https://cf-xarray.readthedocs.io/en/latest/index.html .. _CF convention: http://cfconventions.org/ @@ -205,6 +204,17 @@ Subscribe to our `mailing list`_ to stay notified of new releases. .. _conda-forge: https://anaconda.org/conda-forge/xcdat .. _GitHub Releases: https://anaconda.org/conda-forge/xcdat +Useful Resources +----------------- + +We highly encourage you to checkout the awesome resources below to learn more about +Xarray and Xarray usage in climate science! + +- `Official Xarray Tutorials `_ +- `Xarray GitHub Discussion Forum `_ +- `Pangeo Forum `_ +- `Project Pythia `_ + Acknowledgement --------------- diff --git a/docs/index.rst b/docs/index.rst index 2c5bea2b..f851a5dd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -20,7 +20,7 @@ robust analysis of climate data. xCDAT's design philosophy is focused on reducin overhead required to accomplish certain tasks in xarray. xCDAT aims to be compatible with structured grids that are `CF-compliant`_ (e.g., CMIP6). Some key xCDAT features are inspired by or ported from the core CDAT library, while others leverage powerful -libraries in the xarray ecosystem (e.g., `xESMF`_ and `cf_xarray`_) to deliver +libraries in the xarray ecosystem (e.g., `xESMF`_, `xgcm`_, `cf_xarray`_) to deliver robust APIs. The xCDAT core team's mission is to provide a maintainable and extensible package @@ -73,8 +73,8 @@ For more instructions on how to contribute, please checkout our `Contributing Gu .. _GitHub Issue Tracker: https://github.com/xCDAT/xcdat/issues .. _Contributing Guide: https://xcdat.readthedocs.io/en/stable/contributing.html -Available Features ------------------- +Features +-------- * Extension of xarray's ``open_dataset()`` and ``open_mfdataset()`` with post-processing options @@ -103,15 +103,13 @@ Available Features * Horizontal structured regridding * Supports rectilinear and curvilinear grids - * Python implementation of `regrid2`_ for handling cartesian latitude longitude grids - * API that wraps `xESMF`_ - -Planned Features ----------------- + * Extends the `xESMF`_ horizontal regridding API + * Python implementation of `regrid2`_ for handling cartesian latitude longitude grids * Vertical structured regridding * Support rectilinear and curvilinear grids + * Extends the `xgcm`_ vertical regridding API Things We Are Striving For -------------------------- @@ -134,8 +132,9 @@ Things We Are Striving For * Support for parallelism using `dask`_ where it is both possible and makes sense .. _Metadata Interpretation: https://xcdat.readthedocs.io/en/stable/faqs.html#metadata-interpretation -.. _regrid2: https://cdms.readthedocs.io/en/latest/regrid2.html .. _xESMF: https://pangeo-xesmf.readthedocs.io/en/latest/ +.. _regrid2: https://cdms.readthedocs.io/en/latest/regrid2.html +.. _xgcm: https://xgcm.readthedocs.io/en/latest/index.html .. _dask: https://dask.org/ .. _cf_xarray: https://cf-xarray.readthedocs.io/en/latest/index.html .. _CF convention: http://cfconventions.org/ @@ -155,6 +154,17 @@ Subscribe to our `mailing list`_ to stay notified of new releases. .. _conda-forge: https://anaconda.org/conda-forge/xcdat .. _GitHub Releases: https://anaconda.org/conda-forge/xcdat +Useful Resources +----------------- + +We highly encourage you to checkout the awesome resources below to learn more about +Xarray and Xarray usage in climate science! + +- `Official Xarray Tutorials `_ +- `Xarray GitHub Discussion Forum `_ +- `Pangeo Forum `_ +- `Project Pythia `_ + Acknowledgement --------------- diff --git a/setup.py b/setup.py index ae595191..930448ea 100755 --- a/setup.py +++ b/setup.py @@ -35,6 +35,6 @@ test_suite="tests", tests_require=test_requires, url="https://github.com/xCDAT/xcdat", - version="0.5.0", + version="0.6.0rc1", zip_safe=False, ) diff --git a/tbump.toml b/tbump.toml index 1b8e29ed..b7dc8c9c 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/xCDAT/xcdat" [version] -current = "0.5.0" +current = "0.6.0rc1" # Example of a semver regexp. # Make sure this matches current_version before diff --git a/xcdat/__init__.py b/xcdat/__init__.py index eaf059c6..39c183e2 100644 --- a/xcdat/__init__.py +++ b/xcdat/__init__.py @@ -20,4 +20,4 @@ from xcdat.temporal import TemporalAccessor # noqa: F401 from xcdat.utils import compare_datasets # noqa: F401 -__version__ = "0.5.0" +__version__ = "0.6.0rc1" diff --git a/xcdat/bounds.py b/xcdat/bounds.py index d6a6ba3c..638967ab 100644 --- a/xcdat/bounds.py +++ b/xcdat/bounds.py @@ -244,8 +244,8 @@ def get_bounds( f"No bounds data variables were found for the '{axis}' axis. Make sure " "the dataset has bound data vars and their names match the 'bounds' " "attributes found on their related time coordinate variables. " - "Alternatively, you can add bounds with `xcdat.add_missing_bounds` " - "or `xcdat.add_bounds`." + "Alternatively, you can add bounds with `ds.bounds.add_missing_bounds()` " + "or `ds.bounds.add_bounds()`." ) bounds: Union[xr.Dataset, xr.DataArray] = self._dataset[ diff --git a/xcdat/temporal.py b/xcdat/temporal.py index c2d47311..cbc8b54b 100644 --- a/xcdat/temporal.py +++ b/xcdat/temporal.py @@ -290,7 +290,7 @@ def group_average( >>> custom_seasons = [ >>> ["Jan", "Feb", "Mar"], # "JanFebMar" >>> ["Apr", "May", "Jun"], # "AprMayJun" - >>> ["Jul", "Aug", "Sep"], # "JunJulAug" + >>> ["Jul", "Aug", "Sep"], # "JulAugSep" >>> ["Oct", "Nov", "Dec"], # "OctNovDec" >>> ] @@ -326,7 +326,7 @@ def group_average( >>> custom_seasons = [ >>> ["Jan", "Feb", "Mar"], # "JanFebMar" >>> ["Apr", "May", "Jun"], # "AprMayJun" - >>> ["Jul", "Aug", "Sep"], # "JunJulAug" + >>> ["Jul", "Aug", "Sep"], # "JulAugSep" >>> ["Oct", "Nov", "Dec"], # "OctNovDec" >>> ] >>> @@ -445,7 +445,7 @@ def climatology( >>> custom_seasons = [ >>> ["Jan", "Feb", "Mar"], # "JanFebMar" >>> ["Apr", "May", "Jun"], # "AprMayJun" - >>> ["Jul", "Aug", "Sep"], # "JunJulAug" + >>> ["Jul", "Aug", "Sep"], # "JulAugSep" >>> ["Oct", "Nov", "Dec"], # "OctNovDec" >>> ] @@ -485,7 +485,7 @@ def climatology( >>> custom_seasons = [ >>> ["Jan", "Feb", "Mar"], # "JanFebMar" >>> ["Apr", "May", "Jun"], # "AprMayJun" - >>> ["Jul", "Aug", "Sep"], # "JunJulAug" + >>> ["Jul", "Aug", "Sep"], # "JulAugSep" >>> ["Oct", "Nov", "Dec"], # "OctNovDec" >>> ] >>> @@ -614,7 +614,7 @@ def departures( >>> custom_seasons = [ >>> ["Jan", "Feb", "Mar"], # "JanFebMar" >>> ["Apr", "May", "Jun"], # "AprMayJun" - >>> ["Jul", "Aug", "Sep"], # "JunJulAug" + >>> ["Jul", "Aug", "Sep"], # "JulAugSep" >>> ["Oct", "Nov", "Dec"], # "OctNovDec" >>> ]