Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:shom-fr/xoa into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
stefraynaud committed Nov 7, 2023
2 parents f6fb366 + 31965e2 commit 173a071
Show file tree
Hide file tree
Showing 31 changed files with 1,180 additions and 439 deletions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Description

<!-- Explain the problem, what you did, what went wrong and what you expected to happen -->


### Code to reproduce

<!-- Include a maximum of details -->

```python

```

### Versions

<!-- Paste below the output of the commandline script `xoa info versions` -->

```
```

10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Description



# Check list

- [ ] Closes #xxxx
- [ ] Tests added
- [ ] User visible changes (including notable bug fixes) are documented in `CHANGES.rst`
- [ ] New modules are listed in `api.rst`
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
open-pull-requests-limit: 10
6 changes: 3 additions & 3 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Package using Conda
name: CI

on: [push]

Expand All @@ -9,9 +9,9 @@ jobs:
max-parallel: 5

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Add conda to system path
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ version: 2
sphinx:
fail_on_warning: false

# Optionally set the version of Python and requirements required to build your docs
# Install current library
python:
version: 3.7
system_packages: true
install:
- method: pip
path: .

# Build
build:
image: stable
os: "ubuntu-22.04"
tools:
python: "mambaforge-4.10"

# Conda
conda:
Expand Down
159 changes: 69 additions & 90 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,72 +1,83 @@
What's new
##########

Ongoing developments
====================

0.7.1 (2023-07-21)
==================

New features
------------
- Add support for not creating multi-indexes in :func:`xoa.coords.geo_stack`.

Bug fixes
---------
- Fix :func:`xoa.geo.get_distances` that was not able to handle multi-indexes from :func:`xoa.coords.geo_stack`.
- Fix doc generation [:pull:`83`].
- Fix :func:`xoa.sigma.get_cs` to keep it compatible with pure numpy arrays


Documentation
-------------
- Add a link to the github repository.


0.7.0 (2023-07-17)
==================

New features
------------
- Add issue and pull request templates.
- Add the :func:`xoa.filter.smooth` function [:pull:`76`].
- Improved the default `sig` and `std` parameter values for filter windows that accept them [:pull:`76`].
- Add the :func:`xoa.plot.plot_minimap` and :func:`xoa.plot.plot_double_minimap` functions to display the geographic situation of a set of coordinates [:pull:`73`].
- Add support for the `min_extent` keyword to :func:`xoa.geo.get_extent` [:pull:`73`]
- Add dask support to :mod:`xoa.sigma` sigma to depth converters [:pull:`72`].
- Add the :mod:`xoa.num` module that contains low level numeric utilities.
- Add the :func:`xoa.thermdyn.mixed_layer_depth` fonction to compute
the mixed layer depth with three different methods [:pull:`67`].
- Add the :func:`xoa.thermdyn.is_temp` and :func:`xoa.thermdyn.is_dens` functions
to if an array of temperature or density type [:pull:`67`].
- Add `kernel_kwargs` keyword to :func:`xoa.filter.convolve` to better control
the kernel generation by :func:`xoa.filter.generate_kernel` [:pull:`64`].
- Add inference of parameters for some window functions, like the gaussian
shape, in :func:`xoa.filter.get_window_func` [:pull:`64`].
- Add :func:`xoa.regrid.isoslice` based on :func:`xoa.interp.isoslice` core function
[:pull:`63`].
- Add the :func:`xoa.thermdyn.mixed_layer_depth` function to compute the mixed layer depth with three different methods [:pull:`67`, :pull:`75`].
- Add the :func:`xoa.thermdyn.is_temp`, :func:`xoa.thermdyn.is_sal` and :func:`xoa.thermdyn.is_dens` functions to infer if an array of temperature, salinity or density type, and added the related :func:`xoa.thermdyn.get_temp`, :func:`xoa.thermdyn.get_sal` and :func:`xoa.thermdyn.get_dens` function to search in datasets[:pull:`67`, :pull:`79`].
- Add `kernel_kwargs` keyword to :func:`xoa.filter.convolve` to better control the kernel generation by :func:`xoa.filter.generate_kernel` [:pull:`64`].
- Add inference of parameters for some window functions, like the gaussian shape, in :func:`xoa.filter.get_window_func` [:pull:`64`].
- Add :func:`xoa.regrid.isoslice` based on :func:`xoa.interp.isoslice` core function [:pull:`63`].

Breaking changes
----------------
- func:`~xoa.filter.get_window_func` accepts now only one positional argument
and all other arguments must be named.
- :func:`~xoa.filter.get_window_func` now accepts only one positional argument and all other arguments must be named.

Bug fixes
---------
- Fix :func:`xoa.cfgm.is_boolstr` which now supports the new :mod:`configobj`.
- Fix broadcasting :mod:`xoa.interp` 1d interpolation routines [:issue:`69`].
- Fix :func:`xoa.sigma.get_sigma_terms` so that it works in case of multiple levels coordinates [:pull:`60`].
- Fix :func:`xoa.grid.to_rect` that now infers coordinates and can emit a warning or raise an error.

Documentation
-------------
- Add an example of `xoa.thermdyn.mixed_layer_depth` to
:ref:`sphx_glr_examples_plot_croco_section.py` example [:pull:`67`].
- Add an example of `xoa.plot.plot_double_minimap` to :ref:`sphx_glr_examples_plot_mercator_argo.py` and :ref:`sphx_glr_examples_plot_hycom_gdp.py` examples [:pull:`73`].
- Add an example of `xoa.thermdyn.mixed_layer_depth` to :ref:`sphx_glr_examples_plot_croco_section.py` example [:pull:`67`].


0.6.1 (2022-02-24)
==================

New features
------------
- Add a warning to :func:`xoa.open_data_sample` that is emitted when the request edfile
is not an internal data sample [:pull:`47`].
- Add the :func:`xoa.plot.add_shadow`, :func:`xoa.plot.add_glow` and
:func:`xoa.plot.add_lightshading` function to add path effects to plots [:pull:`44`].
- Add a warning to :func:`xoa.open_data_sample` that is emitted when the requested file is not an internal data sample [:pull:`47`].
- Add the :func:`xoa.plot.add_shadow`, :func:`xoa.plot.add_glow` and :func:`xoa.plot.add_lightshading` function to add path effects to plots [:pull:`44`].
- Add the :func:`xoa.plot.plot_ts` function to make T-S diagrams [:pull:`43`].
- Add the :func:`xoa.filter.demerliac` function to apply a Dermerliac filter
to time serie [:pull:`41`].
- Add support for fine tuning masking in :func:`xoa.filter.convolve` through the `na_thres`
parameter [:pull:`41`].
- Add the :func:`xoa.geo.cdist` and :func:`xoa.geo.pdist` functions to compute
haversine distances respectively between two dataset and with a dataset [:pull:`40`].
- Add the :func:`xoa.coords.geo_stack` function to stack longitudes and latitudes
into another dimension, in a dataset or data array [:pull:`40`].
- Add the :func:`xoa.filter.decimate` function to crudely undersample a geographic
dataset or data array with a radius of proximity [:pull:`40`].
- Add the :func:`xoa.geo.get_distances` to compute the Haversine distances between
locations inside a single dataset or between txo datasets [:pull:`40`].
- Add the :func:`xoa.filter.demerliac` function to apply a Dermerliac filter to time serie [:pull:`41`].
- Add support for fine tuning masking in :func:`xoa.filter.convolve` through the `na_thres` parameter [:pull:`41`].
- Add the :func:`xoa.geo.cdist` and :func:`xoa.geo.pdist` functions to compute haversine distances respectively between two dataset and with a dataset [:pull:`40`].
- Add the :func:`xoa.coords.geo_stack` function to stack longitudes and latitudes into another dimension, in a dataset or data array [:pull:`40`].
- Add the :func:`xoa.filter.decimate` function to crudely undersample a geographic dataset or data array with a radius of proximity [:pull:`40`].
- Add the :func:`xoa.geo.get_distances` to compute the Haversine distances between locations inside a single dataset or between txo datasets [:pull:`40`].
- Add the :func:`xoa.krig.empirical_variogram` function to estimate variogram parameters.
- Add the :class:`xoa.krig.VariogramModel` to manage a variogram model [:pull:`40`].
- Add the :class:`xoa.krig.Kriger` and :func:`xoa.krig.krig` to perform kriging [:pull:`40`].
- Add the `exclude` option to data var and coordinate specifications of
:class:`xoa.cf.CFSpecs` instances [:pull:`38`].
- Add the `exclude` option to data var and coordinate specifications of :class:`xoa.cf.CFSpecs` instances [:pull:`38`].

Breaking changes
----------------
- A single Nan now contaminates the data over the kernel emprise in :func:`xoa.filter.convolve`
since `na_thres` is set to zero by default [:pull:`40`].
- A single Nan now contaminates the data over the kernel emprise in :func:`xoa.filter.convolve` since `na_thres` is set to zero by default [:pull:`40`].
- xoa now requires the :mod:`gsw` package.

Bug fixes
Expand Down Expand Up @@ -104,33 +115,23 @@ Bug fixes

New features
------------
- Add the `hlocs` argument to :func:`xoa.sigma.get_sigma_terms`
and :func:`xoa.sigma.decode_cf_sigma` to decode at several horizontal
staggered grid locations [:pull:`34`].
- Add the `edges` argument to :func:`xoa.regrid.regrid1d` to manually specify
the edges that are used by the "cellave" regridding method [:pull:`34`].
- Add back the `loc` argument to the formatting methods of :mod:`xoa.cf`
[:pull:`34`].
- Add dimension checking and support for dask arrays in :mod:`xoa.sigma`
[:pull:`34`].
- Expose a few options of :meth:`xoa.cfgm.ConfigManager` to the
:func:`xoa.cfgm.cfgargparse` function.
- Add the :confval:`cfgm_cfg_file` sphinx configuration option
to save the default configuration of a :meth:`xoa.cfgm.ConfigManager`.
- Add the `hlocs` argument to :func:`xoa.sigma.get_sigma_terms` and :func:`xoa.sigma.decode_cf_sigma` to decode at several horizontal staggered grid locations [:pull:`34`].
- Add the `edges` argument to :func:`xoa.regrid.regrid1d` to manually specify the edges that are used by the "cellave" regridding method [:pull:`34`].
- Add back the `loc` argument to the formatting methods of :mod:`xoa.cf` [:pull:`34`].
- Add dimension checking and support for dask arrays in :mod:`xoa.sigma` [:pull:`34`].
- Expose a few options of :meth:`xoa.cfgm.ConfigManager` to the :func:`xoa.cfgm.cfgargparse` function.
- Add the :confval:`cfgm_cfg_file` sphinx configuration option to save the default configuration of a :meth:`xoa.cfgm.ConfigManager`.

Bug fixes
---------
- Fix :func:`xoa.regrid.regrid1d` with "cellave" method [:pull:`34`].
- Fix :meth:`xoa.cf.CFSpecs.get_location_mapping` for coordinates that have
no axis attribute specifications [:pull:`34`].
- Fix :func:`xoa.grid.dz2depth` that was not working properly with 4D+ arrays
[:pull:`34`].
- Fix :meth:`xoa.cf.CFSpecs.get_location_mapping` for coordinates that have no axis attribute specifications [:pull:`34`].
- Fix :func:`xoa.grid.dz2depth` that was not working properly with 4D+ arrays [:pull:`34`].


Breaking changes
----------------
- The `loc` argument of :func:`xoa.sigma.get_sigma_terms` is renamed `vloc`
[:pull:`34`].
- The `loc` argument of :func:`xoa.sigma.get_sigma_terms` is renamed `vloc` [:pull:`34`].


0.4.0 (2021-09-02)
Expand All @@ -139,63 +140,47 @@ Breaking changes
New features
------------
- :meth:`xoa.cf.CFSpecs.decode` better supports staggered grids.
- :meth:`xoa.cf.CFSpecs.search_dim` supports generic names in addition
to dimension types as second argument.
- Add the :meth:`xoa.cf.CFSpecs.match_dim` method to check if a given
dimension name is known.
- Add the :meth:`~xoa.cf.CFSpecs.reloc` and :meth:`~xoa.cf.CFSpecs.to_loc` methods
to :class:`xoa.cf.CFSpecs` for quickly changing the staggered grid indicators
in names.
- Add the :meth:`xoa.cf.SGLocator.add_loc` method to quickly change the location
markers in a data array.
- :meth:`xoa.cf.CFSpecs.search_dim` supports generic names in addition to dimension types as second argument.
- Add the :meth:`xoa.cf.CFSpecs.match_dim` method to check if a given dimension name is known.
- Add the :meth:`~xoa.cf.CFSpecs.reloc` and :meth:`~xoa.cf.CFSpecs.to_loc` methods to :class:`xoa.cf.CFSpecs` for quickly changing the staggered grid indicators in names.
- Add the :meth:`xoa.cf.SGLocator.add_loc` method to quickly change the location markers in a data array.

Breaking changes
----------------
- :func:`xoa.coords.get_dims` is renamed to :func:`xoa.coords.get_cf_dims`.
- The `name` argument of :class:`xoa.cf.CFSpecs` methods is renamed to `cf_name`,
and the `dim_type(s)` argument is renamed to `cf_arg(s)`.
- :meth:`xoa.cf.SGLocator.get_location` is renamed to
:meth:`~xoa.cf.SGLocator.get_loc_from_da` and the :meth:`~xoa.cf.SGLocator.get_loc` is added.
- The `name` argument of :class:`xoa.cf.CFSpecs` methods is renamed to `cf_name`, and the `dim_type(s)` argument is renamed to `cf_arg(s)`.
- :meth:`xoa.cf.SGLocator.get_location` is renamed to :meth:`~xoa.cf.SGLocator.get_loc_from_da` and the :meth:`~xoa.cf.SGLocator.get_loc` is added.

Bug fixes
---------
- Fix the output formatting of :func:`xoa.grid.dz2depth`.

Documentation
-------------
- The :ref:`uses.cf` section and :ref:`sphx_glr_examples_plot_hycom_gdp.py` example
are adapted to reflect changes.
- The :ref:`uses.cf` section and :ref:`sphx_glr_examples_plot_hycom_gdp.py` example are adapted to reflect changes.


v0.3.1 (2021-05-21)
===================

New features
------------

- Add an `autolim` keyword to :func:`xoa.plot.plot_flow` to speedup
the processing with cartopy maps.
- Add an `autolim` keyword to :func:`xoa.plot.plot_flow` to speedup the processing with cartopy maps.

Breaking changes
----------------

- Rename the `cf` and `sigma` keyword of :func:`xoa.register_accessors`
respectively to `xcf` and `decode_sigma` to match the default
name of accessors.
- Rename the `cf` and `sigma` keyword of :func:`xoa.register_accessors` respectively to `xcf` and `decode_sigma` to match the default name of accessors.
- Rename the `sigma` accessor to `decode_sigma`.

Bug fixes
---------

- Fix the access to the xoa executable on windows.
- Fix the minimal version for xarray [:pull:`23`].

Documentation
-------------

- Add a "How to start" section.
- Accessors are now documented separately with `sphinx-autosummary-accessors`
[:pull:`20`].
- Accessors are now documented separately with `sphinx-autosummary-accessors` [:pull:`20`].
- The Hycom-GDP example now uses :func:`xoa.plot.plot_flow`.


Expand All @@ -204,21 +189,15 @@ v0.3.0 (2021-05-12)

New features
------------

- Add the :func:`xoa.plot.plot_flow` function [:pull:`9`].
- Improve :func:`xoa.coords.get_depth` so that it can compute
depth from sigma coordinates or layer thinknesses [:pull:`8`].
- Improve :func:`xoa.coords.get_depth` so that it can compute depth from sigma coordinates or layer thinknesses [:pull:`8`].
- Add the :func:`xoa.dyn.flow2d` function [:pull:`7`].
- Add the :func:`xoa.regrid.extrap1d` function.
- Add the :func:`xoa.filter.erode_coast` function which is specialized version
of the :func:`xoa.filter.erode_mask` for horizontal data.
- Add the :func:`xoa.coords.get_xdim`, :func:`~xoa.coords.get_ydim`,
:func:`~xoa.coords.get_zdim`, :func:`~xoa.coords.get_tdim` and
:func:`~xoa.coords.get_fdim` for quickly finding standard dimensions.
- Add the :func:`xoa.filter.erode_coast` function which is specialized version of the :func:`xoa.filter.erode_mask` for horizontal data.
- Add the :func:`xoa.coords.get_xdim`, :func:`~xoa.coords.get_ydim`, :func:`~xoa.coords.get_zdim`, :func:`~xoa.coords.get_tdim` and :func:`~xoa.coords.get_fdim` for quickly finding standard dimensions.

Bug fixes
---------

- Fix u and v CF config [:pull:`6`]


Expand Down

0 comments on commit 173a071

Please sign in to comment.