diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6bc65ab..3f5d07e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,7 +6,6 @@ - [ ] (If applicable) Documentation has been added / updated (for bug fixes / features). - [ ] (If applicable) Tests have been added. - [ ] CHANGELOG.rst has been updated (with summary of main changes). - - [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`) has been added. ### What kind of change does this PR introduce? diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef50cea..9347bb9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,10 +13,22 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer + exclude: '.ipynb' + - id: fix-byte-order-marker + - id: name-tests-test + args: [ '--pytest-test-first' ] + - id: no-commit-to-branch + args: [ '--branch', 'main' ] - id: check-docstring-first + - id: check-merge-conflict - id: check-json - - id: check-yaml - id: check-toml + - id: check-yaml + args: [ '--allow-multiple-documents' ] + - id: debug-statements + - id: pretty-format-json + args: [ '--autofix', '--no-ensure-ascii', '--no-sort-keys' ] + exclude: '.ipynb' - repo: https://github.com/pappasam/toml-sort rev: v0.24.2 hooks: @@ -87,7 +99,6 @@ repos: - id: check-hooks-apply - id: check-useless-excludes - ci: autofix_commit_msg: | [pre-commit.ci] auto fixes from pre-commit.com hooks diff --git a/.zenodo.json b/.zenodo.json index a1b2924..94a333c 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -2,10 +2,37 @@ "title": "xncml", "creators": [ { - "name": "Anderson Banihirwe" + "name": "Banihirwe, Anderson", + "orcid": "0000-0001-6583-571X" + }, + { + "name": "Huard, David", + "affiliation": "Ouranos, Montréal, Québec, Canada", + "orcid": "0000-0003-0311-5498" + }, + { + "name": "Aoun, Abel", + "orcid": "0000-0003-2289-2890" + }, + { + "name": "Smith, Trevor James", + "affiliation": "Ouranos, Montréal, Québec, Canada", + "orcid": "0000-0001-5393-8359" + }, + { + "name": "Charette-Migneault, Francis", + "affiliation": "CRIM, Montréal, Québec, Canada", + "orcid": "0000-0003-4862-3349" + }, + { + "name": "Bourgault, Pascal", + "affiliation": "Ouranos, Montréal, Québec, Canada", + "orcid": "0000-0003-1192-0403" } ], "keywords": [ + "netcdf", + "xarray", "xncml" ], "license": "Apache-2.0", diff --git a/AUTHORS.rst b/AUTHORS.rst index 417fcba..8f98921 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -2,8 +2,8 @@ Credits ======= -Development Lead ----------------- +Development Leads +----------------- * Anderson Banihirwe `@andersy005 `_ * David Huard `@huard `_ diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 05c59a0..d28df07 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,19 +2,18 @@ Changelog ========= -.. - `Unreleased `_ (latest) - ---------------------------------------------------------------------------- +`Unreleased `_ (latest) +---------------------------------------------------------------------------- +Contributors: Trevor James Smith (:user:`Zeitsperre`). - Contributors: +Fixes +^^^^^ +- Author and license information have been updated in the top-most ``__init__.py``, ``.zenodo.json``, and ``pyproject.toml`` files. - Changes - ^^^^^^^ - * No change. - - Fixes - ^^^^^ - * No change. +Internal changes +^^^^^^^^^^^^^^^^ +- Removed the obsolete ``MANIFEST.in`` file. +- New `pre-commit` checks have been added to the ``.pre-commit-config.yaml`` file. .. _changes_0.5.0: @@ -23,12 +22,10 @@ Changelog Bug fixes ^^^^^^^^^ - - Scalar attributes that are not strings are no longer wrapped in tuples of length==1 (by :user:`bzah`). Breaking changes ^^^^^^^^^^^^^^^^ - - Nested group handling (by :user:`bzah`): - Before this version, all groups were read, but conflicting variable names in-between groups would shadow data. Now, similarly to ``xarray.open_dataset``, ``open_ncml`` accepts an optional ``group`` argument to specify which group should be read. When ``group`` is not specified, it defaults to the root group. Additionally ``group`` can be set to ``'*'`` so that every group is read and the hierarchy is flattened. In the event of conflicting variable/dimension names across groups, the conflicting name will be modified by appending ``'__n'`` where n is incremented. - Enums are no longer transformed into CF flag_values and flag_meanings attributes, instead they are stored in the ``encoding["dtype"].metadata`` of their respective variable. This is aligned with what was done on `xarray` v2024.01.0 (by :user:`bzah`). @@ -37,7 +34,6 @@ Breaking changes Internal changes ^^^^^^^^^^^^^^^^ - - Added support for running `pytest` with `pytest-cov` (by :user:`Zeitsperre`). - Reworked the GitHub CI testing workflow to perform version checks as well as tests with `pytest-cov` (by :user:`Zeitsperre`). - The `xncml` package has been significantly restructured to improve maintainability (by :user:`bzah` and :user:`Zeitsperre`): @@ -68,7 +64,6 @@ Internal changes - Add support for Python 3.12 - Drop support for Python 3.8 - .. _changes-0.3: 0.3 (2023-08-28) @@ -79,7 +74,6 @@ Internal changes - Closing the dataset returned by `open_ncml` will close the underlying opened files (by :user:`huard`). - Add `Dataset.from_text` classmethod to create a `Dataset` from an XML string (by :user:`huard`). - .. _changes-0.2: 0.2 (2023-02-23) @@ -90,12 +84,11 @@ Internal changes - Add support in `Dataset` for NcML documents using the `ncml` namespace (by :user:`huard`). - Implement `Dataset.to_cf_dict` method to export CF-JSON dictionary (by :user:`huard`). - .. _changes-0.1: 0.1 Initial release (2022-11-24) -------------------------------- - - Manipulate NcML file: add & remove attributes, variables and dimensions. (by :user:`andersy005`). - - Implement `open_ncml`, which returns an `xarray.Dataset` built from an NcML. Note that - Only a subset of the NcML syntax is supported. (by :user:`huard`). +- Manipulate NcML file: add & remove attributes, variables and dimensions. (by :user:`andersy005`). +- Implement `open_ncml`, which returns an `xarray.Dataset` built from an NcML. Note that + Only a subset of the NcML syntax is supported. (by :user:`huard`). diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 40125a8..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,8 +0,0 @@ -include CONTRIBUTING.rst -include CHANGELOG.rst -include LICENSE -include README.rst - -recursive-include xncml *.py -recursive-exclude * __pycache__ -recursive-exclude * *.py[co] diff --git a/pyproject.toml b/pyproject.toml index 81a2591..d64b3ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,13 +5,13 @@ build-backend = "flit_core.buildapi" [project] name = "xncml" authors = [ - {name = "Anderson Banihirwe", email = "abanihi@ucar.edu"} + {name = "Anderson Banihirwe", email = "abanihi@ucar.edu"}, + {name = "David Huard", email = "david.huard@gmail.com"} ] maintainers = [ - {name = "Anderson Banihirwe", email = "abanihi@ucar.edu"}, {name = "Abel Aoun", email = "aoun.abel@gmail.com"}, {name = "David Huard", email = "david.huard@gmail.com"}, - {name = "Trevor James Smith", email = "trevor_smith@live.com"} + {name = "Trevor James Smith", email = "smith.trevorj@ouranos.ca"} ] description = "Tools for manipulating and opening NCML (NetCDF Markup) files with/for xarray" readme = {file = "README.rst", content-type = "text/x-rst"} @@ -76,6 +76,7 @@ docs = [ all = ["xncml[dev]", "xncml[docs]"] [project.urls] +"Homepage" = "https://xncml.readthedocs.io/" "Changelog" = "https://xncml.readthedocs.io/en/stable/changelog.html" "Issue tracker" = "https://github.com/xarray-contrib/xncml/issues" "Source" = "https://github.com/xarray-contrib/xncml" diff --git a/src/xncml/__init__.py b/src/xncml/__init__.py index 64f99aa..0a2fa7a 100644 --- a/src/xncml/__init__.py +++ b/src/xncml/__init__.py @@ -3,7 +3,7 @@ ################################################################################### # Apache Software License 2.0 # -# Copyright (c) 2019-2024, Anderson Banihirwe, David Huard +# Copyright (c) 2019-2025, Anderson Banihirwe, David Huard, Abel Aoun, Trevor James Smith, Francis Charette-Migneault, Pascal Bourgault # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.