Skip to content

Commit 7dd1c87

Browse files
committed
linting
1 parent c58823c commit 7dd1c87

File tree

3 files changed

+48
-51
lines changed

3 files changed

+48
-51
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pythia Portal contributor's guide
22

33
This document contains information specific to contributing to the
4-
Project Pythia Portal. Please first refer to [Pythia Contributor's
4+
Project Pythia Portal. Please first refer to [Pythia Contributor's
55
Guide](https://projectpythia.org/pages/contributing.html) for overall
66
contribution guidelines (such as detailed description of Project
77
Pythia structure, forking, repository cloning, branching, etc.).
@@ -12,40 +12,41 @@ The portal site is built with [Sphinx](https://www.sphinx-doc.org/).
1212

1313
When testing new content is important to build and view the site. Read the Docs automatically builds the site for you when each Pull Request is checked. You can also build it locally on your machine.
1414

15-
1615
### Building the site
1716

1817
- After checking out a local copy of the site, in your favorite terminal, navigate to the `content` directory of the source repository
1918
```bash
2019
cd projectpythia.github.io/content
2120
```
2221
- Use [conda](https://docs.conda.io/) to set up a build environment:
23-
``` bash
22+
```bash
2423
conda env create -f ../ci/environment.yml
2524
conda activate pythia
2625
```
2726
- Build the site locally using Sphinx (which you just installed in the `pythia` environment, along with all necessary dependencies):
28-
``` bash
27+
```bash
2928
make html
3029
```
3130
- The newly rendered site is now available in `content/_build/html/index.html`.
32-
Open with your web browser, or from the terminal:
33-
``` bash
31+
Open with your web browser, or from the terminal:
32+
```bash
3433
open _build/html/index.html
3534
```
3635
- However, many of the links will not work. For all of the links
37-
found in the portal to work properly, you'll need to set up a local
38-
testing server. This can be done with Python's http.server by running
39-
the following command from within the content directory:
36+
found in the portal to work properly, you'll need to set up a local
37+
testing server. This can be done with Python's http.server by running
38+
the following command from within the content directory:
39+
4040
```
4141
python -m http.server --directory _build/html/
4242
```
43+
4344
- and then pointing your browser at the URL: localhost:8000.
4445

4546
- 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)
4647

4748
- When you're done, you can deactivate the dedicated build environment with
48-
``` bash
49+
```bash
4950
conda deactivate
5051
```
5152
- You can re-activate the `pythia` conda environment at any time with `conda activate pythia`.

content/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
# Copy root files into content pages -----------------------------------------
8383

8484
shutil.copyfile('../CODEOFCONDUCT.md', 'pages/code_of_conduct.md')
85-
#shutil.copyfile('../CONTRIBUTING.md', 'pages/contributing.md')
8685

8786
# Build Communication Channel Gallery ----------------------------------------
8887

content/pages/contributing.md

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ to Project Pythia.
4444

4545
Contributing a new link is easy with these three simple steps:
4646

47-
1. Navigate your web browser to the main Project Pythia repo's “issue” page [here](https://github.com/ProjectPythia/projectpythia.github.io/issues).
47+
1. Navigate your web browser to the main Project Pythia repo's “issue” page [here](https://github.com/ProjectPythia/projectpythia.github.io/issues).
4848
1. Click on the button that says “New issue”.
4949
1. Click on the “Get started” button in the row labeled “Update external links gallery ”, and follow the instructions presented.
5050

@@ -101,32 +101,31 @@ project](https://geocat.ucar.edu/pages/contributing.html).
101101

102102
As noted above contributing directly to a GitHub repository that
103103
is not owned by you is a somewhat complicated process that involves
104-
a number of technologies. In the paragraphs below we describe the
104+
a number of technologies. In the paragraphs below we describe the
105105
process of "forking" an external repository, making changes, and
106106
submitting your changes back to the owners of the external repository.
107107
But first we discuss how to configure your Python environment with the
108-
conda (anaconda) package manager, and how to configure Git and GitHub. These
108+
conda (anaconda) package manager, and how to configure Git and GitHub. These
109109
are one-time steps that you should not need to perform again.
110110

111111
It's a long journey, but the steps we describe below are common to many, many
112112
open source projects hosted on GitHub.
113113

114-
115114
### Getting started with GitHub and Git
116115

117116
Contributing to one of Pythia’s repos requires using GitHub, as
118-
already mentioned, and also Git. The latter, Git, is an open source,
117+
already mentioned, and also Git. The latter, Git, is an open source,
119118
command line tool for collaborative software version control, while
120119
GitHub is an online, web-accessible service that greatly simplifies
121120
using the powerful, yet often complex, Git.
122121

123-
> **Note:** GitHub operates entirely within a web browser. You do not
124-
> need to install anything, but you will need to set up a free GitHub
125-
> account. Git is a command line tool that is most likely already
122+
> **Note:** GitHub operates entirely within a web browser. You do not
123+
> need to install anything, but you will need to set up a free GitHub
124+
> account. Git is a command line tool that is most likely already
126125
> installed on your machine, and will need to be run from a “terminal” window, AKA
127126
> a “shell”.
128127
129-
Using, and even just configuring, Git and GitHub are often the most
128+
Using, and even just configuring, Git and GitHub are often the most
130129
daunting aspects of contributing to a GitHub hosted project. Here
131130
are the basic steps for Git/GitHub configuration, all of which must
132131
be performed before the next subsection, forking a repo.
@@ -140,7 +139,7 @@ free account is all that is needed.
140139
#### Git Setup
141140

142141
If not already installed on your machine, download and install the
143-
[latest version of Git](https://git-scm.com/downloads) . Set up
142+
[latest version of Git](https://git-scm.com/downloads) . Set up
144143
Git with a user name and your email using the steps below. Note,
145144
it is advisable that you use the same user name/email as you did
146145
when setting up your GitHub account, though technically this may
@@ -152,11 +151,10 @@ $ git config --global user.name "Your name here"
152151
$ git config --global user.email "your_email@example.com"
153152
```
154153

155-
Don’t type the $. This simply indicates the command line prompt.
154+
Don’t type the \$. This simply indicates the command line prompt.
156155

157156
#### Configure your environment to authenticate with GitHub from Git
158157

159-
160158
This is a complicated process and there are two authentication
161159
protocols supported: HTTP or SSH. Either will work fine, but we
162160
find HTTP to be the easiest to set up. Both processes are described
@@ -193,14 +191,14 @@ Conda update conda
193191
```
194192

195193
Make sure that you have cloned the repository as described above
196-
in Forking a Repository.
194+
in Forking a Repository.
197195

198196
At this point you have a current version of conda available on your
199197
desktop or laptop. Before using your conda environment to work on
200198
Pythia content, you'll need to perform an addtional one-time setup
201-
that is specific to each Pythia repo. After the one-time configuration is
202-
complete you will need to "activate" a repo-specific environment whenever
203-
you wish to use it. Consult the repo-specific contributor’s guide
199+
that is specific to each Pythia repo. After the one-time configuration is
200+
complete you will need to "activate" a repo-specific environment whenever
201+
you wish to use it. Consult the repo-specific contributor’s guide
204202
for information on “Building the site”, and
205203
follow the steps described therein.
206204

@@ -221,25 +219,24 @@ to support contributions from the outside world. This workflow is
221219
summarized below, and described in detail
222220
[here](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow).
223221

224-
225222
The steps:
226223

227224
1. Navigate your web browser to the Pythia repository that you wish
228-
to contribute to.
225+
to contribute to.
229226
1. Click on the “Fork” icon. This will create a copy of the Pythia repository
230-
on the GitHub server under **your** account name. You may be prompted
231-
to sign in. If so, use the GitHub (not Git) account name and password
232-
that you created when you created your GitHub account above.
227+
on the GitHub server under **your** account name. You may be prompted
228+
to sign in. If so, use the GitHub (not Git) account name and password
229+
that you created when you created your GitHub account above.
233230
1. After successfully forking a Pythia repo you should have a copy
234-
of that repository on the GitHub server under your account name.
235-
To verify this you can navigate to GitHub, sign in if you are not
236-
already, and click on “your repositories” under the pull down menu
237-
in the top right corner of the page. You should see the Pythia
238-
repository you just cloned listed. Click on it. This is a remote
239-
clone of the Pythia repo. Changes you make to your copy will not
240-
impact the contents of the Pythia repo. The next step is to make a
241-
local copy (clone) of the just-cloned GitHub repository on your
242-
laptop or workstation.
231+
of that repository on the GitHub server under your account name.
232+
To verify this you can navigate to GitHub, sign in if you are not
233+
already, and click on “your repositories” under the pull down menu
234+
in the top right corner of the page. You should see the Pythia
235+
repository you just cloned listed. Click on it. This is a remote
236+
clone of the Pythia repo. Changes you make to your copy will not
237+
impact the contents of the Pythia repo. The next step is to make a
238+
local copy (clone) of the just-cloned GitHub repository on your
239+
laptop or workstation.
243240

244241
That’s right. After this final step you will now have **two** copies
245242
of the repo, one local and one remote. From a terminal window type:
@@ -274,16 +271,16 @@ $ git remote add upstream https://github.com/ProjectPythia/PYTHIA_REPO_NAME.git
274271
Finally, create a new branch in your local repository:
275272

276273
```
277-
$ git checkout -b YOUR_BRANCH_NAME
274+
$ git checkout -b YOUR_BRANCH_NAME
278275
```
279276

280277
Where `YOUR_BRANCH_NAME` is the name that you want to give your local
281278
branch. What name should you choose? If the work that you are doing
282279
is associated with a GitHub issue you should follow the convention:
283280

284-
*issue_XXX*
281+
_issue_XXX_
285282

286-
Where *XXX* is the GitHub issue number. If it is not associated with a Pythia GitHub issue, pick something short and meaningful, e.g. “documentation_cleanup”.
283+
Where _XXX_ is the GitHub issue number. If it is not associated with a Pythia GitHub issue, pick something short and meaningful, e.g. “documentation_cleanup”.
287284

288285
You can now make changes to your local copy of the Pythia repo
289286
without having those changes affect either the remote Pythia GitHub
@@ -301,7 +298,6 @@ any of the contents. Once you are ready to contribute your changes
301298
back to the Pythia repository you will need to submit a Pull Request
302299
(PR), described later.
303300

304-
305301
### Make your local changes
306302

307303
At this point you should be able to make your desired changes to
@@ -372,7 +368,7 @@ $ git push origin FEATURE_NAME
372368
Where `FEATURE_NAME` is the name you gave your branch when you checked
373369
it out before starting to make your changes. Typically, if you are
374370
submitting a PR for a change that addresses an open Pythia issue,
375-
the name should be *issue_XXX* where *XXX* is the issue number.
371+
the name should be _issue_XXX_ where _XXX_ is the issue number.
376372

377373
After successfully running this command your changes will now be
378374
on GitHub under your personal account, but they are not yet part
@@ -383,17 +379,17 @@ submitting a pull request.
383379

384380
Before you make the actual PR, it is a good idea to review the
385381
changes that you’ve made and to have followed all guidelines in
386-
this document, and any repo-specific guidelines.
382+
this document, and any repo-specific guidelines.
387383

388384
To review your changes against the official Pythia repository do the following:
389385

390386
1. Navigate your web browser to your GitHub repository. E.g.
391-
https://github.com/YOUR_USER_NAME/GeoCAT-examples
387+
https://github.com/YOUR_USER_NAME/GeoCAT-examples
392388
1. Click on `Compare`
393389
1. Check the `head repository` and `compare` branches are set correctly.
394-
These should be `YOUR_NAME/PYTHIA_REPO_NAME`, and `BRANCH_NAME`,
395-
respectively, where `BRANCH_NAME` is the name you gave your branch
396-
when you pushed your changes to your remote repository on GitHub.
390+
These should be `YOUR_NAME/PYTHIA_REPO_NAME`, and `BRANCH_NAME`,
391+
respectively, where `BRANCH_NAME` is the name you gave your branch
392+
when you pushed your changes to your remote repository on GitHub.
397393

398394
Select the “base repository” and “base”. For “base repository” this
399395
should be the Pythia repository, for example `ProjectPythia/pythia-foundations``.
@@ -404,6 +400,7 @@ At this point you should be able to review changes between your
404400
repositories and the GitHub repository.
405401

406402
#### Make the PR
403+
407404
At long last you are ready to make the actual PR, requesting the
408405
Pythia community to review your code, make possible suggestions for
409406
changes, and ultimately merge your repo with Pythia. To submit a

0 commit comments

Comments
 (0)