Skip to content

Commit 88c7eff

Browse files
committed
Apply #110 from @nicole-numfocus by hand
1 parent 2f3ad85 commit 88c7eff

File tree

1 file changed

+81
-59
lines changed

1 file changed

+81
-59
lines changed
Lines changed: 81 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,88 @@
1-
# Policy on pull request review and merging in the Astropy Project
1+
# Astropy Project Pull Request Review & Merging Policy
22

3-
## Astropy core
3+
## Astropy Core Package
44

5-
In the astropy core package the requirements are as follows:
5+
When submitting a pull request (PR) in the Astropy core package the following
6+
process must take place before it can be accepted. If the pull request fails any
7+
of the reviews or checks it must be amended and undergo additional review before
8+
being accepted.
9+
10+
### Review & Approval
11+
12+
All pull requests will be reviewed by at least one contributor with relevant
13+
expertise to ensure that:
614

7-
- At least one contributor with relevant expertise must review the pull request
8-
in detail.
915
- New or updated code is correct and achieves the desired effect of
1016
either fixing a bug or making an enhancement.
1117
- New tests or modifications to tests are adequate to cover the code changes.
12-
Tests for edge cases exist, if applicable and judged to be important enough.
18+
Tests for edge cases exist where applicable and judged to be sufficiently
19+
important.
1320
- There are no API changes or the API changes are well-understood and
14-
acceptable and beneficial on the whole to the astropy user community, and documented as an API change in the changelog.
15-
- The expected level of review is detailed, including review and suggestions
16-
at the line-by-line level (although "I looked and had no comments" is a valid answer). Formatting and style are acceptable points for
17-
comment, in particular to maintain the existing coding style of a package and to
18-
maintain readability of the code base for future developers.
19-
- Maintainer(s) of subpackages that the contribution affects are required to
20-
approve the pull request for changes that require specific knowledge of a
21-
subpackage. Other less complex cases, for example a documentation
22-
improvement, may be reviewed by any astropy core package maintainer.
23-
- While a maintainer does not have to be the one doing the detailed review, if
24-
the detailed review is by someone else, the maintainer is responsible for
25-
ensuring the contributor review is sufficiently detailed and follows these
26-
guidelines.
27-
- Following a successful review, maintainers should formally approve the pull
28-
request.
29-
- A release manager or maintainer checks that the selected release
30-
milestone is suitable for the scope of the change. In particular bug-fix
31-
backports are considered where feasible and sensible.
32-
Documentation is usually backported. API change or new feature changes
33-
are not backported unless under special circumstances.
34-
- A matrix of CI checks ensure that all existing tests pass on supported
35-
platforms. Even the CI job that is allowed to fail should pass unless
36-
an known and unrelated failure occurs; i.e., look at the logs even in
37-
the event of green check mark.
38-
- An automated tool checks that the change log mentions the change and PR number and that the change log
39-
section used matches the selected release milestone set by the maintainer.
40-
- Merging the pull request can be done by any core package maintainer once
41-
approved by relevant maintainers (as described above). In practice this is
42-
sometimes the PR developer and sometimes the reviewer.
43-
44-
## Astropy coordinated and infrastructure packages
45-
46-
The process should in general be similar to the core package, although since a
47-
number of coordinated and infrastructure packages have fewer maintainers, the
48-
concept of subpackages is not relevant. Nevertheless, all coordinated and
49-
infrastructure packages should have at least two maintainers with push access.
50-
All changes to these packages should be done via pull requests, and approved by
51-
at least one of the other maintainers (any maintainer can then merge the pull
52-
request provided it is approved).
53-
54-
## Astropy affiliated packages
55-
56-
The change process required by the Astropy Project for affiliated packages are
57-
substantially less rigid than in the Astropy core package. However, each
58-
affiliated package may make their requirements as rigorous as they’d like.
59-
- It is required to maintain the code under version control on a publicly
60-
available site.
61-
- In most cases packages are hosted on GitHub or GitLab and updated via pull
62-
requests, but this is not a requirement.
63-
- Independent review is encouraged but is at the discretion of the package
64-
maintainer(s). In particular some packages may be largely developed by a
65-
single maintainer.
66-
- For affiated packages with enough contributors, the workflow for the core/coordinated packages is recommended, although not required.
21+
acceptable and beneficial on the whole to the Astropy user community, and
22+
are documented as an API change in the changelog.
23+
- Formatting and style maintain the existing style of a package and
24+
readability of the code base for future developers.
25+
26+
Reviews will be detailed and should include review and suggestions at the
27+
line-by-line level, although "I looked and had no comments" is a valid answer
28+
29+
For pull requests that require specific knowledge of a sub-package, a maintainer
30+
of the sub-package that the contribution affects is required to approve. For
31+
other less complex cases, for example a documentation improvement, review may be
32+
conducted by any Astropy core package maintainer.
33+
34+
While a core package maintainer does not have to be the one performing the
35+
review, if the review is performed by someone else, that maintainer is
36+
responsible for ensuring the contributor review is sufficiently detailed and
37+
follows these guidelines.
38+
39+
After successful review, the maintainer(s) will formally approve the pull
40+
request.
41+
42+
### Additional Checks
43+
44+
Additional checks will be performed to verify that there are no other issues
45+
with the pull request, for example:
46+
47+
- A release manager or maintainer will check that the selected release milestone
48+
is suitable for the scope of the change. In particular bug-fix backports are
49+
considered where feasible and sensible. Documentation is usually backported.
50+
API changes or new feature changes are not backported unless under special
51+
circumstances.
52+
- A matrix of CI checks will be run to ensure that all existing tests pass on
53+
supported platforms. Even CI jobs that are allowed to fail should still pass
54+
unless a known and unrelated failure occurs; i.e., look at the logs even in
55+
the event of a green check mark.
56+
- An automated tool will check that the change log mentions the change and PR
57+
number and that the change log section used matches the selected release
58+
milestone set by the maintainer.
59+
60+
### Merging
61+
62+
The pull request will be merged once it is approved by relevant maintainers (as
63+
described above) and has passed all necessary checks. This can be done by any
64+
core package maintainer. In practice this is sometimes the PR developer and
65+
sometimes the reviewer.
66+
67+
## Astropy Coordinated & Infrastructure Packages
68+
69+
The process of PR approval for coordinated and infrastructure packages should be
70+
the same as the process for the core package except that reviews and approvals
71+
can be done by any maintainer. Coordinated and infrastructure packages should
72+
have at least two maintainers with push access and all PRs should be approved by
73+
at least one of the other maintainers. Any maintainer can then merge the pull
74+
request once it is approved.
75+
76+
## Astropy Affiliated Packages
77+
78+
The change process for affiliated packages is largely at the discretion of the
79+
package maintainers. Affiliated packages may make their requirements as rigorous
80+
or as lenient as they like. However, the Astropy Project does require that
81+
affiliated packages maintain the code under version control on a publicly
82+
available site.
83+
84+
In most cases packages are hosted on GitHub or GitLab and updated via pull
85+
requests, but this is not a requirement. Independent review is encouraged but is
86+
at the discretion of the package maintainer(s) as some packages may be largely
87+
developed by a single maintainer. Please see the affiliated package’s
88+
documentation for more information.

0 commit comments

Comments
 (0)