Skip to content

Commit b9eaab7

Browse files
committed
Fix: more fixes from @sneakers-the-rat review and @NickleDave review
1 parent ba3d2e0 commit b9eaab7

File tree

6 files changed

+63
-18
lines changed

6 files changed

+63
-18
lines changed

documentation/hosting-tools/publish-documentation-online.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,38 @@ quickly create a documentation website hosting environment are below.
77
1. You can host your documentation yourself using [GitHub Pages](https://pages.github.com/) or another online hosting service.
88
1. You can host your documentation using [Read the Docs](https://readthedocs.org/).
99

10-
If you don't want to maintain a documentation website for your Python package,
11-
we suggest using the Read the Docs website. Read the Docs allows you to:
10+
## What is Read the Docs ?
11+
[Read the Docs](https://readthedocs.org/) is a documentation hosting service that supports publishing your project's documentation.
12+
13+
Read the Docs is a fully featured, free, documentation hosting
14+
service. Some of its many features include:
1215

13-
* Quickly launch a website using the documentation found in your GitHub repository.
14-
* Track versions of your documentation as you release updates.
15-
* Provides support for Google analytics.
16+
* Is free to host your documentation (but there are also paid tiers if you wish to customize hosting)
17+
* Automates building your documentation
1618
* Allows you to turn on integration with pull requests where you can view documentation build progress (success vs failure).
19+
* Supports versioning of your documentation which allows users to refer to older tagged versions of the docs if they are using older versions of your package.
20+
* Supports downloading of documentation in PDF and other formats.
21+
* You can customize the documentation build using a **.readthedocs.yaml** file in your GitHub repository.
22+
23+
24+
## What is GitHub Pages?
25+
[GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages) is a free web
26+
hosting service offered by GitHub. Using GitHub pages, you can build your
27+
documentation locally or using a Continuous Integration setup, and then push
28+
to a branch in your GitHub repository that is setup to run the GitHub Pages
29+
web build.
30+
31+
32+
33+
## Read the Docs vs GitHub Pages
34+
35+
GitHub pages is a great option for your documentation deployment.
36+
However, you will need to do a bit more work to build and deploy your
37+
documentation if you use GitHub pages.
38+
39+
Read the Docs can be setup in your Read the Docs user account. The service
40+
and automates the entire process of building and deploying your documentation.
41+
42+
If you don't want to maintain a documentation website for your Python package,
43+
we suggest using the Read the Docs website.
44+

documentation/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ look for are listed below.
9191
---
9292
name: directive-fig
9393
width: 80%
94-
alt: Image showing that the MovingPandas GitHub repository has the required package health files.
94+
alt: Image showing the files in the the MovingPandas GitHub repository. Files there include code of conduct.md,
95+
Contributing.md, license.txt, readme.md.
9596
---
9697
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)*
9798
```
@@ -105,7 +106,7 @@ standards page that everyone has in their GitHub repository.
105106
---
106107
name: directive-fig
107108
width: 80%
108-
alt: Image showing that the MovingPandas GitHub repository community health page with green checks next to each file.
109+
alt: Image showing that the MovingPandas GitHub repository community health page with green checks next to each file including: description, README, code of conduct, contributing, license and issue templates. Note that Security policy has a yellow circle next to it as that is missing from the repo.
109110
---
110111
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)*
111112
```
@@ -118,7 +119,7 @@ measure of community health.
118119
---
119120
name: directive-fig
120121
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.
122+
alt: Screenshot of the Snyk page for movingpandas. It shows that the repository has a README file, contributing file, code of conduct. It also shows that it has 30 contributors and no funding. The package health score is 78/100.
122123
---
123124
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)*
124125
```

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ health on sites such as:
1818
---
1919
name: directive-fig
2020
width: 80%
21+
alt: README landing page screenshot for the Pandera package. It has the pandera logo at the top - which has two arrows in a chevron pattern pointing downward within a circle. Subtitle: statistical data testing toolkit. A data validation library for scientists, engineering, and analytics seeking correctness.
22+
Below that are a series of badges including CI tests passing, docs passing, version of pandera on pypi (0.13.4), MIT license and that it has been pyOpenSci peer reviewed. There are numerous badges below that.
23+
Finally below the badges the text reads:
24+
Pandera provides a flexible and expressive API for performing data validation on dataframe-like objects to make data processing pipelines more readable and robust.
2125
---
2226
Your GitHub repository landing page highlights the README.md file. Here you can see the README.md file for the pyOpenSci package [Pandera](https://github.com/unionai-oss/pandera). *(screen shot taken Nov 23 2022)*
2327
```
@@ -59,7 +63,7 @@ self explanatory that name is, the better.
5963
Badges are a useful way to draw attention to the quality of your project. Badges
6064
assure users that your package is well-designed, tested, and maintained. They
6165
are also a useful maintenance tool to evaluate if things are building properly.
62-
A great example of this is adding a readthedocs badge to your readme to quickly
66+
A great example of this is adding a [Read the Docs status badge](https://docs.readthedocs.io/en/stable/badges.html) to your README.md file to quickly
6367
see when the build on that site fails.
6468

6569
It is common to provide a collection of badges towards the top of your

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In the [documentation tools page](python-package-documentation-tools) we talk ab
1212
that allow you to create reproducible tutorials that are run
1313
when your Sphinx documentation builds.
1414

15-
## CreatePythonpackage tutorials that both help users and test your package's code
15+
## Create Python package tutorials that run when you build your docs
1616

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

documentation/write-user-documentation/document-your-code-api-docstrings.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ to properly read and format NumPy format docstrings.
6666
### Docstring examples Better and Best
6767

6868
Below is a good example of a well documented function. Notice that this
69-
function's docstring describes every function inputs and the function's output
70-
(or return value). The description of the function is short and to the point
71-
(2 to 3 sentences). And the return of the function is specified.
69+
function's docstring describes the function's inputs and the function's output
70+
(or return value). The initial description of the function is short (one line).
71+
Following that single line description there is a slightly longer description of
72+
what the function does (2 to 3 sentences). The return of the function is also
73+
specified.
7274

7375
```Python
7476
def extent_to_json(ext_obj):
@@ -113,8 +115,9 @@ def extent_to_json(ext_obj):
113115
If provided with a `geopandas.GeoDataFrame`, the extent
114116
will be generated from that. Otherwise, extent values
115117
should be in the order: minx, miny, maxx, maxy.
116-
Return
117-
------
118+
119+
Returns
120+
-------
118121
extent_json : A GeoJSON style dictionary of corner coordinates
119122
for the extent
120123
A GeoJSON style dictionary of corner coordinates representing
@@ -147,7 +150,7 @@ def extent_to_json(ext_obj):
147150
name: directive-fig
148151
width: 80%
149152
---
150-
Using the above NumPy format docstring in sphinx, the autodoc extension will
153+
Using the above NumPy format docstring in sphinx, the autodoc extension will
151154
create the about documentation section for the `extent_to_json` function. The
152155
output of the `es.extent_to_json(rmnp)` command can even be tested using
153156
doctest adding another quality check to your package.

documentation/write-user-documentation/get-started.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@ Your package:
1212
``` -->
1313

1414
## Core components of user-facing Python package documentation
15-
Your user-facing documentation for your Python package should include several core components:
15+
Below we break documentation into two broad types.
16+
17+
**User-facing documentation **refers to documentation that describes the way the
18+
tools within a package is broadly used in workflows. **API documentation, documentation of your functions, classes and methods in your code,** is written
19+
at a more granular level. It is documentation for each specific function, class,
20+
method or attribute that a user can use in the package. this is the documentation
21+
that a user sees when they type `help(function-name)`.
22+
23+
Your user-facing documentation for your Python package should include several
24+
core components.
1625

1726
* **Documentation Website:** This refers to easy-to-read documentation that helps someone use your package. This documentation should help users both install and use your package.
1827
* **Short Tutorials:** Your user-facing documentation should also include [**short tutorials** that show case core features of your package](create-package-tutorials).
19-
* **Package Code / API documentation:** You packages functions and methods (the API) should also be documented. API documentation can be generated from [docstrings](https://pandas.pydata.org/docs/development/contributing_docstring.html) found in your
28+
* **Package Code / API documentation:** You package's functions, methods, attributes and classes (the API) should also be documented. API documentation can be generated from [docstrings](https://pandas.pydata.org/docs/development/contributing_docstring.html) found in your
2029
code. Ideally, you have docstrings for all user-facing functions, methods and classes in
2130
your Python package. [We discuss code documentation and docstrings in greater detail here.](document-your-code-api-docstrings)
2231

0 commit comments

Comments
 (0)