Skip to content

Commit dcbf9bd

Browse files
authored
Structure the CONTRIBUTING guide to define sprint tasks
2 parents 59d1e2f + 847d825 commit dcbf9bd

File tree

1 file changed

+86
-36
lines changed

1 file changed

+86
-36
lines changed

CONTRIBUTING.md

Lines changed: 86 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,114 @@
11
---
22
orphan: true
33
---
4-
# Contributing Guide for the Python open source software packaging book
4+
# Contributing to the Python Packaging Guide
55

6-
This is a community resource. We welcome contributions in the form of issues and/or pull requests to this guide.
6+
The guide is a community resource.
7+
8+
## TL;DR
9+
10+
We welcome contributions in the form of issues and pull requests:
711

812
* If you have an idea for something that should be included in the guide, [please open an issue here](https://github.com/pyOpenSci/python-package-guide/issues).
913
* If you find a typo, feel free to [submit a pull request](https://github.com/pyOpenSci/python-package-guide/pulls) to modify the text directly. Or, if you are less comfortable with pull requests, feel free to open an issue.
14+
* If you are interested in helping translate the guide into other languages, take a look at the [translation guide](./TRANSLATING.md).
1015
* If you want to see a larger change to the content of the guide book, please submit an issue first!
1116

12-
## How this guide is structured
17+
If you are unsure about how to contribute or are not familiar with git and github, this guide will help you through the process.
1318

14-
Most of this repository is structured for **Sphinx**, a documentation engine built in `Python`. We are using the Sphinx Book Theme and the `myST` syntax to create each page in this book.
19+
## How the Python Packaging Guide is structured
1520

16-
If you wish to contribute by working on the guide book locally, you
17-
will first need to
21+
The Python Packaging Guide is written in myST (a variant of MarkDown and rST) and we use **Sphinx**, a documentation engine built in `Python` to build the HTML version you see online.
1822

19-
1. Fork this repository
20-
2. Clone it locally
21-
3. Build the documentation locally
23+
We use a tool called Nox to manage the process of building the guide.
2224

23-
## Instructions for building the documentation locally on your computer
25+
## Two approaches to contributing
2426

25-
The easiest way to build the documentation in this repository is to use `nox`,
26-
a tool for quickly building environments and running commands within them.
27-
Nox ensures that your environment has all the dependencies needed to build the documentation.
27+
You can contribute to the guide using two approaches.
2828

29-
To do so, follow these steps:
29+
The first approach is using a local copy of the guide in your computer. This option requires a more involved setup, but allows you to build the guide locally to verify your contribution did not introduce any bugs before submitting a pull request. It is the recommended approach for larger contribution, like writing a whole new section.
3030

31-
1. Install `nox`
31+
The second approach is making your contribution directly in the GitHub website. This option does not require any setup on your computer and while your contribution will still be tested when you submit a PR (continuous integration), it will take longer for you to get any feedback in case of issue. It is the best way to make small contribution, like fixing typos, or if this is your first contribution to open source and the first approach feels too intimidating.
3232

33-
```
34-
python -m pip install nox
35-
```
36-
2. Build the documentation:
33+
## Forking the repository
3734

38-
```
39-
python -m nox -s docs
40-
```
35+
Independently of the approach you choose, the first step is to fork the Python Packaging Guide repository into your personal GitHub space.
4136

42-
This should create a local environment in a `.nox` folder, build the documentation (as specified in the `noxfile.py` configuration), and the output will be in `_build/html`.
43-
The site can then be viewed locally by opening the top level `index.html` in your web browser. The exact location of this file will depend on you system, but the output of the following command could be copied into an address bar
37+
*__TODO__: This section should show a beginner user how to fork a repository in GitHub.*
4438

45-
```
46-
echo "file://$(pwd)/_build/html/index.html"
47-
```
39+
## Contributing via the GitHub website
4840

49-
To build live documentation that updates when you update local files, run the following command:
41+
### How to edit a MarkDown file
5042

51-
```
52-
python -m nox -s docs-live
53-
```
43+
*__TODO__: This section should show how to use the GitHub interface to edit and previewing a Markdown file.*
44+
45+
### How to commit your changes
46+
47+
*__TODO__: This section should show how to commit changes via the GitHub interface.*
48+
49+
## Contributing locally on your computer
50+
51+
### Clone your forked repository
52+
53+
*__TODO__: This section should show how to clone a repository from GitHub into your computer.*
54+
55+
### Create a new branch
56+
57+
*__TODO__: This section should show how to create a new branch.*
58+
59+
### Create a virtual environment
60+
61+
*__TODO__: This section should show how to create a virtual environment using venv.*
62+
63+
### Install the development dependencies
64+
65+
*__TODO__: This section should show how to install the development dependencies defined in pyproject.toml.*
66+
67+
### Commit your changes
68+
69+
*__TODO__: This section should describe how to commit from the command line.*
70+
71+
### How to build the guide locally
72+
73+
*__TODO__: This section should describe the different sessions in nox related to building the docs: docs, docs-test, docs-live. It should also show how to see the guide built locally, by opening the right file in the browser or using the live version from docs-live*
74+
75+
### Before you submit your pull request
76+
77+
*__TODO__: This section should describe what steps a user should follow before submitting the pull request: build the docs, verify your changes look correct, etc.*
78+
79+
## Submitting a pull request with your contribution
80+
81+
### How to make a pull request
82+
83+
*__TODO__: This section should describe how to make a pull request in GitHub.*
84+
85+
### What happens when you submit a pull request (CI/CD)
86+
87+
*__TODO__: This section should describe how to see the results of the CD/CI checks and how to get more information about errors*
88+
89+
### What to expect from the review process
90+
91+
*__TODO__: This section should describe how review happens in GitHub, how see the comments, and how to submit changes (push a new branch)*
92+
93+
## Additional help
94+
95+
### How to get help
96+
97+
*__TODO__: This section should describe the options for finding more help in case beginner contributors need more help (e.g., create an issue, post in a forum, etc).*
98+
99+
### Additional resources
100+
101+
*__TODO__: It should also include links to beginner documentation, like the GitHub docs.*
54102

55-
When build like this, the output will tell you a localhost address where the site can be viewed, generally http://127.0.0.1:8000.
103+
## Annex
56104

57-
## Code examples
105+
### Code examples
58106

59107
This guide uses the [literalinclude Sphinx directive](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude)
60108
whenever possible to keep code and prose separate. Code for use in the documentation is kept in the `examples/` folder.
61109

62-
### Referencing code in documentation
110+
(referencing-code-in-documentation)=
111+
#### Referencing code in documentation
63112

64113
If an example is present elsewhere in the documentation that you want to use, you can copy the `literalinclude`
65114
directive verbatim and the examples will stay in sync.
@@ -73,9 +122,10 @@ later can protect your example from future modifications to the code.
73122
`:end-at:` options. And if the example code is Python, `:pyobject:` can be an even more future-proof way to keep the
74123
same documentation content even through code refactors.
75124

76-
If you need example code that doesn't yet exist in `examples/` [see creating code for documentation](#creating-code-for-documentation).
125+
If you need example code that doesn't yet exist in `examples/` see creating code for documentation](#creating-code-for-documentation).
77126

78-
### Creating code for documentation
127+
(creating-code-for-documentation)=
128+
#### Creating code for documentation
79129

80130
Whenever you come across a place that could benefit from a code block, instead of writing it in-line with a code fence
81131
(`` ``` `` blocked text) you can write it as a file in its own format. Your example may even already exist; [see referencing code in documentation

0 commit comments

Comments
 (0)