Skip to content

Commit a823a1f

Browse files
authored
minor doc chagnes (#25)
1 parent b39ca49 commit a823a1f

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ contributions.
4343
- [General guidelines](#general-guidelines)
4444
- [Fork the repository](#fork-the-repository)
4545
- [Clone the repository](#clone-the-repository)
46-
- [Setting up Nox](#setting-up-nox)
46+
- [Setting up nox](#setting-up-nox)
4747
- [Setting up your environment](#setting-up-your-environment)
4848
- [Make a branch](#make-a-branch)
4949
- [Make your changes](#make-your-changes)
@@ -173,7 +173,7 @@ You can install nox with `pip install nox`.
173173

174174
### Setting up your environment
175175

176-
Run the following `make` command to create a new environment and install the package dependencies. If you don't have / want to install make, just copy the commands from the Makefile file and run them in the terminal.
176+
Run the following `make` commands to create a new environment and install the package dependencies. If you don't have / want to install make, just copy the commands from the Makefile file and run them in the terminal.
177177

178178
```
179179
make create
@@ -387,7 +387,6 @@ Follow all the above instructions for formatting. Push your changes to a new or
387387

388388
Open a new issue, selecting the `Release-Checklist` template, and follow the direction there.
389389

390-
391390
### PyPI (pip)
392391
PyPI release are made automatically via GitHub actions whenever a pull request is merged.
393392

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The below steps will create a complete Python package with testing, a documentat
1414

1515
Steps:
1616
1) Initiate your repository:
17-
- On this [template's page](https://github.com/mdtanker/python_package_template), click the `Use this template` button to `Create a new repository`.
17+
- on this [template's page](https://github.com/mdtanker/python_package_template), click the `Use this template` button to `Create a new repository`.
1818
- choose a project name
1919
- for simplicity, this name will be used for all of the follow: the folder name that holds this repository as well as the code folder under `src/`, the name of the python package on both PyPI and Conda-Forge, and the repository name on GitHub. Because of these constraints, the best choice is a lowercase word with no spaces or punctuation. While capitalization and punctuation may help readability, they greatly increase the hassle during various stages of the packaging. Ensure your chosen name is available on both [PyPI](https://pypi.org/) and [Conda-Forge](https://conda-forge.org/packages/).
2020
- choose if you want the repository in your personal account or in one of your organization's accounts.
@@ -35,7 +35,7 @@ Steps:
3535
- replace all instances of `yourname` with your name
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.
38-
- update `pyproject.yml` with a description (1 sentence) and keywords ()
38+
- update `pyproject.yml` with a description (1 sentence) and keywords.
3939
- add a description of your project here in the README, in `docs/index.md`, and in `.zenodo.json`.
4040
- add your info (name, affiliate, ORCID) 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:
@@ -87,16 +87,18 @@ Steps:
8787
- dependencies for your package should typically only be those that are directly used (imported) in your source code (or are explicitly needed but not import), but not the dependencies of your dependencies. If you use a package in your documentation, but not in the source code, include this as an _optional_ dependency. If you have a portion of your code that some users may not utilize, such as visualization functions, the dependencies you require for that, such as matplotlib, can also be include as _optional_ dependencies to reduces the constraints for users who don't require it.
8888
- core dependencies are specified in `pyproject.toml` under the `[project]` section with the format `dependencies = ["pandas", "scipy>=1.0"]`.
8989
- optional dependencies are specified in `pyproject.toml` under the `[dependency-groups]` section with the following format, for example for optional documentation dependencies: `docs = ["sphinx>=7.0",]`.
90-
- Dependency version's should only be constrained to specific versions if you know there is an issue, and they should almost never be pinned to specific versions, as this will cause many issues for anyone who wants to use your package in their own environments.
91-
- this template also includes files and commands to create `conda` environments. These are used both in developing, and in GitHub automations. You need to manually ensure the dependencies listed in `environmental.yml` match those in `pyproject.toml`. Include all optional dependencies in the `environmental.yml`. If a dependency is only available via pip, and not conda, add it at the bottom to be installed via pip.
90+
- if you know your package has an issue with a specific version of a dependency, you can set a max or min version with "scipy>=1.0".
91+
- dependencies should almost never be pinned to specific versions, as this will cause many issues for anyone who wants to use your package in their own environments.
92+
- for standard scientific packages (i.e., `pandas`, `xarray`, and `numpy`), as well as the version of Python, it's recommended to set minimum support versions following the timeline of [SPEC 0 guidelines](https://scientific-python.org/specs/spec-0000/).
93+
- this template also includes files and commands to create `conda` environments. These are used both in developing, and in GitHub automations. You need to manually ensure the dependencies listed in `environment.yml` match those in `pyproject.toml`. Include all optional dependencies in the `environment.yml`. If a dependency is only available via pip, and not conda, add it at the bottom to be installed via pip.
9294
6) Create environment, style check, test, and commit your changes.
9395
- follow the instructions in `CONTRIBUTING.md` starting at section `Setting up nox` and stopping before `Publish a new release`.
9496
- these steps should result in a merged PR with your code.
9597
7) Set up automated Zenodo releases (only for Public repositories)
9698
- if you haven't already, link your organization (or personal) GitHub account to [Zenodo](https://zenodo.org/) using `Linked accounts` under your Zenodo profile.
9799
- do to the `GitHub` menu on your Zenodo profile.
98100
- click the Sync button and then turn on the switch for your repository.
99-
- any future GitHub releases should now result in a new Zenodo release automatically.
101+
- any future GitHub releases should now result in a new Zenodo release and DOI automatically.
100102
8) Set up publishing on TestPyPI
101103
- before publishing to the real PyPI, we will publish to Test-PyPI to ensure everything works .
102104
- make an account on [TestPyPI](https://test.pypi.org/).
@@ -122,9 +124,9 @@ Steps:
122124
nox -s test
123125
```
124126
10) Make a PyPI (pip) release
125-
- If the install and test above worked then we can change from TestPyPI to normal PyPI.
127+
- if the install and test above worked then we can change from TestPyPI to normal PyPI.
126128
- in `.github/workflows/cd.yml` comment out or delete the last line: `repository-url: https://test.pypi.org/legacy/`. Now any future reruns of this action will release to PyPI.
127-
- In this case, since the GitHub release has already been made, we need to manually trigger the `CD` workflow in GitHub.
129+
- in this case, since the GitHub release has already been made, we need to manually trigger the `CD` workflow in GitHub.
128130
- At [this link](https://github.com/organizationname/samplepackagename/actions/workflows/cd.yml), click the `Run workflow` button.
129131
- This should build the package and release it to PyPI.
130132
11) Set up publishing on Conda-Forge

0 commit comments

Comments
 (0)