Skip to content

Commit 710cb91

Browse files
committed
Fix: final cleanup of sections and removal of peer review checks
1 parent b9eaab7 commit 710cb91

File tree

5 files changed

+111
-53
lines changed

5 files changed

+111
-53
lines changed

documentation/hosting-tools/intro.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22

33
The most common tool for building documentation in the Python
44
ecosystem currently is Sphinx. However, some maintainers
5-
are using tools like [mkdocs](https://www.mkdocs.org/) for documentation. It is up to you to
6-
use the platform that you prefer for your documentation!
5+
are using tools like [mkdocs](https://www.mkdocs.org/) for documentation. It is
6+
up to you to use the platform that you prefer for your documentation!
77

88
In this section, we introduce Sphinx as a common tool to
9-
build documentation. We also talk about ways to publish your
9+
build documentation. We talk about various syntax options that you can use
10+
when writing Sphinx documentation including mySt and rST.
11+
12+
We also talk about ways to publish your
1013
documentation online and Sphinx tools that might help you optimize
1114
your documentation website.
1215

16+
## Documentation build tools outline
17+
1318
```{toctree}
1419
:maxdepth: 2
1520
21+
Intro <self>
1622
Sphinx for Docs <sphinx-python-package-documentation-tools.md>
1723
myST vs Markdown vs rst <myst-markdown-rst-doc-syntax.md>
1824
Publish Your Docs <publish-documentation-online.md>

documentation/index.md

+51-43
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Documentation for your Open Source Python Package: An Overview
1+
# Documentation for your Open Source Python Package
22

33
```{important}
44
Please note that the tools discussed here are those that
@@ -37,7 +37,7 @@ detail about creating each of the above elements. We also suggest
3737
tools that will help you build your documentation.
3838
``` -->
3939

40-
## Documentation is critical to the success of your Python open source package
40+
## Documentation is critical for your Python package's success
4141

4242
Documentation is as important to the success of your Python open source package
4343
as the code itself.
@@ -51,41 +51,77 @@ to build a base of contributors to your package.
5151
## Two types of Python package users
5252

5353
The documentation that you write for your
54-
package should target a two types of users:
54+
package should target two types of users:
5555

5656
### 1. Basic Tool Users
5757

58-
There are people who will use your code in their Python workflows. They might be new(er) to Python and/or data science. Or expert programmers. They need to known
58+
Basic tool users are the people who will use your package code in their
59+
Python workflows. They might be new(er) to Python and/or data science. Or
60+
expert programmers. But they might not have a background in software
61+
development. These users need to know:
62+
5963
* How to install your package
60-
* And dependencies it requires to run the code in your package (for instance perhaps a tool like GDAL needs to be installed on a machine first)
64+
* How to install dependencies that your package requires
6165
* How to get started using the code base
62-
* Information on how to cite your code / give you credit if they are using it in a research application.
63-
* Information on the license that your code uses so they know how they can or can't use the code in an operational setting that may include money exchanges.
66+
* Information on how to cite your code / give you credit if they are using it
67+
in a research application.
68+
* Information on the license that your code uses so they know how they can
69+
or can't use the code in an operational setting.
6470

6571
### 2. Potential tool contributors
6672

67-
The other subset of users are more experienced using Python or developing tools. Potential contributors are likely using your tool. But they also might contribute bug fixes or updates to your documentation. They need all of the things that a basic user needs. But, they also need direction in terms of how you'd like for them to contribute to your package. These potential contributors need:
73+
The other subset of users are more experienced and/or more engaged
74+
with your package. As such they are
75+
potential contributors. These users:
76+
77+
* might have a software development background,
78+
* might also be able to contribute bug fixes to your package or updates to your documentation
79+
* might also just be users who will find spelling errors in your documentation, or bugs in your tutorials.
80+
81+
These users need all of the things that a basic user needs. But, they
82+
also need to understand how you'd like for them to contribute to your
83+
package. These potential contributors need:
6884

6985
* A development guide to help them understand the infrastructure used in your package repository.
7086
* Contributing guidelines that clarify the types of contributions that you welcome and how you'd prefer those contributions to be submitted.
7187

88+
```{important}
89+
It's important to remember that the definition of what a contribution is can be
90+
broad. A contribution could be something as simple as a bug report. Or fixing a
91+
spelling issue in your documentation. Or it could be a code fix that includes a
92+
new test that covers an edge-case that they discovered.
93+
```
94+
95+
96+
## Documentation elements that pyOpenSci looks for reviewing a Python package
7297

73-
## Documentation elements that pyOpenSci looks for when reviewing a Python package
98+
In the pyOpenSci open peer review, we look for
99+
a documentation structure that supports both your tool users and potential
100+
contributors. The files and elements that we look for specifically can be
101+
found in our peer review check list (see link below).
74102

75-
In the pyOpenSci open peer review process, we look for
76-
a documentation structure that suypports both your tool users and potential contributors. The files and elements that we
77-
look for are listed below.
103+
In this guide, we discuss each required element, and also discuss other elements
104+
that you should consider in your package's documentation in more detail.
78105

106+
<!-- TODO: EIC checks are missing: code of conduct -->
107+
108+
109+
```{button-link} https://www.pyopensci.org/peer-review-guide/software-peer-review-guide/editor-in-chief-guide.html#editor-checklist-template
110+
:color: primary
111+
:class: sd-rounded-pill float-left
112+
View pyOpenSci peer review check list
113+
```
114+
<!--
79115
1. Individual files in your GitHub (or GitLab) repository including:
80116
* [A clear and to the point **README.md** file](readme-file-best-practices) that includes information about how to cite your package.
81117
* 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> -->
118+
* 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.
83119
* [**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.
84-
* 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).
120+
* 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).
85121
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:
86122
* **Tutorials and quick start code examples** that help a user get started using your package.
87123
* **Documentation for user-facing functions, objects and methods in your package (the API).** Package API documentation refers to documentation for each class, function, method and user-facing attribute (*available for a user to see*) in your package. This means that your package methods and classes should have [thoughtful docstrings](https://pandas.pydata.org/docs/development/contributing_docstring.html) that describe both the purpose of the code element and each input and output.
88-
124+
-->
89125

90126
```{figure} ../images/moving-pandas-python-package-github-main-repo.png
91127
---
@@ -97,32 +133,6 @@ Contributing.md, license.txt, readme.md.
97133
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)*
98134
```
99135

100-
The files mentions above (README, Code of Conduct, license
101-
file, etc) are used as a measure of package community health
102-
on many online platforms. Below, you can see the community
103-
standards page that everyone has in their GitHub repository.
104-
105-
```{figure} ../images/moving-pandas-python-package-github-community-standards.png
106-
---
107-
name: directive-fig
108-
width: 80%
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.
110-
---
111-
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)*
112-
```
113-
114-
[Snyk](https://snyk.io/advisor/python) is another well-known company that keeps tabs on package health.
115-
Below you can see a similar evaluation of files in the Github repo as a
116-
measure of community health.
117-
118-
```{figure} ../images/moving-pandas-python-package-snyk-health.png
119-
---
120-
name: directive-fig
121-
width: 80%
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.
123-
---
124-
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)*
125-
```
126136

127137

128138
## What's next in this Python package documentation section?
@@ -133,8 +143,6 @@ documentation for your Python package. We will also suggest
133143
tools that you can use to build your user-facing documentation website.
134144

135145

136-
137-
138146
<!--
139147
Commenting this out for now - it will be moved to another section
140148

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

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Others in the community might want to contribute to your tool.
1717
They might fix bugs, update documentation and engage with the
1818
maintainer team.
1919

20+
## Why you need a code of conduct
21+
2022
In order to keep this community healthy and to protect yourself,
2123
your mainatianer team and your users from unhealthy behavior,
2224
it is important to have a [code of conduct](https://opensource.guide/code-of-conduct/).
+33-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,45 @@
1-
# Files in your repo
2-
Your Python package should, at a minimum have the following files
3-
to support documentation:
1+
# Documentation Files That Should be in your Python Package Repository
42

3+
In this section of the Python packaging guide, we review all of the files that
4+
you should have in your Python package repository. Your Python package should,
5+
at a minimum have the following files:
56

67
```{toctree}
78
:maxdepth: 2
89
10+
Intro <self>
911
README file <readme-file-best-practices.md>
1012
Contributing File <contributing-file.md>
1113
Code of Conduct File <code-of-conduct-file.md>
1214
Development Guide <development-guide.md>
1315
LICENSE files <license-files.md>
1416
```
1517

16-
In this section of the guide we discuss the various files that you
17-
should have in your GitHub (or GitLab) Python package repository.
18+
The files mentions above (README, Code of Conduct, license
19+
file, etc) are used as a measure of package community health
20+
on many online platforms. Below, you can see an example how Github
21+
evaluates community health. This community health link is available for
22+
all GitHub repositories.
23+
24+
```{figure} /images/moving-pandas-python-package-github-community-standards.png
25+
---
26+
name: directive-fig
27+
width: 80%
28+
alt: Image showing that the MovingPandas GitHub repository community health page with green checks next to each file including a 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.
29+
---
30+
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)*
31+
```
32+
33+
[Snyk](https://snyk.io/advisor/python) is another well-known company that
34+
keeps tabs on package health. Below you can see a similar evaluation of files
35+
in the Github repo as a measure of community health.
36+
37+
```{figure} /images/moving-pandas-python-package-snyk-health.png
38+
---
39+
name: directive-fig
40+
width: 80%
41+
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.
42+
---
43+
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)*
44+
```
45+

documentation/write-user-documentation/intro.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
# Writing user-facing documentation for your Python package
22

3-
This section walks you through best practices associated with writing
4-
documentation for Python packages.
3+
This section walks you through best practices for with writing
4+
documentation for your Python package.
5+
6+
We talk about the elements that you should consider adding to your documentation,
7+
the different types of users who might read your documentation and how to
8+
create tutorials for your package.
9+
10+
Here we also cover sphinx extensions that you can user to make documentation
11+
easier such as:
12+
13+
* autodoc to automagically populate documentation for your code's functions,
14+
classes, methods and attributes (API documentation) and
15+
* sphinx gallery for tutorials.
16+
17+
## User-facing documentation sections
518

619
```{toctree}
720
:maxdepth: 2
821
22+
Intro <self>
923
Create Your Docs <get-started>
1024
Document Your Code (API) <document-your-code-api-docstrings.md>
1125
Create Package Tutorials <create-package-tutorials.md>

0 commit comments

Comments
 (0)