Skip to content

Commit d7ee3f4

Browse files
authored
update contribute guide and readme (#9)
* update contribute guide and readme * update release checklist * update codespell checks * update mypy checks
1 parent 6e64982 commit d7ee3f4

5 files changed

Lines changed: 31 additions & 29 deletions

File tree

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ assignees: ''
1212
<!-- Optional -->
1313
**Target date:** YYYY/MM/DD
1414

15+
## Update dependencies
16+
17+
- [ ] Check all the dependency changes since the last release are reflected in `environment.yml`
18+
1519
## Draft a Zenodo archive (to be done by a manager on Zenodo)
1620

1721
- [ ] Go to the Zenodo entry for this project (find the link to the latest Zenodo release on the `README.md` file)
@@ -28,7 +32,7 @@ assignees: ''
2832
## Update the changelog
2933

3034
- [ ] Generate a list of commits between the last release tag and now: `git log HEAD...v1.2.3 > changes.md`
31-
- [ ] Use this to summary the major changes to the code and add short descriptions to `CHANGELOG.md` (not `docs/changelog.md`!).
35+
- [ ] Use this to summarize the major changes to the code and add short descriptions to `CHANGELOG.md` (not `docs/changelog.md`!).
3236
- [ ] Add the release date and Zenodo DOI badge to the top
3337
- [ ] Add contributors to the list
3438
- [ ] Open a PR to update the changelog

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ repos:
6767
- id: codespell
6868
additional_dependencies:
6969
- tomli; python_version<'3.11'
70+
entry:
71+
codespell --ignore-regex='[A-Za-z0-9+/]{100,}'
72+
--skip="*.js,*.html,*.css,*.svg"
7073

7174
- repo: https://github.com/shellcheck-py/shellcheck-py
7275
rev: "v0.10.0.1"

CONTRIBUTING.md

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
## TLDR (Too long; didn't read)
44
* [fork](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) the [repository](https://github.com/organizationname/samplepackagename) using the `Fork` button on GitHub.
5-
* clone your forked repository on your computer with `git clone https://github.com/organizationname/samplepackagename`.
6-
* [create a branch](https://docs.github.com/en/get-started/using-github/github-flow#create-a-branch) for your edits with `git branch new-branch`
7-
* make your changes and run the style checkers with `nox -s style`
8-
* once the style checks pass, commit your changes with `git commit -m "a short description of your changes"`
9-
* push your changes with `git push -u origin new-branch`
5+
* clone your forked repository on your computer: `git clone https://github.com/organizationname/samplepackagename`.
6+
* [create a branch](https://docs.github.com/en/get-started/using-github/github-flow#create-a-branch) for your edits: `git checkout -b new-branch`
7+
* make your changes
8+
* run the style checkers: `nox -s style`
9+
* add your changed files: `git add .`
10+
* once the style checks pass, commit your changes: `git commit -m "a short description of your changes"`
11+
* push your changes: `git push -u origin new-branch`
1012
* [make a Pull Request](http://makeapullrequest.com/) for your branch from the main GitHub repository [PR page](https://github.com/organizationname/samplepackagename/pulls).
1113

1214
🎉 Thanks for considering contributing to this package! 🎉
@@ -53,7 +55,6 @@ contributions.
5355
- [Code review](#code-review)
5456
* [Publish a new release](#publish-a-new-release)
5557
* [Update the Dependencies](#update-the-dependencies)
56-
* [Release Checklist](#release-checklist)
5758

5859
## What Can I Do?
5960

@@ -192,7 +193,7 @@ This environment now contains your local, editable version of samplepackagename,
192193
Instead of editing the main branch, which should remain stable, we create a `branch` and edit that. To create a new branch, called `new-branch` use the following command:
193194

194195
```bash
195-
git branch new-branch
196+
git checkout -b new-branch
196197
```
197198

198199
### Make your changes
@@ -277,9 +278,9 @@ Leave a comment in the PR and we'll help you out.
277278

278279
### Documentation
279280

280-
The Docs are build with `Sphinx` and `Read the Docs`.
281+
The Docs are build with [Sphinx](https://www.sphinx-doc.org/en/master/) and hosted on [GitHub Pages](https://pages.github.com/).
281282

282-
> **Note:** The docs are automatically built on PR's by `RTD`, but it's good practice to build them manually before a PR, to check them for errors.
283+
> **Note:** The docs are automatically built on each commit to a PR, but if you've made significant changes to the docs its good practice to build them manually before a PR, to check them for errors.
283284
284285
#### Check the build manually (optional)
285286

@@ -292,16 +293,11 @@ You can build the docs using:
292293
nox -s docs
293294
```
294295

295-
or if you don't want them to automatically update
296-
```bash
297-
nox -s docs --non-interactive
298-
```
296+
Click the link to open your docs in a website which will automatically update as you make edits.
299297

300298
#### Automatically build the docs
301299

302-
Add, commit, and push all changes to GitHub in a Pull Request, and `RTD` should automatically build the docs.
303-
304-
In each PR, you will see section of the checks for `RTD`. Click on this to preview the docs for the PR.
300+
Add, commit, and push all changes to GitHub in a Pull Request, and the docs should automatically be updated. If the PR can from the same repository (not a fork), then a preview of the updated docs should be available after a few minutes.
305301

306302
### Committing changes
307303

@@ -382,6 +378,9 @@ This will almost always be done by the developers, but as a guide for them, here
382378

383379
Follow all the above instructions for formatting. Push your changes to a new or existing Pull Request. Once the automated GitHub Actions run (and pass), merge the PR into the main branch.
384380

381+
Open a new issue, selecting the `Release-Checklist` template, and follow the direction there.
382+
383+
385384
### PyPI (pip)
386385
PyPI release are made automatically via GitHub actions whenever a pull request is merged.
387386

@@ -395,13 +394,3 @@ Once the new version is on conda, update the binder .yml file, as below.
395394
To add or update a dependencies, add it to `pyproject.toml` either under `dependencies` or `optional-dependencies`. This will be included in the next build uploaded to PyPI.
396395

397396
If you add a dependency necessary for using the package, make sure to add it to the Binder config file and update the `environment.yml` file in the repository. See below.
398-
399-
## Release Checklist
400-
* re-run any relevant notebooks
401-
* check docs are building correctly using the GitHub actions link within the PR
402-
* merge the PR
403-
* wait for `PyPI` to publish the new version [here](https://pypi.python.org/pypi/samplepackagename)
404-
* wait for a PR to be opened in the [feedstock](https://github.com/conda-forge/samplepackagename-feedstock)
405-
* update any changed dependencies in the feedstock PR and merge
406-
* wait for `conda` to publish the new version [here](https://anaconda.org/conda-forge/samplepackagename)
407-
* manually add dependency changes to `environment.yml`

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Steps:
145145
- for `Branch`, choose "gh-pages"
146146
- for `Select folder`, choose "root"
147147
- optionally choose a custom URL and hit save
148+
- in each PR there should be a preview for the new site
148149
- for every push to `main` (from a PR), the site will be updated
149150
14) Finalize
150151
- 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!
@@ -174,8 +175,8 @@ Short description of your package.
174175
[pypi-link]: https://pypi.org/project/samplepackagename/
175176
[pypi-platforms]: https://img.shields.io/pypi/pyversions/samplepackagename
176177
[pypi-version]: https://img.shields.io/pypi/v/samplepackagename
177-
[website-badge]: https://github.com/mdtanker/python_package_template/actions/workflows/pages/pages-build-deployment/badge.svg
178-
[website-link]: https://mdtanker.github.io/python_package_template/
178+
[website-badge]: https://github.com/organizationname/samplepackagename/actions/workflows/pages/pages-build-deployment/badge.svg
179+
[website-link]: https://organizationname.github.io/samplepackagename/
179180
180181
<!-- prettier-ignore-end -->
181182

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
102102
warn_unreachable = true
103103
disallow_untyped_defs = false
104104
disallow_incomplete_defs = false
105+
ignore_missing_imports = true
106+
disallow_untyped_decorators = false
105107

106108
[[tool.mypy.overrides]]
107109
module = "samplepackagename.*"
@@ -161,3 +163,6 @@ messages_control.disable = [
161163
"missing-function-docstring",
162164
"wrong-import-position",
163165
]
166+
167+
[tool.codespell]
168+
ignore-words-list = ["word_to_ignore"]

0 commit comments

Comments
 (0)