From e2ad62b213ecffd6828fbb053b8bc1e084075fe0 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 6 May 2025 11:47:49 -0400 Subject: [PATCH 1/8] update .pre-commit-config.yaml --- .pre-commit-config.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0944cdc..9345186 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 From c77076c9141eea39a07d1f00f37b0fbb7598537d Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 6 May 2025 11:48:01 -0400 Subject: [PATCH 2/8] remove unused MANIFEST.in --- MANIFEST.in | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 MANIFEST.in 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] From adf87e3d311bc9fe8b23c2e0996c0a1ef537cd1b Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 6 May 2025 11:48:45 -0400 Subject: [PATCH 3/8] update licensing and attribution information --- .zenodo.json | 29 ++++++++++++++++++++++++++++- src/xncml/__init__.py | 2 +- 2 files changed, 29 insertions(+), 2 deletions(-) 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/src/xncml/__init__.py b/src/xncml/__init__.py index 64f99aa..e7b1c60 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 Aoud, 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. From cc0a138be4403afc05570739e340bb299791e1ea Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 6 May 2025 11:56:39 -0400 Subject: [PATCH 4/8] update attribution roles --- AUTHORS.rst | 4 ++-- pyproject.toml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) 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/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" From 315ad7a67925abedf11ca854de9e9f180cc7f472 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 6 May 2025 12:16:21 -0400 Subject: [PATCH 5/8] update attribution roles --- CHANGELOG.rst | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 05c59a0..26e2a70 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,19 +2,26 @@ Changelog ========= -.. - `Unreleased `_ (latest) - ---------------------------------------------------------------------------- +`Unreleased `_ (latest) +---------------------------------------------------------------------------- - Contributors: +Contributors: Trevor James Smith (:user:`Zeitsperre`). - Changes - ^^^^^^^ - * No change. +Changes +^^^^^^^ - Fixes - ^^^^^ - * No change. +- No change. + +Fixes +^^^^^ + +- Author and license information have been updated in the top-most ``__init__.py``, ``.zenodo.json``, and ``pyproject.toml`` files. + +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: @@ -68,7 +75,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 +85,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,7 +95,6 @@ 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) From 565c9ec3166032a34464b8b0576dc682627e46f5 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 6 May 2025 12:17:41 -0400 Subject: [PATCH 6/8] remove unused entry in PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 1 - 1 file changed, 1 deletion(-) 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? From 2a9ffd8b85c6d2fa69d04e1894e84fb8f290b5c7 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 2 Oct 2025 09:34:13 -0400 Subject: [PATCH 7/8] Correct copyright holder name in __init__.py --- src/xncml/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xncml/__init__.py b/src/xncml/__init__.py index e7b1c60..0a2fa7a 100644 --- a/src/xncml/__init__.py +++ b/src/xncml/__init__.py @@ -3,7 +3,7 @@ ################################################################################### # Apache Software License 2.0 # -# Copyright (c) 2019-2025, Anderson Banihirwe, David Huard, Abel Aoud, Trevor James Smith, Francis Charette-Migneault, Pascal Bourgault +# 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. From 966b16ecd98bd0fb67fdd3400d875c074955aca1 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 2 Oct 2025 10:29:01 -0400 Subject: [PATCH 8/8] Revise CHANGELOG for version updates and fixes Updated changelog to reflect recent changes, fixes, and breaking changes. --- CHANGELOG.rst | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 26e2a70..d28df07 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,22 +4,14 @@ Changelog `Unreleased `_ (latest) ---------------------------------------------------------------------------- - Contributors: Trevor James Smith (:user:`Zeitsperre`). -Changes -^^^^^^^ - -- No change. - Fixes ^^^^^ - - Author and license information have been updated in the top-most ``__init__.py``, ``.zenodo.json``, and ``pyproject.toml`` files. Internal changes ^^^^^^^^^^^^^^^^ - - Removed the obsolete ``MANIFEST.in`` file. - New `pre-commit` checks have been added to the ``.pre-commit-config.yaml`` file. @@ -30,12 +22,10 @@ Internal changes 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`). @@ -44,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`): @@ -100,6 +89,6 @@ Internal changes 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`).