Skip to content

Commit 582faf5

Browse files
authored
Dev (#16)
* update changelog with unreleased changes * use automated Zenodo releases instead of drafts * update instructions for adding authors * only build src/ folder * update changelog
1 parent 48be9f2 commit 582faf5

10 files changed

Lines changed: 63 additions & 40 deletions

File tree

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ assignees: ''
77

88
---
99

10-
**Zenodo DOI:**
1110

1211
<!-- Optional -->
1312
**Target date:** YYYY/MM/DD
@@ -16,24 +15,11 @@ assignees: ''
1615

1716
- [ ] Check all the dependency changes since the last release are reflected in `environment.yml`
1817

19-
## Draft a Zenodo archive (to be done by a manager on Zenodo)
20-
21-
- [ ] Go to the Zenodo entry for this project (find the link to the latest Zenodo release on the `README.md` file)
22-
- [ ] Create a "New version" of it.
23-
- [ ] Get a new DOI for the new release
24-
- [ ] Copy and paste the reserved DOI to this issue
25-
- [ ] Update release date
26-
- [ ] Update version number in Title (make sure there is a leading `v`, like `v1.5.7`)
27-
- [ ] Update version number (use a leading `v` as well)
28-
- [ ] Add as authors any new contributors who have added themselves to `AUTHORS.md` in the same order
29-
- [ ] Ensure that the first author is "samplepackagename Developers" and others are listed alphabetically by last name
30-
- [ ] Save the release draft
3118

3219
## Update the changelog
3320

3421
- [ ] Generate a list of commits between the last release tag and now: `git log HEAD...v1.2.3 > changes.md`
3522
- [ ] Use this to summarize the major changes to the code and add short descriptions to `CHANGELOG.md` (not `docs/changelog.md`!).
36-
- [ ] Add the release date and Zenodo DOI badge to the top
3723
- [ ] Add contributors to the list
3824
- [ ] Open a PR to update the changelog
3925
- [ ] Merge the PR
@@ -44,14 +30,9 @@ After the changelog PR is merged:
4430

4531
- [ ] Draft a new release on GitHub
4632
- [ ] The tag and release name should be a version number (following Semantic Versioning) with a leading `v` (`v1.5.7`)
47-
- [ ] Fill the release description with a Markdown version of the latest changelog entry (including the DOI badge)
33+
- [ ] Fill the release description with a Markdown version of the latest changelog entry
4834
- [ ] Publish the release
4935

50-
## Publish to Zenodo
51-
52-
- [ ] Upload the zip archive from the GitHub release to Zenodo
53-
- [ ] Double check all information (date, authors, version)
54-
- [ ] Publish the new version on Zenodo
5536

5637
## Conda-forge package
5738

.github/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ firstPRMergeComment: >
2626
2727
We hope that this was a good experience for you. Let us know if there is any way that the contributing process could be improved.
2828
29+
Please add yourself as an author to both of the following files in a new PR: AUTHORS.md and .zenodo.json.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,12 @@ dmypy.json
144144
# Cython debug symbols
145145
cython_debug/
146146

147+
# git changes
148+
changes.md
149+
147150
# setuptools_scm
148151
src/*/_version.py
149152

150-
151153
# ruff
152154
.ruff_cache/
153155

.zenodo.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"title": "samplepackagename: short description",
3+
"description": "<p><strong>samplepackagename</strong> is a Python package ...</p><p><strong>Documentation</strong>: <a href=\"https://organizationname.github.io/samplepackagename/\">https://organizationname.github.io/samplepackagename/</a></p><p><strong>Source code</strong>: <a href=\"https://github.com/organizationname/samplepackagename\">https://github.com/organizationname/samplepackagename</a></p>",
4+
"creators": [
5+
{
6+
"orcid": "your ORCID",
7+
"affiliation": "Institute, Country",
8+
"name": "Lastname, Firstname"
9+
}
10+
]
11+
}

AUTHORS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Project Authors
1+
# samplepackagename Authors
22

33
The following people have made contributions to the project (in alphabetical
44
order by last name) and are considered "The samplepackagename Developers":
55

6-
* [name](https://github.com/<username>) - Institute, Country (ORCID: [<your ORDIC>](https://www.orcid.org/<your ORDIC>))
6+
* [Firstname, Lastname](https://github.com/<username>) - Institute, Country (ORCID: [<your ORCID>](https://www.orcid.org/<your ORCID>))

CHANGELOG.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### 🚀 Added
11+
- preview the docs in each PR with new GitHub Action
12+
- include a `.zenodo.json` file to set metadata for each Zenodo release
13+
1014
### ✏️ Changed
11-
* replace pre-commit GitHub action with pre-commit.ci
12-
* Switched website hosting from ReadTheDocs to GitHug Pages
13-
* Dropped support for Python 3.9, following the recommendation from [SPEC 0000](https://scientific-python.org/specs/spec-0000/)
15+
- replace pre-commit GitHub action with pre-commit.ci
16+
- Switched website hosting from ReadTheDocs to GitHug Pages
17+
- codespell now tries to ignore notebook outputs
18+
- improved the contribution guide
19+
- improved instructions for using this template
20+
- updated PyLint and MyPy ignored rules
21+
- removed forced-configuration of logging
22+
- use automated release of Zenodo from GitHub integration instead of manually drafting release
23+
- only build and distribute the `src/` directory when packaging
24+
25+
### ❌ Removed
26+
- Dropped support for Python 3.9, following the recommendation from [SPEC 0000](https://scientific-python.org/specs/spec-0000/)
27+
1428
<!--
1529
Below is an example for a release
1630
17-
## 0.0.1
31+
## v0.0.1
1832
Released on 2025-06-04
19-
DOI: https://zenodo.org/records/148521
2033
Contributors:
21-
* author1
22-
* author2
34+
- author1
35+
- author2
2336
2437
### 🚀 Added
25-
2638
- function `function2` for calculating something important.
2739
2840
### ✏️ Changed
29-
3041
- Changed the lower bounds on the pandas dependency from v1.5 to v1.2.
3142
3243
### ⚠️ Deprecated
33-
3444
- marked `function1` as deprecated, used the new `function2` instead.
3545
3646
### ❌ Removed
37-
3847
- removed the previously deprecated `function0`.
3948
4049
### 🐛 Fixed
41-
4250
- fixed a bug in `function1` which cause some error.
4351
4452
### 🛡️ Security
45-
4653
- removed a password from the code.
4754
4855
-->
56+
57+
58+
## v0.0.1
59+
Released on 2025-07-11
60+
Contributors:
61+
- Matt Tankersley
62+
63+
Initial Release of Python_Package_Template!

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ contributions.
5353
- [Push your changes](#push-your-changes)
5454
- [Open a PR](#open-a-pr)
5555
- [Code review](#code-review)
56+
- [Sync your fork and local](#sync-your-fork-and-local)
57+
- [Add yourself as an author](#add-yourself-as-an-author)
5658
* [Publish a new release](#publish-a-new-release)
5759
* [Update the Dependencies](#update-the-dependencies)
5860

@@ -373,6 +375,10 @@ git push origin main
373375
```
374376
Now both your forked (upstream) and local repositories are sync with the upstream repository where the PR was merged.
375377

378+
### Add yourself as an author
379+
380+
Once you have merged your PR, open a new PR with your details added to the files `AUTHORS.md` and `.zenodo.json`. With each new release, Zenodo will add you as an author to package.
381+
376382
## Publish a new release
377383

378384
This will almost always be done by the developers, but as a guide for them, here are instructions on how to release a new version of the package.

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Steps:
3636
- your name can be "Maintainers of <samplepackagename>" if there are multiple people.
3737
- replace all instances of `organizationname` with your GitHub organization (or personal) account name, whichever is going to host the repository.
3838
- update `pyproject.yml` with a description (1 sentence) and keywords ()
39-
- add a description of your project here in the README, as well as in `docs/index.md`.
40-
- add your info to `AUTHORS.md`
39+
- add a description of your project here in the README, in `docs/index.md`, and in `.zenodo.json`.
40+
- add your info to `AUTHORS.md` and `.zenodo.json`
4141
- at this point, it might be good to make your initial commit to your repository with the following git commands:
4242
```bash
4343
git checkout -b new-branch
@@ -151,6 +151,9 @@ Steps:
151151
- for every push to `main` (from a PR), the site will be updated
152152
14) Finalize
153153
- remove all the above instructions and raise any issues in this template's repository if you have any suggestion or found any errors in this template!
154+
- replace all instances of "zenodo_DOI" in this repository with your new Zenodo DOI.
155+
- if your Zenodo link is https://doi.org/10.5281/zenodo.15863068,, your DOI is just 15863068
156+
- make sure to use the DOI from the `Cite all versions?` portion of your Zenodo page.
154157
- if you want, please submit a PR to this repository to add your package to this list at the top of this README to showcase it!
155158
156159
# samplepackagename
@@ -162,6 +165,7 @@ Short description of your package.
162165
[![PyPI version][pypi-version]][pypi-link]
163166
[![Conda-Forge][conda-badge]][conda-link]
164167
[![PyPI platforms][pypi-platforms]][pypi-link]
168+
[![Zenodo][zenodo-badge]][zenodo-link]
165169
166170
[![GitHub Discussion][github-discussions-badge]][github-discussions-link]
167171
@@ -179,7 +183,8 @@ Short description of your package.
179183
[pypi-version]: https://img.shields.io/pypi/v/samplepackagename
180184
[website-badge]: https://github.com/organizationname/samplepackagename/actions/workflows/pages/pages-build-deployment/badge.svg
181185
[website-link]: https://organizationname.github.io/samplepackagename/
182-
186+
[zenodo-badge]: https://zenodo.org/badge/DOI/10.5281/zenodo.zenodo_DOI.svg
187+
[zenodo-link]: https://doi.org/10.5281/zenodo.zenodo_DOI
183188
<!-- prettier-ignore-end -->
184189
185190
<!-- SPHINX-END-badges -->

docs/citing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ This is research software made by scientists. Citations help us justify the effo
44

55
If you used `samplepackagename` in your research, please consider citing our software.
66

7-
If you would like to cite the specific version you used, which can improve reproducibility and let users know the state of the software at the time of your analysis, please use the version-specific citation and DOI (available from [Zenodo](https://doi.org/10.5281/zenodo.15863068)).
7+
If you would like to cite the specific version you used, which can improve reproducibility and let users know the state of the software at the time of your analysis, please use the version-specific citation and DOI (available from [Zenodo](https://doi.org/10.5281/zenodo.zenodo_DOI)).

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ build.hooks.vcs.version-file = "src/samplepackagename/_version.py"
7272
dependencies = []
7373
scripts.test = "pytest {args}"
7474

75+
[tool.hatch.build.targets.sdist]
76+
only-include = ["src"]
7577

7678
[tool.pytest.ini_options]
7779
minversion = "6.0"

0 commit comments

Comments
 (0)