-
Notifications
You must be signed in to change notification settings - Fork 308
Simplify pull request checklist #7096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
trexfeathers
wants to merge
6
commits into
SciTools:main
Choose a base branch
from
trexfeathers:contributing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
15312e7
Use a simpler pull request checklist, part of the GitHub template.
trexfeathers 5742f61
Updates to Code Formatting page.
trexfeathers 29e520c
Improved formatting of benchmarks docs.
trexfeathers bae23cf
Updates to Contributing a Whats New page.
trexfeathers c9b51e9
Correct PR number curl command.
trexfeathers 8a74da3
What's New entry.
trexfeathers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,22 @@ | ||
| ## 🚀 Pull Request | ||
| ## Description | ||
|
|
||
| ### Description | ||
| <!-- Provide a clear description about your awesome pull request --> | ||
| <!-- Tell us all about your new feature, improvement, or bug fix --> | ||
| _Please describe your awesome pull request_ | ||
|
|
||
| ## Checklist | ||
|
|
||
| --- | ||
| [Consult Iris pull request check list]( https://scitools-iris.readthedocs.io/en/latest/developers_guide/contributing_pull_request_checklist.html) | ||
| (In addition to a full set of [passing checks](https://scitools-iris.readthedocs.io/en/latest/developers_guide/contributing_ci_tests.html) :white_check_mark:) | ||
|
|
||
| --- | ||
| Add any of the below labels to trigger actions on this PR: | ||
| - [ ] Included a [**What's New**](https://scitools-iris.readthedocs.io/en/latest/developers_guide/documenting/whats_new_contributions.html) entry | ||
| - [ ] Incorporated [**type hints**](https://scitools-iris.readthedocs.io/en/latest/developers_guide/contributing_code_formatting.html#type-hinting) in any changed code | ||
| - [ ] Checked if [**tests**](https://scitools-iris.readthedocs.io/en/latest/developers_guide/contributing_tests.html) need updating | ||
| - [ ] Checked if [**benchmarks**](../benchmarks/README.md#writing-benchmarks) need updating | ||
| - [ ] Checked if **documentation** needs updating | ||
| - [Docstrings](https://scitools-iris.readthedocs.io/en/latest/developers_guide/documenting/docstrings.html) (we love code examples!) | ||
| - [User Manual](https://scitools-iris.readthedocs.io/en/latest/user_manual/) pages | ||
| - [ ] Checked if [**dependencies**](https://scitools-iris.readthedocs.io/en/latest/developers_guide/contributing_ci_tests.html#gha-test-env) need updating | ||
|
|
||
| - https://github.com/SciTools/iris/labels/benchmark_this | ||
| --- | ||
| > [!TIP] | ||
| > Add any of the below labels to trigger actions on this PR: | ||
| > | ||
| > - https://github.com/SciTools/iris/labels/benchmark_this |
|
ESadek-MO marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
ESadek-MO marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,15 @@ | |
| Code Formatting | ||
| =============== | ||
|
|
||
| To ensure a consistent code format throughout Iris, we recommend using | ||
| tools to check the source directly. | ||
| Also known as 'linting'. This is used to ensure a consistent code format | ||
| throughout Iris, maximising the maintainability and quality. Code formatting | ||
| is checked using the `pre-commit`_ tool, and the full list current formatting | ||
| tools is defined in Iris' `pre-commit-config.yaml`_ file. Read more about | ||
| linting on the `SciTools wiki page`_. | ||
|
|
||
| * `black`_ for an opinionated coding auto-formatter | ||
| * `flake8`_ linting checks | ||
|
|
||
| The preferred way to run these tools automatically is to setup and configure | ||
| `pre-commit`_. | ||
| ``pre-commit`` compliance is automatically checked on all Iris pull requests | ||
| (more info: :ref:`pre_commit_ci`), but you can also run pre-commit locally as | ||
| Git hooks - every time you make a commit: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The punctuation feels a bit janky here, but I'm realising I may just have a bias against colons. |
||
|
|
||
| You can install ``pre-commit`` in your development environment using ``pip``:: | ||
|
|
||
|
|
@@ -32,15 +33,14 @@ the root directory of Iris:: | |
|
|
||
| $ pre-commit install | ||
|
|
||
| Upon performing a ``git commit``, your code will now be automatically formatted | ||
| to the ``black`` configuration defined in our ``pyproject.toml`` file, and | ||
| linted according to our ``.flake8`` configuration file. Note that, | ||
| Upon performing a ``git commit``, your code changes will be automatically | ||
| checked against all Iris' ``pre-commit`` hooks. For some hooks this includes | ||
| automated edits of your code e.g. formatting or sorting of imports; these new | ||
| edits are not staged for you - i.e. you need to run ``git add`` again on that | ||
| file. Note that, | ||
| ``pre-commit`` will automatically download and install the necessary packages | ||
| for each ``.pre-commit-config.yaml`` git hook. | ||
|
|
||
| Additionally, you may wish to enable ``black`` for your preferred | ||
| `editor/IDE <https://black.readthedocs.io/en/stable/integrations/editors.html#editor-integration>`_. | ||
|
|
||
| With the ``pre-commit`` configured, the output of performing a ``git commit`` | ||
| will look similar to:: | ||
|
|
||
|
|
@@ -54,8 +54,7 @@ will look similar to:: | |
| 2 files changed, 10 insertions(+), 9 deletions(-) | ||
|
|
||
|
|
||
| .. note:: You can also run `black`_ and `flake8`_ manually. Please see the | ||
| their officially documentation for more information. | ||
| .. _type_hinting: | ||
|
|
||
| Type Hinting | ||
| ------------ | ||
|
|
@@ -67,3 +66,5 @@ add/improve them. | |
|
|
||
|
|
||
| .. _pre-commit: https://pre-commit.com/ | ||
| .. _pre-commit-config.yaml: https://github.com/SciTools/iris/blob/main/.pre-commit-config.yaml | ||
| .. _SciTools wiki page: https://github.com/SciTools/.github/wiki/Linting | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ESadek-MO we might consider some messaging in here to avoid scaring new contributors? Some form of "we can help, don't worry".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'd agree, I think that'd be nice. I can't think of phrasing though 😂