Skip to content

Commit

Permalink
Update docs and codecov (#183)
Browse files Browse the repository at this point in the history
* Link to dev readme for making a release.

* Refer to s2spy instead of lilio

* Remove sonarcloud

* Add codecov for testing coverage

* Use hatch for coverage rather than pytest

* Fix reference to codecov token

* Change coverage badge to codecov

* Update dev instructions

* Bump to version 0.4.1
  • Loading branch information
ClaireDons authored Oct 9, 2024
1 parent 3a67444 commit 7e309c5
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 97 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.4.0
current_version = 0.4.1

[comment]
comment = The contents of this file cannot be merged with that of setup.cfg until https://github.com/c4urself/bump2version/issues/185 is resolved
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
run: hatch run test
- name: Verify that we can build the package
run: hatch build
- name: Test coverage
run: hatch run coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

lint:
name: Linting build
Expand All @@ -57,4 +63,5 @@ jobs:
run: |
python3 -m pip install --upgrade pip hatch
- name: Check style against standards
run: hatch run lint
run: hatch run lint

40 changes: 0 additions & 40 deletions .github/workflows/sonarcloud.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .zenono.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
{
"affiliation": "Vrije Universiteit Amsterdam",
"name": "Van Ingen, Jannes"
},
{
"orcid": "0000-0002-2546-4528",
"affiliation": "Netherlands eScience Center",
"name": "Donnelly, Claire"
}
],

Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## Added
## 0.4.1 (2024-10-02)
### Added
- Dask support ([#181] (https://github.com/AI4S2S/s2spy/pull/181))

## Changed
### Changed
- Changed code coverage from SonarCloud to Codecov ([#183] (https://github.com/AI4S2S/s2spy/pull/183))
- Update CONTRIBUTING.md and README.md to be consistent with README.dev.md ([#183] (https://github.com/AI4S2S/s2spy/pull/183))

## 0.4.0 (2023-09-13)

Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ authors:
orcid: https://orcid.org/0000-0002-2546-4528

date-released: 2022-09-02
version: "0.4.0"
version: "0.4.1"
repository-code: "https://github.com/AI4S2S/s2spy"
keywords:
- s2s
Expand Down
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7708338.svg)](https://doi.org/10.5281/zenodo.7708338)
[![Documentation Status](https://readthedocs.org/projects/ai4s2s/badge/?version=latest)](https://ai4s2s.readthedocs.io/en/latest/?badge=latest)
[![build](https://github.com/AI4S2S/s2spy/actions/workflows/build.yml/badge.svg)](https://github.com/AI4S2S/s2spy/actions/workflows/build.yml)
[![sonarcloud](https://github.com/AI4S2S/s2spy/actions/workflows/sonarcloud.yml/badge.svg)](https://github.com/AI4S2S/s2spy/actions/workflows/sonarcloud.yml)
[![workflow scc badge](https://sonarcloud.io/api/project_badges/measure?project=AI4S2S_ai4s2s&metric=coverage)](https://sonarcloud.io/dashboard?id=AI4S2S_ai4s2s)
[![codecov](https://codecov.io/gh/AI4S2S/s2spy/graph/badge.svg?token=8HFAXHTTB1)](https://codecov.io/gh/AI4S2S/s2spy)

A high-level python package integrating expert knowledge and artificial intelligence to boost (sub) seasonal forecasting.

Expand Down Expand Up @@ -42,18 +41,7 @@ python3 -m pip install git+https://github.com/AI4S2S/s2spy.git
```

### Configure the package for development and testing
The testing framework used here is [pytest](https://pytest.org). Before running the test, we get a local copy of the source code and install `s2spy` via the command:

```py
git clone https://github.com/AI4S2S/s2spy.git
cd s2spy
python3 -m pip install -e .
```

Then, run tests:
```py
python3 -m pytest
```
For developing and testing the package, please follow the developer guide, which can be found [here](https://github.com/AI4S2S/s2spy/blob/main/docs/README.dev.md).

## Getting started
`s2spy` provides end-to-end solutions for machine learning (ML) based S2S forecasting.
Expand Down
32 changes: 1 addition & 31 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,5 @@ The sections below outline the steps in each case.
In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request.

## You want to make a release
This section is for maintainers of the package.

1. Checkout ``HEAD`` of ``main`` branch with ``git checkout main`` and ``git pull``.
2. Determine what new version (major, minor or patch) to use. Package uses `semantic versioning <https://semver.org>`.
3. Run ``bump2version <major|minor|patch>`` to update version in package files.
4. Update CHANGELOG.md with changes between current and new version.
5. Make sure pre-commit hooks are green for all files by running ``pre-commit run --all-files``.
6. Commit & push changes to GitHub.
7. Wait for [GitHub
actions](https://github.com/AI4S2S/s2spy/actions?query=branch%3Amain+)
to be completed and green.

8. Create a [GitHub release](https://github.com/AI4S2S/s2spy/releases/new)

- Use version as title and tag version.
- As description use intro text from README.md (to give context to
Zenodo record) and changes from CHANGELOG.md

9. Create a PyPI release.

1. Create distribution archives with `hatch build`.
2. Upload archives to PyPI with `hatch publish` (use your
personal PyPI account).

10. Verify

1. Has [new Zenodo record](https://zenodo.org/search?page=1&size=20&q=s2spy) been created?
2. Has [stable](https://ai4s2s.readthedocs.io/en/stable/) ReadTheDocs been updated?
3. Can new version be installed with pip using
`python3 -m pip install s2spy==<new version>`?

11. Celebrate
If you want to make a release, please follow the instructions in [the developer documentation](README.dev.md).
10 changes: 5 additions & 5 deletions docs/README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ This section describes how to make a release in 3 parts: preparation, release an
Make a release and tag on GitHub.com. This will:

- trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.
- start a GitHub action that builds and uploads the new version to [PyPI](https://pypi.org/project/lilio/).
- Which should trigger [conda-forge](https://anaconda.org/conda-forge/lilio) to update the package as well.
- start a GitHub action that builds and uploads the new version to [PyPI](https://pypi.org/project/s2spy/).
- Which should trigger [conda-forge](https://anaconda.org/conda-forge/s2spy) to update the package as well.


### Validation

After making the release, you should check that:

1. The [Zenodo page](https://doi.org/10.5281/zenodo.7620212) is updated
1. The [publishing action](https://github.com/AI4S2S/lilio/actions/workflows/python-publish.yml) ran successfully, and that `pip install lilio` installs the new version.
1. The [conda-forge package](https://anaconda.org/conda-forge/lilio) is updated, and can be installed using conda.
1. The [Zenodo page](https://doi.org/10.5281/zenodo.7708337) is updated
1. The [publishing action](https://github.com/AI4S2S/s2spy/actions/workflows/python-publish.yml) ran successfully, and that `pip install s2spy` installs the new version.
1. The [conda-forge package](https://anaconda.org/conda-forge/s2spy) is updated, and can be installed using conda.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# built documents.
#
# The short X.Y version.
version = "0.4.0"
version = "0.4.1"
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
2 changes: 1 addition & 1 deletion s2spy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

__author__ = "Yang Liu"
__email__ = "[email protected]"
__version__ = "0.4.0"
__version__ = "0.4.1"

__all__ = ["RGDR"]

0 comments on commit 7e309c5

Please sign in to comment.