From 17723bd2b701c36cd283d6c5047335501c15cad3 Mon Sep 17 00:00:00 2001 From: durgals Date: Wed, 11 Sep 2024 15:25:44 +1000 Subject: [PATCH 1/9] Update .zenodo.json (##663) (#668) Co-authored-by: shr015 --- .zenodo.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index f224a55f..33aba14c 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -51,9 +51,13 @@ { "affiliation": "Bureau of Meteorology, Australia", "name": "Sharples, John" - } - ], - + }, + { + "orcid": "https://orcid.org/0000-0002-5545-1736", + "affiliation": "CSIRO, Australia", + "name": "Shrestha, Durga" + } + ], "license": "Apache-2.0", "title": "scores: A Python package for verifying and evaluating models and predictions with xarray", From 711310f40b1acfaca49f9869e44444c2503830d8 Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg Date: Wed, 11 Sep 2024 18:08:40 +1000 Subject: [PATCH 2/9] Explore removing requirements.txt for binder to allow its versions to freely update --- .binder/requirements.txt | 390 --------------------------------------- 1 file changed, 390 deletions(-) delete mode 100644 .binder/requirements.txt diff --git a/.binder/requirements.txt b/.binder/requirements.txt deleted file mode 100644 index f6d99813..00000000 --- a/.binder/requirements.txt +++ /dev/null @@ -1,390 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --extra=tutorial --output-file=binder/requirements.txt pyproject.toml -# -affine==2.4.0 - # via rasterio -anyio==4.3.0 - # via - # httpx - # jupyter-server -argon2-cffi==23.1.0 - # via jupyter-server -argon2-cffi-bindings==21.2.0 - # via argon2-cffi -arrow==1.3.0 - # via isoduration -asttokens==2.4.1 - # via stack-data -async-lru==2.0.4 - # via jupyterlab -attrs==23.2.0 - # via - # jsonschema - # rasterio - # referencing -babel==2.14.0 - # via jupyterlab-server -beautifulsoup4==4.12.3 - # via nbconvert -bleach==6.1.0 - # via nbconvert -bottleneck==1.3.8 - # via scores (pyproject.toml) -certifi==2024.7.4 - # via - # httpcore - # httpx - # pyproj - # rasterio - # requests -cffi==1.16.0 - # via argon2-cffi-bindings -charset-normalizer==3.3.2 - # via requests -click==8.1.7 - # via - # click-plugins - # cligj - # rasterio -click-plugins==1.1.1 - # via rasterio -cligj==0.7.2 - # via rasterio -comm==0.2.2 - # via ipykernel -contourpy==1.2.0 - # via matplotlib -cycler==0.12.1 - # via matplotlib -debugpy==1.8.1 - # via ipykernel -decorator==5.1.1 - # via ipython -defusedxml==0.7.1 - # via nbconvert -exceptiongroup==1.2.0 - # via - # anyio - # ipython -executing==2.0.1 - # via stack-data -fastjsonschema==2.19.1 - # via nbformat -fonttools==4.50.0 - # via matplotlib -fqdn==1.5.1 - # via jsonschema -h11==0.14.0 - # via httpcore -h5netcdf==1.3.0 - # via scores (pyproject.toml) -h5py==3.10.0 - # via h5netcdf -httpcore==1.0.5 - # via httpx -httpx==0.27.0 - # via jupyterlab -idna==3.7 - # via - # anyio - # httpx - # jsonschema - # requests -importlib-metadata==7.1.0 - # via - # jupyter-client - # jupyter-lsp - # jupyterlab - # jupyterlab-server - # nbconvert -importlib-resources==6.4.0 - # via matplotlib -ipykernel==6.29.4 - # via jupyterlab -ipython==8.18.1 - # via ipykernel -isoduration==20.11.0 - # via jsonschema -jedi==0.19.1 - # via ipython -jinja2==3.1.4 - # via - # jupyter-server - # jupyterlab - # jupyterlab-server - # nbconvert -joblib==1.3.2 - # via scikit-learn -json5==0.9.24 - # via jupyterlab-server -jsonpointer==2.4 - # via jsonschema -jsonschema[format-nongpl]==4.21.1 - # via - # jupyter-events - # jupyterlab-server - # nbformat -jsonschema-specifications==2023.12.1 - # via jsonschema -jupyter-client==8.6.1 - # via - # ipykernel - # jupyter-server - # nbclient -jupyter-core==5.7.2 - # via - # ipykernel - # jupyter-client - # jupyter-server - # jupyterlab - # nbclient - # nbconvert - # nbformat -jupyter-events==0.10.0 - # via jupyter-server -jupyter-lsp==2.2.4 - # via jupyterlab -jupyter-server==2.13.0 - # via - # jupyter-lsp - # jupyterlab - # jupyterlab-server - # notebook-shim -jupyter-server-terminals==0.5.3 - # via jupyter-server -jupyterlab==4.2.5 - # via scores (pyproject.toml) -jupyterlab-pygments==0.3.0 - # via nbconvert -jupyterlab-server==2.25.4 - # via jupyterlab -kiwisolver==1.4.5 - # via matplotlib -markupsafe==2.1.5 - # via - # jinja2 - # nbconvert -matplotlib==3.8.3 - # via scores (pyproject.toml) -matplotlib-inline==0.1.6 - # via - # ipykernel - # ipython -mistune==3.0.2 - # via nbconvert -nbclient==0.10.0 - # via nbconvert -nbconvert==7.16.3 - # via jupyter-server -nbformat==5.10.3 - # via - # jupyter-server - # nbclient - # nbconvert -nest-asyncio==1.6.0 - # via ipykernel -notebook-shim==0.2.4 - # via jupyterlab -numpy==1.26.4 - # via - # bottleneck - # contourpy - # h5py - # matplotlib - # pandas - # rasterio - # rioxarray - # scikit-learn - # scipy - # snuggs - # xarray -overrides==7.7.0 - # via jupyter-server -packaging==24.0 - # via - # h5netcdf - # ipykernel - # jupyter-server - # jupyterlab - # jupyterlab-server - # matplotlib - # nbconvert - # plotly - # rioxarray - # xarray -pandas==2.2.1 - # via - # scores (pyproject.toml) - # xarray -pandocfilters==1.5.1 - # via nbconvert -parso==0.8.3 - # via jedi -pexpect==4.9.0 - # via ipython -pillow==10.3.0 - # via matplotlib -platformdirs==4.2.0 - # via jupyter-core -plotly==5.20.0 - # via scores (pyproject.toml) -prometheus-client==0.20.0 - # via jupyter-server -prompt-toolkit==3.0.43 - # via ipython -psutil==5.9.8 - # via ipykernel -ptyprocess==0.7.0 - # via - # pexpect - # terminado -pure-eval==0.2.2 - # via stack-data -pycparser==2.22 - # via cffi -pygments==2.17.2 - # via - # ipython - # nbconvert -pyparsing==3.1.2 - # via - # matplotlib - # snuggs -pyproj==3.6.1 - # via rioxarray -python-dateutil==2.9.0.post0 - # via - # arrow - # jupyter-client - # matplotlib - # pandas -python-json-logger==2.0.7 - # via jupyter-events -pytz==2024.1 - # via pandas -pyyaml==6.0.1 - # via jupyter-events -pyzmq==25.1.2 - # via - # ipykernel - # jupyter-client - # jupyter-server -rasterio==1.3.9 - # via - # rioxarray - # scores (pyproject.toml) -referencing==0.34.0 - # via - # jsonschema - # jsonschema-specifications - # jupyter-events -requests==2.32.2 - # via jupyterlab-server -rfc3339-validator==0.1.4 - # via - # jsonschema - # jupyter-events -rfc3986-validator==0.1.1 - # via - # jsonschema - # jupyter-events -rioxarray==0.15.0 - # via scores (pyproject.toml) -rpds-py==0.18.0 - # via - # jsonschema - # referencing -scikit-learn==1.5.0 - # via scores (pyproject.toml) -scipy==1.12.0 - # via - # scikit-learn - # scores (pyproject.toml) -send2trash==1.8.2 - # via jupyter-server -six==1.16.0 - # via - # asttokens - # bleach - # python-dateutil - # rfc3339-validator -sniffio==1.3.1 - # via - # anyio - # httpx -snuggs==1.4.7 - # via rasterio -soupsieve==2.5 - # via beautifulsoup4 -stack-data==0.6.3 - # via ipython -tenacity==8.2.3 - # via plotly -terminado==0.18.1 - # via - # jupyter-server - # jupyter-server-terminals -threadpoolctl==3.4.0 - # via scikit-learn -tinycss2==1.2.1 - # via nbconvert -tomli==2.0.1 - # via jupyterlab -tornado==6.4.1 - # via - # ipykernel - # jupyter-client - # jupyter-server - # jupyterlab - # terminado -traitlets==5.14.2 - # via - # comm - # ipykernel - # ipython - # jupyter-client - # jupyter-core - # jupyter-events - # jupyter-server - # jupyterlab - # matplotlib-inline - # nbclient - # nbconvert - # nbformat -types-python-dateutil==2.9.0.20240316 - # via arrow -typing-extensions==4.10.0 - # via - # anyio - # async-lru - # ipython -tzdata==2024.1 - # via pandas -uri-template==1.3.0 - # via jsonschema -urllib3==2.2.2 - # via requests -wcwidth==0.2.13 - # via prompt-toolkit -webcolors==1.13 - # via jsonschema -webencodings==0.5.1 - # via - # bleach - # tinycss2 -websocket-client==1.7.0 - # via jupyter-server -xarray==2024.3.0 - # via - # rioxarray - # scores (pyproject.toml) -zipp==3.19.1 - # via - # importlib-metadata - # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -# setuptools From 6ef5253ab1f855e8b8f1455d86ab15150c732758 Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg <134973832+tennlee@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:21:23 +1000 Subject: [PATCH 3/9] Update github actions to use the latest versions (#670) * Update github actions versions --- .github/workflows/python-app.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 68b05f41..d5ec1345 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -18,11 +18,12 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip From b55a665ef30aab7f186580be2ba05d84e4202bfd Mon Sep 17 00:00:00 2001 From: Stephanie Chong <168800785+Steph-Chong@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:32:16 +1000 Subject: [PATCH 4/9] Add information about asking new contributors to add their details to .zenodo.json (#671) --- docs/maintainer.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/maintainer.md b/docs/maintainer.md index a4b376a3..a457f5fa 100644 --- a/docs/maintainer.md +++ b/docs/maintainer.md @@ -58,6 +58,24 @@ For the full details of all changes in this release, see the [GitHub commit hist For each entry: "Brief description. See [PR #ABC](add link) by [@username](add link)." ``` +## This section covers asking new contributors to add their details to .zenodo.json + +``` +Thank you very much for your contribution. + +When we release a new version of `scores`, that version is archived on Zenodo. See: https://doi.org/10.5281/zenodo.12697241 + +As you have contributed to `scores`, would you like to be listed on Zenodo as an author the next time `scores` is archived? + +If so, please open a new pull request. In that pull request please add your details to .zenodo.json (which can be found in the `scores` root directory). + +In .zenodo.json, please add your details at the bottom of the “creators” section. The fields you will need to complete are: + +1. “orcid”. This is an optional field. If you don’t have an ORCID, but would like one, you can obtain one here: https://info.orcid.org/researchers/ . +2. “affiliation”. Options include: the name of the institution you are affiliated with, “Independent Researcher” or “Independent Contributor”. +3. “name”. Format: surname, given name(s). +``` + ## This section covers how to build the documentation locally (Readthedocs should update automatically from a GitHub Action) From 3578648c4890e6d49869a2cc45cc92412a3f9fdf Mon Sep 17 00:00:00 2001 From: Stephanie Chong <168800785+Steph-Chong@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:58:25 +1000 Subject: [PATCH 5/9] Update how to format release notes section of Maintainers Notes (#672) --- docs/maintainer.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/maintainer.md b/docs/maintainer.md index a457f5fa..870c8b50 100644 --- a/docs/maintainer.md +++ b/docs/maintainer.md @@ -44,9 +44,9 @@ Information relevant for package maintenance ``` # Release Notes (What's New) -## Version X.Y.Z (Month Day, Year) e.g. "Version 0.9.3 (July 7, 2024)" +## Version X.Y.Z (Month Day, Year) e.g. "Version 0.9.3 (July 9, 2024)" -For the full details of all changes in this release, see the [GitHub commit history](https://github.com/nci/scores/compare/(X-1).(Y-1).(Z-1)...X.Y.Z). Below are the changes we think users may wish to be aware of. +For a list of all changes in this release, see the [full changelog](https://github.com/nci/scores/compare/(X-1).(Y-1).(Z-1)...X.Y.Z). Below are the changes we think users may wish to be aware of. ### Features ### Breaking Changes @@ -54,8 +54,13 @@ For the full details of all changes in this release, see the [GitHub commit hist ### Bug Fixes ### Documentation ### Internal Changes +### Contributors to this Release -For each entry: "Brief description. See [PR #ABC](add link) by [@username](add link)." +For each entry: "Brief description. See [PR #ABC](add link)." + +For Contributors to this Release: "Name ([@handle](https://github.com/handle))" + +When there are new contributors: "\* indicates that this release contains their first contribution to `scores`." ``` ## This section covers asking new contributors to add their details to .zenodo.json From 2aee079ecc61c5845b21c72a0bfec8a9ba820aee Mon Sep 17 00:00:00 2001 From: Stephanie Chong <168800785+Steph-Chong@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:26:19 +1000 Subject: [PATCH 6/9] Add information about what to change in release notes --- docs/maintainer.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/maintainer.md b/docs/maintainer.md index 870c8b50..ed78b095 100644 --- a/docs/maintainer.md +++ b/docs/maintainer.md @@ -39,7 +39,7 @@ Information relevant for package maintenance 5. Run hatch publish 6. Uninstall the test scores, re-install the now-updated package, do a little testing -## This section covers how to format release notes +## This section covers how to format and prepare release notes ``` # Release Notes (What's New) @@ -63,6 +63,15 @@ For Contributors to this Release: "Name ([@handle](https://github.com/handle))" When there are new contributors: "\* indicates that this release contains their first contribution to `scores`." ``` +**While a version is under development:** +1. Change the date to "(Upcoming Release)" +2. In the full changelog URL, change "X.Y.Z" to "develop", i.e. "(https://github.com/nci/scores/compare/(X-1).(Y-1).(Z-1)...develop)" + +**Immediately before making a release:** +1. Change “(Upcoming Release)” to the date of the release (and correctly format the date) +2. In the full changelog URL, change “develop” to the correct version number, i.e (https://github.com/nci/scores/compare/(X-1).(Y-1).(Z-1)...X.Y.Z) +3. Delete any unused headers + ## This section covers asking new contributors to add their details to .zenodo.json ``` From fb4d992314b2496b83ad2312ff1640ac53f22083 Mon Sep 17 00:00:00 2001 From: Stephanie Chong <168800785+Steph-Chong@users.noreply.github.com> Date: Wed, 11 Sep 2024 19:39:46 +1000 Subject: [PATCH 7/9] Add details about what needs to be checked in Zenodo (#674) --- docs/maintainer.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/maintainer.md b/docs/maintainer.md index ed78b095..bb514b65 100644 --- a/docs/maintainer.md +++ b/docs/maintainer.md @@ -39,6 +39,12 @@ Information relevant for package maintenance 5. Run hatch publish 6. Uninstall the test scores, re-install the now-updated package, do a little testing +### Confirm Zenodo correctness + +1. Confirm license +2. Confirm authors +3. Scan everything else + ## This section covers how to format and prepare release notes ``` From 1fd3778988b178b1313bb4b3d230f954f9378a3c Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg <134973832+tennlee@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:51:52 +1000 Subject: [PATCH 8/9] Add comments on version compatbility to the maintainers guide --- docs/maintainer.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/maintainer.md b/docs/maintainer.md index bb514b65..a24acbff 100644 --- a/docs/maintainer.md +++ b/docs/maintainer.md @@ -96,6 +96,20 @@ In .zenodo.json, please add your details at the bottom of the “creators” sec 3. “name”. Format: surname, given name(s). ``` +## This section gives guidance for maintaining compatibility with old versions of Python and packages + +tldr; about 3 years old is OK, longer if painless + +https://scientific-python.org/specs/spec-0000/ provides a guide for the scientific Python ecosystem - we should aspire to be at least that compatible with older versions. It describes an approach including outlining when particular packages move out of support. + +We have not tested compatibility against all possible package versions which are included in this spec. Conversely, in some cases, it has been fairly straightforward to support packages older than this. + +There is no formal "support" agreement for `scores`. In the context of `scores` package management, maintaining compability means being willing to make reasonable efforts to resolve any issues raised on the issue tracker. If a specific issue arises that would make it impractical to support a version within the compatibility window, then a response will be discussed and agreed on at the time on the basis of practicality. + +There is currently no specific testing for older versions of libraries, only older versions of Python (which may or may not intake an older library version). A full matrix test of Python and package versioning would be prohibitively complex, and there would also be no guarantee that pinned older versions wouldn't result in an insecure build (even if only in a test runner). + +The development branch versioning is unpinned, and so any issues arising from newly-released packages should quickly be encountered and then resolved before the next `scores` release. Releases of `scores` use "~=" versioning, which gives flexibility within a range of versions (see https://packaging.python.org/en/latest/specifications/version-specifiers/#id5). + ## This section covers how to build the documentation locally (Readthedocs should update automatically from a GitHub Action) From bf0eb83b68bbab8ce35c06c464a19238035f4d7c Mon Sep 17 00:00:00 2001 From: Tennessee Leeuwenburg Date: Wed, 11 Sep 2024 21:17:47 +1000 Subject: [PATCH 9/9] Updates to maintainers guide --- docs/maintainer.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/maintainer.md b/docs/maintainer.md index a24acbff..9b9cfa91 100644 --- a/docs/maintainer.md +++ b/docs/maintainer.md @@ -4,7 +4,13 @@ Information relevant for package maintenance ## This section covers the process for making a release from the develop branch -1. Run through the notebooks manually +### Immediately before making a release, update the release notes +1. Change “(Upcoming Release)” to the date of the release (and correctly format the date) +2. In the full changelog URL, change “develop” to the correct version number, i.e (https://github.com/nci/scores/compare/(X-1).(Y-1).(Z-1)...X.Y.Z) +3. Delete any unused headers + +### On the pre-release branch +1. Run through some of the notebooks manually 2. Run the unit tests 3. Prepare the merge request in github (do not do a rebase merge to main -- do a regular merge commit) 4. Check readthedocs rebuilds correctly, including manually checking the version number looks right @@ -73,11 +79,6 @@ When there are new contributors: "\* indicates that this release contains their 1. Change the date to "(Upcoming Release)" 2. In the full changelog URL, change "X.Y.Z" to "develop", i.e. "(https://github.com/nci/scores/compare/(X-1).(Y-1).(Z-1)...develop)" -**Immediately before making a release:** -1. Change “(Upcoming Release)” to the date of the release (and correctly format the date) -2. In the full changelog URL, change “develop” to the correct version number, i.e (https://github.com/nci/scores/compare/(X-1).(Y-1).(Z-1)...X.Y.Z) -3. Delete any unused headers - ## This section covers asking new contributors to add their details to .zenodo.json ``` @@ -100,7 +101,7 @@ In .zenodo.json, please add your details at the bottom of the “creators” sec tldr; about 3 years old is OK, longer if painless -https://scientific-python.org/specs/spec-0000/ provides a guide for the scientific Python ecosystem - we should aspire to be at least that compatible with older versions. It describes an approach including outlining when particular packages move out of support. +[https://scientific-python.org/specs/spec-0000/](https://scientific-python.org/specs/spec-0000/) provides a guide for the scientific Python ecosystem - we should aspire to be at least that compatible with older versions. It describes an approach including outlining when particular packages move out of support. We have not tested compatibility against all possible package versions which are included in this spec. Conversely, in some cases, it has been fairly straightforward to support packages older than this. @@ -108,7 +109,7 @@ There is no formal "support" agreement for `scores`. In the context of `scores` There is currently no specific testing for older versions of libraries, only older versions of Python (which may or may not intake an older library version). A full matrix test of Python and package versioning would be prohibitively complex, and there would also be no guarantee that pinned older versions wouldn't result in an insecure build (even if only in a test runner). -The development branch versioning is unpinned, and so any issues arising from newly-released packages should quickly be encountered and then resolved before the next `scores` release. Releases of `scores` use "~=" versioning, which gives flexibility within a range of versions (see https://packaging.python.org/en/latest/specifications/version-specifiers/#id5). +The development branch versioning is unpinned, and so any issues arising from newly-released packages should quickly be encountered and then resolved before the next `scores` release. Releases of `scores` use "~=" versioning, which gives flexibility within a range of versions (see [https://packaging.python.org/en/latest/specifications/version-specifiers/#id5](https://packaging.python.org/en/latest/specifications/version-specifiers/#id5)). ## This section covers how to build the documentation locally (Readthedocs should update automatically from a GitHub Action)