Skip to content

Commit ba3d2e0

Browse files
committed
Fix: responded to the 100+ comments left on this pr - phew
1 parent a3e9b2c commit ba3d2e0

11 files changed

+77
-73
lines changed

documentation/hosting-tools/myst-markdown-rst-doc-syntax.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
There are three commonly used syntaxes for creating Python documentation:
44
1. [markdown](https://www.markdownguide.org/): Markdown is an easy-to-learn text
5-
syntax. It is the default syntax use in Jupyter Notebooks. There are tools that you can add to a sphinx website that allow it to render markdown as html. However, using markdown to write documentation has limitations. For instance if you want to add references,
5+
syntax. It is the default syntax use in Jupyter Notebooks. There are tools that you can add to a Sphinx website that allow it to render markdown as html. However, using markdown to write documentation has limitations. For instance if you want to add references,
66
colored call out blocks and other custom elements to your documentation, you will
77
need to use either **myST** or **rST**.
8-
1. [rST (ReStructured Text):](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html). **rST** is the native syntax that sphinx supports. rST was the default syntax used for documentation for many years given the limitations of markdown. However, in recent years myST has risen to the top as a favorite for documentation given the flexibility that it allows.
8+
1. [rST (ReStructured Text):](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html). **rST** is the native syntax that sphinx supports. rST was the default syntax used for documentation for many years. However, in recent years myST has risen to the top as a favorite for documentation given the flexibility that it allows.
99
1. [myST:](https://myst-parser.readthedocs.io/en/latest/intro.html) myST is a combination of vanilla of `markdown` and `rST` syntax. It is a nice option if you are comfortable writing markdown. `myst` is preferred by many because it offers both the rich functionality
1010
of rST combined with a simple-to-write markdown syntax.
1111

@@ -14,7 +14,7 @@ While you can chose to use any of the syntaxes listed above, we suggest using
1414

1515
* It is a simpler syntax and thus easier to learn;
1616
* The above simplicity will make it easier for more people to contribute to your documentation.
17-
* Most of your core python package text files, such as your README.md file, are already in `.md` format
17+
* Most of your corePythonpackage text files, such as your README.md file, are already in `.md` format
1818
* `GitHub` and `Jupyter Notebooks` support markdown thus it's more widely used in the scientific ecosystem.
1919

2020

documentation/hosting-tools/sphinx-python-package-documentation-tools.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ important points page -->
1010
* Use Sphinx to build your documentation
1111
* Publish your documentation on ReadTheDocs (or GitHub pages if you are more advanced and also prefer to maintain your website locally)
1212
* Use `myST` syntax to write your documentation
13-
* Use sphinx gallery to write tutorials using .py files that automagically have downloadable .py and jupyter notebook files. Use nbsphinx if you prefer writing tutorials in jupyter notebook format and don't need a grid formatted gallery. *Both of these tools will run your tutorials from beginning to end providing an addition layer of testing to your package!*
13+
* Use Sphinx gallery to write tutorials using .py files that automagically have downloadable .py and jupyter notebook files. Use nbsphinx if you prefer writing tutorials in jupyter notebook format and don't need a grid formatted gallery. *Both of these tools will run your tutorials from beginning to end providing an addition layer of testing to your package!*
1414
* OPTIONAL: Use [doctest](https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html) to run the examples in your code's docstrings as a way to make sure that your code's functions and methods (the API) are running as you expect them to.
1515
``` -->
1616

@@ -44,14 +44,14 @@ The functionality of Sphinx can be extended using extensions
4444
and themes. A few examples include:
4545

4646
* You can apply documentation themes for quick generation of beautiful documentation.
47-
* You can [automatically create documentation for your package's functions and classes (that package's API) from docstrings in your code using the autodoc extension](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html)
47+
* You can [automatically create documentation for your package's functions and classes (the package's API) from docstrings in your code using the autodoc extension](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html)
4848
* You can [run and test code examples in your docstrings using the doctest extension](https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html)
49-
* While sphinx natively supports the `rST` syntax. You can add custom syntax parsers to support easier-to-write syntax using tools such as [myst](https://myst-parser.readthedocs.io/).
49+
* While Sphinx natively supports the `rST` syntax. You can add custom syntax parsers to support easier-to-write syntax using tools such as [the MyST parser](https://myst-parser.readthedocs.io/).
5050

51-
### Commonly used sphinx themes
51+
### Commonly used Sphinx themes
5252

53-
You are free to use whatever sphinx theme that you prefer.
54-
However, the most common sphinx themes used in the Python
53+
You are free to use whatever Sphinx theme that you prefer.
54+
However, the most common Sphinx themes used in the Python
5555
scientific community include:
5656

5757
* [pydata-sphinx-theme](https://pydata-sphinx-theme.readthedocs.io/)

documentation/hosting-tools/website-hosting-optimizing-your-docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Optimizing your documentation so search engines (and other users) find it
22

33
If you are interested in more people finding your package, you may want to
4-
add some core sphinx extensions (and theme settings) that will help search
4+
add some core Sphinx extensions (and theme settings) that will help search
55
engines such as Google find your documentation.
66

77
### Google Analytics
@@ -34,7 +34,7 @@ more visible to others when they search.
3434

3535
This extension is lightweight.
3636

37-
It [requires that you to add it to your sphinx `conf.py` extension list and site your documentation base url.](https://sphinx-sitemap.readthedocs.io/en/latest/getting-started.html).
37+
It [requires that you to add it to your Sphinx `conf.py` extension list and site your documentation base url.](https://sphinx-sitemap.readthedocs.io/en/latest/getting-started.html).
3838

3939
### [sphinxext.opengraph](https://github.com/wpilibsuite/sphinxext-opengraph)
4040

documentation/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Your package should at a minimum have:
3030
* CODE_OF_CONDUCT.md
3131
* LICENSE.txt
3232
* User-facing documentation website with tutorials
33-
* API documentation (often found in the user facing documentation website)
33+
* API documentation (often found in the user-facing documentation website)
3434
3535
The pages in this section of our guide provide you with more
3636
detail about creating each of the above elements. We also suggest
@@ -79,7 +79,7 @@ look for are listed below.
7979
1. Individual files in your GitHub (or GitLab) repository including:
8080
* [A clear and to the point **README.md** file](readme-file-best-practices) that includes information about how to cite your package.
8181
* A [**CONTRIBUTING.md** file](contributing-license-coc) that outlines how others can contribute to your package. This file should also link to your development guide and code of conduct. A well-crafted contributing guide will make it much easier for the community to contribute to your project.
82-
* A [**CODE_OF_CONDUCT.md**](contributing-license-coc.html#the-code-of-conduct-md-file) file. This file sets up the guidelines for how your community interacts. It ideally ensures that everyone feels safe and can report inappropriate behavior if need be. <!--<not sure why header targets aren't working here with sphinx they work online> -->
82+
* A [**CODE_OF_CONDUCT.md**](contributing-license-coc.html#the-code-of-conduct-md-file) file. This file sets up the guidelines for how your community interacts. It ideally ensures that everyone feels safe and can report inappropriate behavior if need be. <!--<not sure why header targets aren't working here with Sphinx they work online> -->
8383
* [**A LICENSE.txt file**](contributing-license-coc.html#your-repository-should-have-a-license-md-file) A license file declaring the OSI-approved license that you select and instructions for citing your package.
8484
* We also suggest (but don't require) that you include a development guide that details the infrastructure used in your package. Sometimes this file is included in the user-facing documentation website (discussed below).
8585
1. [**User focused package documentation**](package-documentation-best-practices) that helps users understand how to install, setup and use your package. Documentation is most often contained in a stand-alone website. The user-focused documentation should include:
@@ -91,7 +91,7 @@ look for are listed below.
9191
---
9292
name: directive-fig
9393
width: 80%
94-
alt: Image showing the files in the Moving Pandas GitHub repository.
94+
alt: Image showing that the MovingPandas GitHub repository has the required package health files.
9595
---
9696
An example from the MovingPandas GitHub repository with all of the major files in it including CONTRIBUTING.md, README.md, CODE_OF_CONDUCT.md and a LICENSE.txt file. *(screen shot taken Nov 23 2022)*
9797
```
@@ -105,18 +105,20 @@ standards page that everyone has in their GitHub repository.
105105
---
106106
name: directive-fig
107107
width: 80%
108+
alt: Image showing that the MovingPandas GitHub repository community health page with green checks next to each file.
108109
---
109110
GitHub community health looks for a readme file among other elements when it evaluates the community level health of your repository. This example is from the [MovingPandas GitHub repo](https://github.com/anitagraser/movingpandas/community) *(screen shot taken Nov 23 2022)*
110111
```
111112

112-
SNYK is another well-known company that keeps tabs on package health.
113+
[Snyk](https://snyk.io/advisor/python) is another well-known company that keeps tabs on package health.
113114
Below you can see a similar evaluation of files in the Github repo as a
114115
measure of community health.
115116

116117
```{figure} ../images/moving-pandas-python-package-snyk-health.png
117118
---
118119
name: directive-fig
119120
width: 80%
121+
alt: Screenshot of the Snyk page for movingpandas, that indicates the community is active, that it has a readme, contributing.md, and code of conduct. The page also shows 30 contributors and no funding.
120122
---
121123
Screenshot showing [SNYK](https://snyk.io/advisor/python/movingpandas) package health for moving pandas. Notice both platforms look for a README file. *(screen shot taken Nov 23 2022)*
122124
```

documentation/repository-files/code-of-conduct-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ If you are not comfortable
3131
with creating your own code of conduct text, we encourage you to adopt the
3232
code of conduct language used in the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
3333
[Many other communities](https://www.contributor-covenant.org/adopters/) have adopted this code of conduct as
34-
their own including the [Fatiando](https://github.com/fatiando/community/blob/main/CODE_OF_CONDUCT.md) scientific geoscience community.
34+
their own. See the [Fatiando a Terra Geoscience Python community's example here.](https://github.com/fatiando/community/blob/main/CODE_OF_CONDUCT.md)

documentation/repository-files/development-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ documented in the case that we need to help you onboard new
2828
maintainers in the future.
2929

3030
```{note}
31-
A well thought-out continuous integration setup in your repository
31+
A well thought out continuous integration setup in your repository
3232
can allow users to skip building the package locally (especially if they are just updating text).
3333
```
3434

@@ -40,7 +40,7 @@ review. Some maintainers may also opt to include the development information in
4040

4141

4242
```{tip}
43-
[The mozilla open workshop has a nice outline of things to consider when
43+
[The Mozilla Science Lab website has a nice outline of things to consider when
4444
creating a contributing guide](https://mozillascience.github.io/working-open-workshop/contributing/)
4545
```
4646

documentation/repository-files/readme-file-best-practices.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# README File Guidelines and Resources
22

3-
The **README.md** file is often the first thing that someone sees before they
4-
install your package.
3+
Your **README.md** file should be located in the root of your GitHub repository.
4+
The **README.md** file is important as it is often the first thing that someone
5+
sees before they install your package.
56

67
The README.md file is the landing page of:
78

8-
* Your package's landing page on a repository site such as PyPI or Anaconda
9+
* Your package as it appears on a repository site such as PyPI or Anaconda
910
* Your package's GitHub repository
1011

1112
Your README.md file is also used as a measure of package and community
1213
health on sites such as:
13-
* [GitHub community health for MovingPandas (available for all repositories)](https://github.com/anitagraser/movingpandas/community) and [snyk - moving pandas example](https://snyk.io/advisor/python/movingpandas)
14+
* [GitHub community health for MovingPandas (available for all repositories)](https://github.com/anitagraser/movingpandas/community) and [Snyk - moving pandas example](https://snyk.io/advisor/python/movingpandas)
1415

1516

1617
```{figure} /images/pandera-python-package-readme-github.png
@@ -24,8 +25,6 @@ Your GitHub repository landing page highlights the README.md file. Here you can
2425
Thus, it is important that you spend some time up front creating a high quality
2526
**README.md** file for your Python package.
2627

27-
Your README.md file should be located in the root of your GitHub repository.
28-
2928
````{note}
3029
An editor or the editor in chief will ask you to revise your README file
3130
before a review begins if it does not meet the criteria specified below.
@@ -68,7 +67,7 @@ README file for others to quickly browse.
6867

6968
Some badges that you might consider adding to your README file include:
7069

71-
* Current version of the package on pypi / conda
70+
* Current version of the package on PyPI / Anaconda Cloud
7271

7372
Example: [![PyPI version shields.io](https://img.shields.io/pypi/v/pandera.svg)](https://pypi.org/project/pandera/)
7473

@@ -104,22 +103,22 @@ or complementary package mentions them here in 1-2 sentences.
104103

105104
```{tip}
106105
Consider writing for a high school level (or equivalent) level. This
107-
level of writing is often consider level for scientific content that
106+
level of writing is often considered an appropriate level for scientific content that
108107
serves a variety of users with varying backgrounds.
109108
110-
The goal of this description to maximize
111-
accessibility of your **README** file.
109+
The goal of this description is to maximize accessibility of your **README**
110+
file.
112111
```
113112

114113
### ✔️ Installation instructions
115114

116115
Include instructions for installing your package. If you have published
117-
the package on both PyPI and Conda be sure to include instructions for both.
116+
the package on both PyPI and Anaconda Cloud be sure to include instructions for both.
118117

119118
### ✔️ Document any addition setup required
120119

121120
Add any additional setup required such as authentication tokens, to
122-
get started using your package. If setup is complex, consider linking to a
121+
get started using your package. If setup is complex, consider linking to an
123122
installation page in your online documentation here rather than over complicating
124123
your README file.
125124

@@ -170,7 +169,7 @@ and any language that you'd like to see associated with the citation.
170169
Below are some resources on creating great README.md files that you
171170
might find helpful.
172171
173-
* [Write a great readme - Bane Sullivan](https://github.com/banesullivan/README)
174-
* [The art of the README GitHub Repo](https://github.com/hackergrrl/art-of-readme)
172+
* [How to Write a Great README - Bane Sullivan](https://github.com/banesullivan/README)
173+
* [Art of README - Kira (@hackergrrl)](https://github.com/hackergrrl/art-of-readme)
175174
176175
```

documentation/write-user-documentation/create-package-tutorials.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
# Create tutorials in your Python package documentation
22

33
<!-- TODO: modify the nbsphinx example to use nbgallery
4-
as a front end vs sphinx gallery - will look better that way
4+
as a front end vs Sphinx gallery - will look better that way
55
-->
66
Your package should have tutorials that make it easy for a user
77
to get started using your package. Ideally, those tutorials
88
also can be run from start to finish providing a second set of
99
checks (on top of your test suite) to your package's code base.
1010

11-
In the [documentation tools page](python-package-documentation-tools) we talk about two sphinx extensions (`sphinx-gallery` and `nbsphinx`)
11+
In the [documentation tools page](python-package-documentation-tools) we talk about two Sphinx extensions (`sphinx-gallery` and `nbsphinx`)
1212
that allow you to create reproducible tutorials that are run
13-
when your sphinx documentation builds.
13+
when your Sphinx documentation builds.
1414

15-
## Create python package tutorials that both help users and test your package's code
15+
## CreatePythonpackage tutorials that both help users and test your package's code
1616

1717
Adding well constructed tutorials to your package will make it easier for someone
1818
new to begin using your package.
1919

20-
There are two sphinx tools that make it easy to add tutorials to your package:
20+
There are two Sphinx tools that make it easy to add tutorials to your package:
2121

2222
* [Sphinx Gallery](https://sphinx-gallery.github.io/stable/index.html) and
2323
* [NbSphinx](https://nbsphinx.readthedocs.io/en/latest/)
2424

25-
Both of these tools act as sphinx extensions and:
25+
Both of these tools act as Sphinx extensions and:
2626

27-
* Support creating a gallery type page in your sphinx documentation where users can explore tutorials via thumbnails.
27+
* Support creating a gallery type page in your Sphinx documentation where users can explore tutorials via thumbnails.
2828
* Run the code in your tutorials adding another level of "testing" for your package as used.
2929
* Render your tutorials with Python code and plot outputs
3030

3131
### [sphinx gallery:](https://sphinx-gallery.github.io/stable/index.html)
3232

3333
If you prefer to write your tutorials using Python **.py** scripts, you
34-
may enjoy using sphinx gallery. Sphinx gallery uses **.py** files with
34+
may enjoy using Sphinx gallery. Sphinx gallery uses **.py** files with
3535
text and code sections that mimic the Jupyter Notebook format. When you build
3636
your documentation, the gallery extension:
3737

@@ -57,7 +57,7 @@ Below you can see what a tutorial looks like created with sphinx-gallery.
5757
---
5858
name: directive-fig
5959
width: 80%
60-
alt: Image showing ta single tutorial from sphinx gallery. The tutorial shows a simple matplotlib created plot and associated code.
60+
alt: Image showing ta single tutorial from Sphinx gallery. The tutorial shows a simple matplotlib created plot and associated code.
6161
---
6262
`sphinx-gallery` tutorials by default include download links for both the
6363
python script (**.py** file) and a Jupyter notebook (**.ipynb** file) at the bottom.
@@ -71,7 +71,7 @@ python script (**.py** file) and a Jupyter notebook (**.ipynb** file) at the bot
7171

7272
#### Sphinx gallery challenges
7373

74-
The downsides of using sphinx gallery include:
74+
The downsides of using Sphinx gallery include:
7575

7676
* the **.py** files can be finicky to configure, particularly if you have matplotlib plot outputs.
7777

@@ -114,7 +114,7 @@ _build/
114114
### [nbsphinx - tutorials using Jupyter Notebooks](https://nbsphinx.readthedocs.io/en/latest/)
115115

116116
If you prefer to use Jupyter Notebooks to create tutorials you can use nbsphinx.
117-
nbsphinx operates similarly to sphinx gallery in that:
117+
nbsphinx operates similarly to Sphinx gallery in that:
118118

119119
* It runs your notebooks and produces outputs in the rendered tutorials
120120

@@ -128,7 +128,7 @@ name: directive-fig
128128
width: 80%
129129
alt: Image showing the gallery output provided by nbsphinx using the sphinx-gallery front end interface.
130130
---
131-
`nbsphinx` can be combined with sphinx gallery to create a gallery of tutorials.
131+
`nbsphinx` can be combined with Sphinx gallery to create a gallery of tutorials.
132132
However, rather render the gallery as a grid, it lists all of the gallery
133133
elements in a single column.
134134
```
@@ -144,7 +144,7 @@ _build/
144144
# Notice that nbsphinx runs each notebook and produces an
145145
# html file with all of the outputs of your code
146146
# you can link to the notebook in your docs by modifying
147-
# the nbsphinx build - we will cover this in a separate tutorial series focused on python packaging!
147+
# the nbsphinx build - we will cover this in a separate tutorial series focused onPythonpackaging!
148148
tutorials/
149149
index.html
150150
index.md

0 commit comments

Comments
 (0)