Skip to content

Commit

Permalink
Update contribution guidelines (#78)
Browse files Browse the repository at this point in the history
* Update contribution guidelines

* Added more details from the previous version of the guidelines

* Added more details from the previous version of the guidelines

* Remove duplicate information from CONTRIBUTING and add more detail to dev readme

* Fixed some broken links and updated changelog
  • Loading branch information
ClaireDons authored Jun 13, 2024
1 parent be8d110 commit f257a56
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 39 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]
### Changed
- Moved making a github release to developer documentation and pointed to it in CONTRIBUTING.md ([#78](https://github.com/AI4S2S/lilio/pull/78))
- Added absolute link to README.md and added CONTRIBUTING.md to index.rst in docs ([#78](https://github.com/AI4S2S/lilio/pull/78))

## 0.5.0 (2024-06-11)
### Changed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ python3 -m pip install git+https://github.com/AI4S2S/lilio.git
```

### Configure the package for development and testing
A more extensive developer guide can be found [here](./docs/README.dev.md).
A more extensive developer guide can be found [here](https://github.com/AI4S2S/lilio/blob/main/docs/README.dev.md).

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 `lilio` via the command:

Expand Down Expand Up @@ -115,7 +115,7 @@ For detailed information on using `lilio` package, visit the [documentation page
## Contributing

If you want to contribute to the development of lilio,
have a look at the [contribution guidelines](docs/CONTRIBUTING.md).
have a look at the [contribution guidelines](https://github.com/AI4S2S/lilio/blob/main/docs/CONTRIBUTING.md).

## How to cite us
[![rsd badge](https://img.shields.io/badge/RSD-lilio-blue)](https://research-software-directory.org/software/lilio)
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/lilio/actions?query=branch%3Amain+)
to be completed and green.

8. Create a [GitHub release](https://github.com/AI4S2S/lilio/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=lilio) 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 lilio==<new version>`?

11. Celebrate
If you want to make a release, please follow the instructions in [the developer documentation](README.dev.md).
20 changes: 15 additions & 5 deletions docs/README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ You can also make use of the [sphinx-autobuild](https://pypi.org/project/sphinx-

## Versioning

Bumping the version across all files is done with [bumpversion](https://github.com/c4urself/bump2version), e.g.
Firstly, determine what new version (major, minor or patch) to use. This package uses `semantic versioning <https://semver.org>`. Bumping the version across all files is done with [bumpversion](https://github.com/c4urself/bump2version), e.g.

```shell
bumpversion major
Expand All @@ -87,14 +87,24 @@ This section describes how to make a release in 3 parts: preparation, release an

### Preparation

1. Update the `CHANGELOG.md` file
2. Verify that the information in `CITATION.cff` is correct
1. Update the `CHANGELOG.md` file with changes between current and new version.
2. Verify that the information in `CITATION.cff` is correct.
3. Make sure the [version has been updated](#versioning).
4. Run the unit tests with `hatch run test`
4. Run the unit tests with `hatch run test`.
5. Commit & push changes to GitHub.
6. Wait for [GitHub
actions](https://github.com/AI4S2S/lilio/actions?query=branch%3Amain+)
to be completed and green.

### Making the GitHub release

Make a release and tag on GitHub.com. This will:
Create a new [GitHub release](https://github.com/AI4S2S/lilio/releases/new)

- Use version as title and tag version.
- Summarise the changes in this new release (to give context to
Zenodo record) and then add changes from `CHANGELOG.md`

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/).
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Table of contents

Scaling up Lilio with Dask <dask_integration.md>
Developer Readme <README.dev.md>
Contributing guide <contributing_link>
Contributing guide <CONTRIBUTING.md>
Changelog <CHANGELOG.md>
API reference <autoapi/index.rst>

Expand Down

0 comments on commit f257a56

Please sign in to comment.