Skip to content

Commit 1220a6e

Browse files
authored
Minor revisions to contributor's guide (#113)
1 parent fa6627a commit 1220a6e

File tree

2 files changed

+41
-70
lines changed

2 files changed

+41
-70
lines changed

README.md

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,4 @@
55
This is the source repository for the [Project Pythia portal](https://projectpythia.github.io).
66
The portal site is built with [sphinx](https://www.sphinx-doc.org/).
77

8-
To build the site locally (e.g. for testing new content),
9-
use [conda](https://docs.conda.io/) to set up a build environment with all dependencies.
10-
11-
First, make a local clone of this source repository on your machine. For example:
12-
13-
```
14-
git clone https://github.com/ProjectPythia/projectpythia.github.io.git
15-
```
16-
17-
Then, change working directories to the local repository's `content` directory:
18-
19-
```
20-
cd projectpythia.github.io/content
21-
```
22-
23-
Set up your a conda environment:
24-
25-
```
26-
conda env create -f ../ci/environment.yml
27-
conda activate pythia
28-
```
29-
30-
You can then build the site with:
31-
32-
```
33-
make html
34-
```
35-
36-
After building the site it may be possible to preview the portal in your web browser by simply opening the `index.html` file:
37-
38-
```
39-
open _build/html/index.html
40-
```
41-
42-
However, many of the links will not work. For all of the links found in the portal to work properly, you'll need to set up a local testing server. This can be done with Python's http.server by running the following command from within the `content` directory:
43-
44-
```
45-
python -m http.server --directory _build/html/
46-
```
47-
48-
and then pointing your browser at the URL: `localhost:8000`.
49-
50-
More information on setting up a local test server is available from [here](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server)
51-
52-
You can find more details in the [Contributor's Guide](https://projectpythia.org/pages/contributing.html).
8+
Information on contributing is available [here](CONTRIBUTING.md)

content/pages/contributing.md

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ command line tool for collaborative software version control, while
124124
GitHub is an online, web-accessible service that greatly simplifies
125125
using the powerful, yet often complex, Git.
126126

127-
> **Note:** GitHub operates entirely within a web browser. You do not
128-
> need to install anything, but you will need to set up a free GitHub
129-
> account. Git is a command line tool that is most likely already
130-
> installed on your machine, and will need to be run from a “terminal” window, AKA
131-
> a “shell”.
127+
```{Note}
128+
GitHub operates entirely within a web browser. You do not
129+
need to install anything, but you will need to set up a free GitHub
130+
account. Git is a command line tool that is most likely already
131+
installed on your machine, and will need to be run from a “terminal” window, AKA
132+
a “shell”.
133+
```
132134

133135
Using, and even just configuring, Git and GitHub are often the most
134136
daunting aspects of contributing to a GitHub hosted project. Here
@@ -195,9 +197,6 @@ The steps:
195197
conda update conda
196198
```
197199

198-
Make sure that you have cloned the repository as described above
199-
in Forking a Repository.
200-
201200
At this point you have a current version of conda available on your
202201
desktop or laptop. Before using your conda environment to work on
203202
Pythia content, you'll need to perform an addtional one-time setup
@@ -207,6 +206,14 @@ you wish to use it. Consult the repo-specific contributor’s guide
207206
for information on “Building the site”, and
208207
follow the steps described therein.
209208

209+
```{Note}
210+
Repository-specific contributor's
211+
information can always be accessed by navigating your web browser
212+
to the appropriate Project Pythia GitHub repository,
213+
[here](https://github.com/ProjectPythia/pythia-foundations) for
214+
example, and clicking on the file named `CONTRIBUTING.md`
215+
```
216+
210217
More information on installing and using conda may be found
211218
[here](https://foundations.projectpythia.org/foundations/conda.html).
212219

@@ -230,14 +237,14 @@ summarized below, and described in detail
230237
The steps:
231238

232239
1. Navigate your web browser to the Pythia repository that you wish
233-
to contribute to.
234-
1. Click on the “Fork” icon. This will create a copy of the Pythia repository
240+
to contribute to. For example, [here](https://github.com/ProjectPythia/pythia-foundations).
241+
1. Click on the “Fork” icon (upper right). This will create a copy of the Pythia repository
235242
on the GitHub server under **your** account name. You may be prompted
236243
to sign in. If so, use the GitHub (not Git) account name and password
237244
that you created when you created your GitHub account above.
238245
1. After successfully forking a Pythia repo you should have a copy
239246
of that repository on the GitHub server under your account name.
240-
To verify this you can navigate to GitHub, sign in if you are not
247+
To verify this you can navigate to the GitHub [home page](https://github.com/), sign in if you are not
241248
already, and click on “your repositories” under the pull down menu
242249
in the top right corner of the page. You should see the Pythia
243250
repository you just cloned listed. Click on it. This is a remote
@@ -300,24 +307,26 @@ on this later.
300307

301308
For further information see the [GitHub docs on forking a repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo).
302309

303-
Remember: at this point you should have a local copy of the repository
310+
```{Note}
311+
At this point you should have a local copy of the repository
304312
in your current working directory. You can safely make changes to
305313
any of the contents. Once you are ready to contribute your changes
306314
back to the Pythia repository you will need to submit a Pull Request
307315
(PR), described later.
316+
```
308317

309318
### Make your local changes
310319

311320
At this point you should be able to make your desired changes to
312-
the local copies of your files. Consult the repo-specific contributor’s
313-
guide for information specific to the repo you are working on.
321+
the local copies of your files. **Always consult the repo-specific contributor’s
322+
guide for information specific to the repo you are working on.**
314323

315324
### Submit a Pull Request (PR)
316325

317326
Once you have completed making changes to your local copy of a
318327
Pythia repository and are ready to have your changes merged with a
319328
Pythia repository on GitHub, you need to essentially perform the
320-
reverse processed used to acquire a copy of the Pythia repo, and
329+
reverse process used to acquire a copy of the Pythia repo, and
321330
submit a PR asking the Pythia maintainers to consider your merge
322331
request. The merge will occur between your personal GitHub repository
323332
and the Pythia GitHub repository, so you first need to merge any
@@ -362,10 +371,12 @@ $ git commit PATH_TO_NEW_FILE
362371

363372
Which will prompt you for a log message. Please provide something informative. If you make lots of changes, it is best to make multiple commits, broken up into related chunks. E.g. “fixed x”, “added documentation”, “added testing”.
364373

365-
> **Note:** When executing `git commit` after `git add PATH_TO_NEW_FILE`,
366-
> specifying the path to the new file isn't stricly necessary. However,
367-
> in other instances the file path argument is required. We include it
368-
> here to keep things simple.
374+
```{Note}
375+
When executing `git commit` after `git add PATH_TO_NEW_FILE`,
376+
specifying the path to the new file isn't stricly necessary. However,
377+
in other instances the file path argument is required. We include it
378+
here to keep things simple.
379+
```
369380

370381
Depending on which repo you are making changes to, a `pre-commit`
371382
[hook](https://www.atlassian.com/git/tutorials/git-hooks)
@@ -381,11 +392,13 @@ $ git status
381392

382393
after your `commit` to verify everything looks as expected.
383394

384-
> **Note:** `pre-commit` _hooks_ can sometimes be difficult to satisfy. You
385-
> can always tell **git** not to run the _hook_ by
386-
> running `git commit --no-verify`.
387-
> This will allow you to submit your changes (see steps) below, and get help
388-
> later from a Project Pythia maintainer.
395+
```{Note}
396+
`pre-commit` _hooks_ can sometimes be difficult to satisfy. You
397+
can always tell **git** not to run the _hook_ by
398+
running `git commit --no-verify`.
399+
This will allow you to submit your changes (see steps) below, and get help
400+
later from a Project Pythia maintainer.
401+
```
389402

390403
#### Pushing Your Changes to Your Personal GitHub Repository
391404

@@ -406,7 +419,9 @@ the name should be _issue_XXX_ where _XXX_ is the issue number.
406419
After successfully running this command your changes will now be
407420
on GitHub under your personal account, but they are not yet part
408421
of the Pythia repo. For that to happen one more step is required:
409-
submitting a pull request.
422+
you must **Make the PR**.
423+
424+
But first:
410425

411426
#### Review your Code
412427

0 commit comments

Comments
 (0)