Skip to content

Commit 9cb8d0f

Browse files
committed
Fix: move book to pydata_sphinx_theme
1 parent 86cddc2 commit 9cb8d0f

18 files changed

+155
-136
lines changed

_static/pyos.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ figure {
3636
figcaption {
3737
font-size: .9em;
3838
font-weight: bold;
39-
}
39+
}
40+
4041

4142
.admonition p {
42-
font-size: 1.1em;
43-
font-weight: bold;
44-
}
43+
font-size: 1em;
44+
}

code-style-structure/intro.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

conf.py

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = 'python-package-guide'
21-
copyright = '2022, pyOpenSci'
22-
author = 'Leah Wasser'
21+
copyright = '2023, pyOpenSci'
22+
author = 'pyOpenSci Community'
2323

2424
# The full version, including alpha/beta/rc tags
2525
release = '0.1'
@@ -44,22 +44,57 @@
4444
"colon_fence",
4545
"deflist",
4646
]
47-
#myst_heading_anchors = 3
47+
myst_heading_anchors = 3
48+
49+
# For generating sitemap
50+
html_baseurl = 'https://www.pyopensci.org/software-peer-review/'
4851

4952
# Link to our repo for easy PR/ editing
5053
html_theme_options = {
51-
"source_repository": "https://github.com/pyopensci/python-package-guide",
52-
"source_branch": "main",
53-
"source_directory": ".",
54-
# "repository_url": "https://github.com/pyopensci/python-package-guide",
55-
# "use_repository_button": True,
56-
#"google_analytics_id": "UA-141260825-1",
57-
#"show_toc_level": 1,
58-
#"toc_title": "On this page",
59-
# "external_links": [
60-
# {"pyOpenSci Website": "link-one-name", "url": "https://www.pyopensci.org"}
61-
# ],
62-
"announcement": "🚧 UNDER CONSTRUCTION: this guide is under heavy construction right now. 🚧"
54+
"announcement": "🚧 This guide is currently under heavy construction 🚧 ",
55+
"external_links": [
56+
{
57+
"url": "https://www.pyopensci.org",
58+
"name": "pyOpenSci Website",
59+
},
60+
{
61+
"url": "https://www.pyopensci.org/python-package-guide",
62+
"name": "Python Packaging Guide",
63+
},
64+
{
65+
"url": "https://pyopensci.org/governance",
66+
"name": "Governance",
67+
},
68+
],
69+
"icon_links": [
70+
{
71+
"name": "Mastodon",
72+
"url": "https://fosstodon.org/@pyOpenSci",
73+
"icon": "fa-brands fa-mastodon",
74+
},
75+
],
76+
"logo": {
77+
"text": "Python Package Guide",
78+
"image_dark": "logo.png",
79+
"alt_text": "pyOpenSci Python Package Guide. The pyOpenSci logo is blue and yellow following the Python logo",
80+
},
81+
"header_links_before_dropdown": 4,
82+
"use_edit_page_button": True,
83+
"show_toc_level": 1,
84+
#"navbar_align": "left", # [left, content, right] For testing that the navbar items align properly
85+
"github_url": "https://github.com/pyopensci/python-package-guide",
86+
"twitter_url": "https://twitter.com/pyopensci",
87+
"footer_items": ["copyright"],
88+
}
89+
90+
html_theme_options["analytics"] = {
91+
"google_analytics_id": "UA-141260825-1",
92+
}
93+
94+
html_context = {
95+
"github_user": "pyopensci",
96+
"github_repo": "python-package-guide",
97+
"github_version": "main",
6398
}
6499

65100
# Add analytics to furo theme
@@ -90,7 +125,7 @@
90125
# The theme to use for HTML and HTML Help pages. See the documentation for
91126
# a list of builtin themes.
92127
#
93-
html_theme = 'furo'
128+
html_theme = 'pydata_sphinx_theme'
94129
html_static_path = ["_static"]
95130
html_css_files = ["pyos.css"]
96131
html_title = "pyOpenSci Package Guide"

documentation/hosting-tools/intro.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,3 @@ when writing Sphinx documentation including mySt and rST.
1212
We also talk about ways to publish your
1313
documentation online and Sphinx tools that might help you optimize
1414
your documentation website.
15-
16-
## Documentation build tools outline
17-
18-
```{toctree}
19-
:maxdepth: 2
20-
21-
Intro <self>
22-
Sphinx for Docs <sphinx-python-package-documentation-tools.md>
23-
myST vs Markdown vs rst <myst-markdown-rst-doc-syntax.md>
24-
Publish Your Docs <publish-documentation-online.md>
25-
Website Hosting and Optimization <website-hosting-optimizing-your-docs.md>
26-
```

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ If you are interested in more people finding your package, you may want to
44
add some core Sphinx extensions (and theme settings) that will help search
55
engines such as Google find your documentation.
66

7-
### Google Analytics
7+
## Google Analytics
88

99
```{important}
10+
1011
Google analytics [is not compliant with the European General Data Protection Regulation (GDPR)](https://matomo.org/blog/2022/05/google-analytics-4-gdpr/). While there are many components to this regulation, one of the core elements is that you have to let users know on your site that you are collecting data and they have to consent. WHile it is possible to add infrastructure around Google Analytics to make it close to following GDPR regulations, the community is slowly shifting away from Google using open tools such as [Plausible](https://plausible.io/), [Cloudflare Web Analytics](https://www.cloudflare.com/web-analytics/) and [Matomo](https://matomo.org) for web analytics.
1112
1213
pyOpenSci is currently looking into free options for open source

documentation/index.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# Documentation for your Open Source Python Package
22

3+
```{toctree}
4+
:hidden:
5+
:caption: Intro
6+
7+
Documentation Overview <self>
8+
```
9+
10+
```{toctree}
11+
:hidden:
12+
:maxdepth: 2
13+
:caption: Write User Documentation
14+
15+
Intro <write-user-documentation/intro.md>
16+
Create Your Docs <write-user-documentation/get-started>
17+
Document Your Code (API) <write-user-documentation/document-your-code-api-docstrings.md>
18+
Create Package Tutorials <write-user-documentation/create-package-tutorials.md>
19+
```
20+
21+
```{toctree}
22+
:hidden:
23+
:caption: Core Repository Files
24+
:maxdepth: 2
25+
26+
Intro <repository-files/intro.md>
27+
README file <repository-files/readme-file-best-practices.md>
28+
Contributing File <repository-files/contributing-file.md>
29+
Code of Conduct File <repository-files/code-of-conduct-file.md>
30+
Development Guide <repository-files/development-guide.md>
31+
LICENSE files <repository-files/license-files.md>
32+
```
33+
34+
```{toctree}
35+
:maxdepth: 2
36+
:hidden:
37+
:caption: Documentation & Hosting Tools
38+
39+
Intro <hosting-tools/intro>
40+
Sphinx for Docs <hosting-tools/sphinx-python-package-documentation-tools>
41+
myST vs Markdown vs rst <hosting-tools/myst-markdown-rst-doc-syntax>
42+
Publish Your Docs <hosting-tools/publish-documentation-online>
43+
Website Hosting and Optimization <hosting-tools/website-hosting-optimizing-your-docs>
44+
```
45+
46+
347
```{important}
448
Please note that the tools discussed here are those that
549
we see commonly used in the community. As tools evolve we
@@ -125,10 +169,9 @@ View pyOpenSci peer review check list
125169

126170
```{figure} ../images/moving-pandas-python-package-github-main-repo.png
127171
---
128-
name: directive-fig
172+
name: moving-pandas-github-repo-image
129173
width: 80%
130-
alt: Image showing the files in the the MovingPandas GitHub repository. Files there include code of conduct.md,
131-
Contributing.md, license.txt, readme.md.
174+
alt: Image showing the files in the the MovingPandas GitHub repository. Files in the image include code of conduct.md contributing.md license.txt and readme.md.
132175
---
133176
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)*
134177
```

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The CODE_OF_CONDUCT.md file In Your Python Open Source Package
22

3-
```{tip}
4-
## Example Code of Conduct files
3+
```{admonition} Example Code of Conduct files
4+
:class: tip
55
66
* [SciPy Code of Conduct file - notice they included theirs in their documentation](https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html)
77
* [fatiando code of conduct file](https://github.com/fatiando/community/blob/main/CODE_OF_CONDUCT.md)

documentation/repository-files/contributing-file.md

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

33
## What a CONTRIBUTING.md file should contain
44

5-
```{tip}
6-
## Example contributing files
5+
```{admonition} Example contributing files
6+
:class: tip
77
88
* [pyGMT contributing file](https://github.com/GenericMappingTools/pygmt/blob/main/CONTRIBUTING.md)
99
* [fatiando verde's contributing file](https://github.com/fatiando/verde/blob/main/CONTRIBUTING.md)

documentation/repository-files/development-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ It's also helpful to specify the types of tests you request if a contributor sub
1515

1616
If you have time to document it, it's also helpful to document your maintainer workflow and release processes.
1717

18-
### Why a development guide is important
18+
## Why a development guide is important
1919

2020
It's valuable to have a development guide, in the
2121
case that you wish to:

documentation/repository-files/intro.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@ In this section of the Python packaging guide, we review all of the files that
44
you should have in your Python package repository. Your Python package should,
55
at a minimum have the following files:
66

7-
```{toctree}
8-
:maxdepth: 2
9-
10-
Intro <self>
11-
README file <readme-file-best-practices.md>
12-
Contributing File <contributing-file.md>
13-
Code of Conduct File <code-of-conduct-file.md>
14-
Development Guide <development-guide.md>
15-
LICENSE files <license-files.md>
16-
```
17-
187
The files mentions above (README, Code of Conduct, license
198
file, etc) are used as a measure of package community health
209
on many online platforms. Below, you can see an example how Github
@@ -23,7 +12,7 @@ all GitHub repositories.
2312

2413
```{figure} /images/moving-pandas-python-package-github-community-standards.png
2514
---
26-
name: directive-fig
15+
name: moving-pandas-github-community
2716
width: 80%
2817
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.
2918
---
@@ -36,7 +25,7 @@ in the Github repo as a measure of community health.
3625

3726
```{figure} /images/moving-pandas-python-package-snyk-health.png
3827
---
39-
name: directive-fig
28+
name: moving-pandas-snyk
4029
width: 80%
4130
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.
4231
---

0 commit comments

Comments
 (0)