Skip to content

Commit 6445868

Browse files
committed
CI: repository configuration
1 parent 0402e74 commit 6445868

File tree

4 files changed

+115
-59
lines changed

4 files changed

+115
-59
lines changed

.github/CONTRIBUTING.md

Lines changed: 56 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,74 @@
1-
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
2-
description of best practices for developing scientific packages.
1+
# Contributing
32

4-
[spc-dev-intro]: https://learn.scientific-python.org/development/
3+
## Getting Started
54

6-
# Quick development
5+
* Make sure you have a [GitHub account](https://github.com/signup/free)
6+
* Submit a ticket for your issue, assuming one does not already exist.
7+
* Clearly describe the issue including steps to reproduce when it is a bug.
8+
* Make sure you fill in the earliest version that you know has the issue.
9+
* Fork the repository on GitHub
710

8-
The fastest way to start with development is to use nox. If you don't have nox,
9-
you can use `uvx nox` to run it without installing, or `uv tool install nox`. If
10-
you don't have uv, you can
11-
[install it a variety of ways](https://docs.astral.sh/uv/getting-started/installation/),
12-
including with pip, pipx, brew, and just downloading the binary (single file).
1311

14-
To use, run `nox`. This will lint and test using every installed version of
15-
Python on your system, skipping ones that are not installed. You can also run
16-
specific jobs:
12+
## Making Changes
1713

18-
```console
19-
$ nox -s lint # Lint only
20-
$ nox -s tests # Python tests
21-
$ nox -s docs # Build and serve the docs
22-
$ nox -s build # Make an SDist and wheel
23-
```
24-
25-
Nox handles everything for you, including setting up an temporary virtual
26-
environment for each run.
14+
* Create a topic branch from where you want to base your work.
15+
* This is usually the master branch.
16+
* Only target release branches if you are certain your fix must be on that
17+
branch.
18+
* To quickly create a topic branch based on master; `git checkout -b
19+
fix/master/my_contribution master`. Please avoid working directly on the
20+
`master` branch.
21+
* Make commits of logical units.
22+
* Check for unnecessary whitespace with `git diff --check` before committing.
23+
* Make sure your commit messages are in the proper format (see below)
24+
* Make sure you have added the necessary tests for your changes.
25+
* Run _all_ the tests to assure nothing else was accidentally broken.
2726

28-
# Setting up a development environment manually
27+
### Writing the commit message
2928

30-
You can set up a development environment by running:
29+
Commit messages should be clear and follow a few basic rules. Example:
3130

32-
```bash
33-
uv sync
3431
```
32+
ENH: add functionality X to bluesky.<submodule>.
3533
36-
# Pre-commit
37-
38-
You should prepare pre-commit, which will help you by checking that commits pass
39-
required checks:
40-
41-
```bash
42-
uv tool install pre-commit # or brew install pre-commit on macOS
43-
pre-commit install # Will install a pre-commit hook into the git repo
34+
The first line of the commit message starts with a capitalized acronym
35+
(options listed below) indicating what type of commit this is. Then a blank
36+
line, then more text if needed. Lines shouldn't be longer than 72
37+
characters. If the commit is related to a ticket, indicate that with
38+
"See #3456", "See ticket 3456", "Closes #3456" or similar.
4439
```
4540

46-
You can also/alternatively run `pre-commit run` (changes only) or
47-
`pre-commit run --all-files` to check even without installing the hook.
41+
Describing the motivation for a change, the nature of a bug for bug fixes
42+
or some details on what an enhancement does are also good to include in a
43+
commit message. Messages should be understandable without looking at the code
44+
changes.
4845

49-
# Testing
50-
51-
Use pytest to run the unit checks:
52-
53-
```bash
54-
uv run pytest
46+
Standard acronyms to start the commit message with are:
5547
```
56-
57-
# Coverage
58-
59-
Use pytest-cov to generate coverage reports:
60-
61-
```bash
62-
uv run pytest --cov=save-and-restore-api
48+
API: an (incompatible) API change
49+
BLD: change related to building numpy
50+
BUG: bug fix
51+
CI : continuous integration
52+
DEP: deprecate something, or remove a deprecated object
53+
DEV: development tool or utility
54+
DOC: documentation
55+
ENH: enhancement
56+
MNT: maintenance commit (refactoring, typos, etc.)
57+
REV: revert an earlier commit
58+
STY: style fix (whitespace, PEP8)
59+
TST: addition or modification of tests
60+
REL: related to releases
6361
```
62+
## The Pull Request
6463

65-
# Building docs
66-
67-
You can build and serve the docs using:
64+
* Now push to your fork
65+
* Submit a [pull request](https://help.github.com/articles/using-pull-requests) to this branch. This is a start to the conversation.
6866

69-
```bash
70-
nox -s docs
71-
```
72-
73-
You can build the docs only with:
67+
At this point you're waiting on us. We like to at least comment on pull requests within three business days
68+
(and, typically, one business day). We may suggest some changes or improvements or alternatives.
7469

75-
```bash
76-
nox -s docs --non-interactive
77-
```
70+
Hints to make the integration of your changes easy (and happen faster):
71+
- Keep your pull requests small
72+
- Don't forget your unit tests
73+
- All algorithms need documentation, don't forget the .rst file
74+
- Don't take changes requests to change your code personally

.github/ISSUE_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--- Provide a general summary of the issue in the Title above -->
2+
3+
## Expected Behavior
4+
<!--- If you're describing a bug, tell us what should happen -->
5+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
6+
7+
## Current Behavior
8+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
9+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
10+
11+
## Possible Solution
12+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
13+
<!--- or ideas how to implement the addition or change -->
14+
15+
## Steps to Reproduce (for bugs)
16+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
17+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
18+
1.
19+
2.
20+
3.
21+
22+
## Context
23+
<!--- How has this issue affected you? What are you trying to accomplish? -->
24+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
25+
26+
## Your Environment
27+
<!--- Include as many relevant details about the environment you experienced the bug in -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
<!--- Describe your changes in detail -->
5+
6+
## Motivation and Context
7+
<!--- Why is this change required? What problem does it solve? -->
8+
<!--- If it fixes an open issue, please link to the issue here. -->
9+
10+
## Summary of Changes for Release Notes
11+
<!--- Brief summary of changes that could be copied to the Release Notes. -->
12+
<!--- Skip this section if this is a maintenance PR (CI, unit tests, typo fix etc.) -->
13+
<!--- PRs with feature changes will not be merged without this section filled. -->
14+
15+
<!--- Group the changes in the following sections: -->
16+
17+
### Fixed
18+
19+
### Added
20+
21+
### Changed
22+
23+
### Removed
24+
25+
## How Has This Been Tested?
26+
<!--- Please describe in detail how you tested your changes. -->
27+
<!--- Include details of your testing environment, and the tests you ran to -->
28+
<!--- see how your change affects other areas of the code, etc. -->
29+
30+
<!--
31+
## Screenshots (if appropriate):
32+
-->

0 commit comments

Comments
 (0)