Skip to content

Commit e1560a1

Browse files
committed
remove instructions for conventional commit messages
1 parent 36d7bf4 commit e1560a1

1 file changed

Lines changed: 46 additions & 65 deletions

File tree

CONTRIBUTING.md

Lines changed: 46 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* make your changes
88
* run the style checkers: `nox -s style`
99
* add your changed files: `git add .`
10-
* once the style checks pass, commit your changes using the Conventional Commit: `git commit -m "feat: a short description of your changes"`
10+
* once the style checks pass, commit your changes: `git commit -m "a short description of your changes"`
1111
* push your changes: `git push -u origin new-branch`
1212
* [make a Pull Request](http://makeapullrequest.com/) for your branch from the main GitHub repository [PR page](https://github.com/mdtanker/polartoolkit/pulls).
1313

@@ -42,29 +42,41 @@ contributions.
4242

4343
## Contents
4444

45-
* [What Can I Do?](#what-can-i-do)
46-
* [Reporting a Bug](#reporting-a-bug)
47-
* [Editing the Documentation](#editing-the-documentation)
48-
* [Contributing Code](#contributing-code)
49-
- [General guidelines](#general-guidelines)
50-
- [Fork the repository](#fork-the-repository)
51-
- [Clone the repository](#clone-the-repository)
52-
- [Setting up Nox](#setting-up-nox)
53-
- [Setting up your environment](#setting-up-your-environment)
54-
- [Make a branch](#make-a-branch)
55-
- [Make your changes](#make-your-changes)
56-
- [Testing your code](#testing-your-code)
57-
- [Documentation](#documentation)
58-
- [Committing changes](#committing-changes)
59-
- [Push your changes](#push-your-changes)
60-
- [Open a PR](#open-a-pr)
61-
- [Code review](#code-review)
62-
- [Sync your fork and local](#sync-your-fork-and-local)
63-
- [Add yourself as an author](#add-yourself-as-an-author)
64-
* [Publish a new release](#publish-a-new-release)
65-
* [Update the Dependencies](#update-the-dependencies)
66-
* [Create a conda environment file](#create-a-conda-environment-file)
67-
* [Set up Binder](#set-up-the-binder-configuration)
45+
- [How to contribute](#how-to-contribute)
46+
- [TLDR (Too long; didn't read)](#tldr-too-long-didnt-read)
47+
- [Contents](#contents)
48+
- [What Can I Do?](#what-can-i-do)
49+
- [Reporting a Bug](#reporting-a-bug)
50+
- [Editing the Documentation](#editing-the-documentation)
51+
- [Contributing Code](#contributing-code)
52+
- [General guidelines](#general-guidelines)
53+
- [Fork the repository](#fork-the-repository)
54+
- [Clone the repository](#clone-the-repository)
55+
- [Setting up `nox`](#setting-up-nox)
56+
- [Setting up your environment](#setting-up-your-environment)
57+
- [Make a branch](#make-a-branch)
58+
- [Make your changes](#make-your-changes)
59+
- [Code style and linting](#code-style-and-linting)
60+
- [Docstrings](#docstrings)
61+
- [Type hints](#type-hints)
62+
- [Logging](#logging)
63+
- [Testing your code](#testing-your-code)
64+
- [Documentation](#documentation)
65+
- [Run all .ipynb's to update them](#run-all-ipynbs-to-update-them)
66+
- [Check the build manually (optional)](#check-the-build-manually-optional)
67+
- [Automatically build the docs](#automatically-build-the-docs)
68+
- [Committing changes](#committing-changes)
69+
- [Push your changes](#push-your-changes)
70+
- [Open a PR](#open-a-pr)
71+
- [Code review](#code-review)
72+
- [Sync your fork and local](#sync-your-fork-and-local)
73+
- [Add yourself as an author](#add-yourself-as-an-author)
74+
- [Publish a new release](#publish-a-new-release)
75+
- [PyPI (pip)](#pypi-pip)
76+
- [Conda-Forge](#conda-forge)
77+
- [Update the dependencies](#update-the-dependencies)
78+
- [Create a conda environment file](#create-a-conda-environment-file)
79+
- [Set up the binder configuration](#set-up-the-binder-configuration)
6880

6981
## What Can I Do?
7082

@@ -219,9 +231,9 @@ We use [pre-commit](https://pre-commit.com/) to check code style. This can be us
219231
nox -s lint
220232
```
221233

222-
To have `pre-commit` run automatically on commits, install it with `pre-commit install`
234+
To have `pre-commit` locally run automatically on commits, install it with `pre-commit install`. `pre-commit` will also automatically run for any commits to GitHub.
223235

224-
Go through the output of this and try to change the code based on the errors. Search the error codes on the [Ruff documentation](https://docs.astral.sh/ruff/), which should give suggestions. Re-run the check to see if you've fixed it. Somethings can't be resolved (unsplittable urls longer than the line length). For these, add `# noqa: []` at the end of the line and the check will ignore it. Inside the square brackets add the specific error code you want to ignore.
236+
Go through the output of the `pre-commit` logs and try to change the code based on the errors. Search the error codes on the [Ruff documentation](https://docs.astral.sh/ruff/), which should give suggestions. Re-run the check to see if you've fixed it. Somethings can't be resolved (unsplittable urls longer than the line length). For these, add `# noqa: []` at the end of the line and the check will ignore it. Inside the square brackets add the specific error code you want to ignore.
225237

226238
We also use [Pylint](https://pylint.readthedocs.io/en/latest/), which performs static-linting on the code. This checks the code and catches many common bugs and errors, without running any of the code. This check is slightly slower the the `Ruff` check. Run it with the following:
227239
```
@@ -289,7 +301,7 @@ Leave a comment in the PR and we'll help you out.
289301

290302
### Documentation
291303

292-
The Docs are build with [Sphinx](https://www.sphinx-doc.org/en/master/) and hosted on [Read the Docs](https://about.readthedocs.com/). Due to the above mentioned issues with the included C programs, `Read the Docs (RTD)` can't run the scripts which are part of the docs (i.e. the gallery examples). Because of this the notebooks don't execute on a build, as specified by `execute_notebooks: 'off'` in `_config.yml`. Here is how to run/update the docs on your local machine.
304+
The Docs are build with [Sphinx](https://www.sphinx-doc.org/en/master/) and hosted on [Read the Docs](https://about.readthedocs.com/). Due to the above mentioned issues with the included C programs, `Read the Docs (RTD)` can't run the scripts which are part of the docs (i.e. the gallery examples). Because of this the notebooks don't execute on a build, as specified by `execute_notebooks: 'off'` in `docs/config.py`. Here is how to run/update the docs on your local machine.
293305

294306
> **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.
295307
@@ -303,14 +315,15 @@ If your edits haven't changed any part of the core package, then there is no nee
303315

304316
You can build the docs using:
305317
```bash
306-
nox -s docs
318+
nox -s build_api_docs
307319
```
308320

309-
or if you don't want them to automatically update
310321
```bash
311-
nox -s docs --non-interactive
322+
nox -s docs
312323
```
313324

325+
Click the link to open your docs in a website which will automatically update as you make edits.
326+
314327
#### Automatically build the docs
315328

316329
Add, commit, and push all changes to GitHub in a Pull Request, and `RTD` should automatically build the docs.
@@ -321,41 +334,9 @@ In each PR, you will see section of the checks for `RTD`. Click on this to previ
321334

322335
### Committing changes
323336

324-
Once your have made your changes to your branch of your forked repository, you'll need to commit the changes to your remote fork. We use the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. This helps users and developers understand what types of changes have been implemented in a PR or between versions.
325-
```
326-
<type>: <description>
327-
328-
[optional body]
329-
```
330-
331-
Where `type` is one of the following:
332-
* `docs` --> a change to the documents
333-
* `style`--> simple fixes to the styling of the code
334-
* `feat` --> any new features
335-
* `fix` --> bug fixes
336-
* `build` --> changes to the package build process, i.e. dependencies, changelogs etc.
337-
* `chore` --> maintenance changes, like GitHub Action workflows
338-
* `refactor` --> refactoring of the code without user-seen changes
339-
340-
The `optional body` can include any detailed description.
341-
342-
Based on the commit types in a PR, one of four things will happen when;
343-
1) no new version will be released
344-
2) a `PATCH` version will be released (`v1.1.0 -> v1.1.1`)
345-
3) a `MINOR` version will be released (`v1.1.0 -> v1.2.0`)
346-
4) a `MAJOR` version will be released (`v1.1.0 -> v2.0.0`)
347-
348-
This follows [Semantic Versioning](https://semver.org/#summary) where given a version number `MAJOR.MINOR.PATCH`, the software should increment the:
349-
1) `MAJOR` version when you make incompatible API changes
350-
2) `MINOR` version when you add functionality in a backward compatible manner
351-
3) `PATCH` version when you make backward compatible bug fixes
352-
353-
While we decide this manually, generally the following will occur based on commit messages in your PR:
354-
355-
* `feat` will always result in a `MINOR` release
356-
* `fix` will always result in a `PATCH` release
337+
Once your have made your changes to your branch of your forked repository, you'll need to commit the changes to your remote fork.
357338

358-
Committing can be done interactively, if you use a editor like `VS Code`, or in the terminal.
339+
This can be done interactively, if you use a editor like `VS Code`, or in the terminal.
359340

360341
Stage your changes for a file:
361342
```bash
@@ -369,7 +350,7 @@ git add <directory>
369350

370351
Then commit those staged changes:
371352
```bash
372-
git commit -m "fix: a short description of your fix"
353+
git commit -m "a short description of your changes"
373354
```
374355

375356
### Push your changes

0 commit comments

Comments
 (0)