Skip to content

Commit 7a75415

Browse files
merge main
2 parents e65d4aa + 978d00d commit 7a75415

File tree

12 files changed

+119
-41
lines changed

12 files changed

+119
-41
lines changed

.all-contributorsrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,16 @@
472472
"review",
473473
"tutorial"
474474
]
475+
},
476+
{
477+
"login": "ctb",
478+
"name": "C. Titus Brown",
479+
"avatar_url": "https://avatars.githubusercontent.com/u/51016?v=4",
480+
"profile": "http://ivory.idyll.org/blog/",
481+
"contributions": [
482+
"code",
483+
"review"
484+
]
475485
}
476486
],
477487
"contributorsPerLine": 7,

.github/workflows/build-book.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: python3 -m pip install nox
4343

4444
- name: Build book
45-
run: nox -s docs
45+
run: nox -s docs-test
4646

4747
# Save html as artifact
4848
- name: Save book html as artifact for viewing

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
orphan: true
3+
---
14
# Contributing Guide for the Python open source software packaging book
25

36
This is a community resource. We welcome contributions in the form of issues and/or pull requests to this guide.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# <img src="https://www.pyopensci.org/images/logo.png" width=100 /> pyOpenSci scientific Python Packaging Guide
22
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3-
[![All Contributors](https://img.shields.io/badge/all_contributors-45-orange.svg?style=flat-square)](#contributors-)
3+
[![All Contributors](https://img.shields.io/badge/all_contributors-46-orange.svg?style=flat-square)](#contributors-)
44
<!-- ALL-CONTRIBUTORS-BADGE:END -->
55

66
![GitHub release (latest by date)](https://img.shields.io/github/v/release/pyopensci/python-package-guide?color=purple&display_name=tag&style=plastic)
@@ -132,6 +132,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
132132
<td align="center" valign="top" width="14.28%"><a href="https://github.com/h-vetinari"><img src="https://avatars.githubusercontent.com/u/33685575?v=4?s=100" width="100px;" alt="h-vetinari"/><br /><sub><b>h-vetinari</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=h-vetinari" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Ah-vetinari" title="Reviewed Pull Requests">👀</a> <a href="#tutorial-h-vetinari" title="Tutorials">✅</a></td>
133133
<td align="center" valign="top" width="14.28%"><a href="https://xmnlab.github.io"><img src="https://avatars.githubusercontent.com/u/5209757?v=4?s=100" width="100px;" alt="Ivan Ogasawara"/><br /><sub><b>Ivan Ogasawara</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=xmnlab" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Axmnlab" title="Reviewed Pull Requests">👀</a> <a href="#tutorial-xmnlab" title="Tutorials">✅</a></td>
134134
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tomalrussell"><img src="https://avatars.githubusercontent.com/u/2762769?v=4?s=100" width="100px;" alt="Tom Russell"/><br /><sub><b>Tom Russell</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=tomalrussell" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Atomalrussell" title="Reviewed Pull Requests">👀</a> <a href="#tutorial-tomalrussell" title="Tutorials">✅</a></td>
135+
<td align="center" valign="top" width="14.28%"><a href="http://ivory.idyll.org/blog/"><img src="https://avatars.githubusercontent.com/u/51016?v=4?s=100" width="100px;" alt="C. Titus Brown"/><br /><sub><b>C. Titus Brown</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=ctb" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Actb" title="Reviewed Pull Requests">👀</a></td>
135136
</tr>
136137
</tbody>
137138
</table>

_static/pyos.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ h1 {
6969
color: var(--pyos-h1-color);
7070
}
7171
h2 {
72-
margin-top: 80px;
72+
margin-top: 1em;
7373
}
7474

7575
h3 {

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"attrs_block",
6363
]
6464
myst_heading_anchors = 3
65+
myst_footnote_transition = False
6566

6667
# Sphinx_favicon is used now in favor of built in support
6768
# https://pypi.org/project/sphinx-favicon/

index.md

Lines changed: 69 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ Community docs
5656
5757
Publish your docs
5858
```
59-
## _new_ Tutorial Series: How to Create a Python Package
59+
## _new_ Tutorial Series: Create a Python Package
6060

61-
The how to create a Python package tutorial series is being developed
62-
by the community now! Join our community review process or watch development of these tutorials in our [Github repo here](https://github.com/pyOpenSci/python-package-guide).
61+
The first round of our community-developed, how to create a Python package tutorial series for scientists is complete! Join our community review process or watch development of future tutorials in our [Github repo here](https://github.com/pyOpenSci/python-package-guide).
6362

6463

6564
:::::{grid} 1 1 2 2
@@ -100,7 +99,7 @@ by the community now! Join our community review process or watch development of
10099
:::::
101100

102101

103-
## Python packaging ecosystem overview & best practices
102+
## Python Packaging for Scientists
104103

105104
Learn about Python packaging best practices. You will also get to know the
106105
the vibrant ecosystem of packaging tools that are available to help you with your Python packaging needs.
@@ -135,31 +134,90 @@ Learn about best practices for:
135134

136135
:::
137136
::::
137+
:::::
138138

139+
## Documentation
140+
141+
:::::{grid} 1 1 2 2
142+
:class-container: text-center
143+
:gutter: 3
139144

140145
::::{grid-item}
141-
:::{card} ✨ Write & Publish Docs ✨
146+
:::{card} ✨ Write The Docs ✨
142147
:class-card: left-aligned
143148

144149
* [Create documentation for your users](/documentation/write-user-documentation/intro)
145150
* [Core files to include in your package repository](/documentation/repository-files/intro)
151+
* [Write tutorials to show how your package is used](/documentation/write-user-documentation/create-package-tutorials)
152+
:::
153+
::::
154+
155+
::::{grid-item}
156+
:::{card} ✨ Developer Docs ✨
157+
:class-card: left-aligned
158+
159+
* [Create documentation for collaborating developers](/documentation/repository-files/contributing-file)
160+
* [Write a development guide](/documentation/repository-files/development-guide)
161+
:::
162+
::::
163+
164+
::::{grid-item}
165+
:::{card} ✨ Document For A Community ✨
166+
:class-card: left-aligned
167+
168+
* [Writing a README file](/documentation/repository-files/readme-file-best-practices)
169+
* [Set norms with a Code of Conduct](/documentation/repository-files/code-of-conduct-file)
170+
* [License your package](/documentation/repository-files/license-files)
171+
:::
172+
::::
173+
174+
::::{grid-item}
175+
:::{card} ✨ Publish Your Docs ✨
176+
:class-card: left-aligned
177+
146178
* [How to publish your docs](/documentation/hosting-tools/intro)
179+
* [Using Sphinx](/documentation/hosting-tools/intro)
180+
* [Markdown, MyST, and ReST](/documentation/hosting-tools/myst-markdown-rst-doc-syntax)
181+
* [Host your docs on Read The Docs or Github Pages](/documentation/hosting-tools/publish-documentation-online)
147182
:::
148183
::::
149184

185+
:::::
186+
187+
## Tests
188+
189+
*We are actively working on this section. [Follow development here.](https://github.com/pyOpenSci/python-package-guide)*
190+
191+
:::::{grid} 1 1 2 2
192+
:class-container: text-center
193+
:gutter: 3
194+
150195
::::{grid-item}
151196
:::{card} ✨ Tests for your Python package ✨
152197
:class-card: left-aligned
153198

154199
* [Intro to testing](tests/index.md)
155200
* [Write tests](tests/write-tests)
156201
* [Types of tests](tests/test-types)
202+
:::
203+
::::
204+
205+
::::{grid-item}
206+
:::{card} ✨ Run your tests ✨
207+
:class-card: left-aligned
208+
157209
* [Run tests locally](tests/run-tests)
158210
* [Run tests in CI](tests/tests-ci)
159-
160-
*We are actively working on this section. [Follow development here.](https://github.com/pyOpenSci/python-package-guide)*
161211
:::
162212
::::
213+
:::::
214+
215+
## Contributing
216+
217+
:::::{grid} 1 1 2 2
218+
:class-container: text-center
219+
:gutter: 3
220+
163221

164222
::::{grid-item}
165223
:::{card} ✨ Code style & Format ✨
@@ -228,20 +286,19 @@ This is a living guide that is updated as tools and best practices evolve in the
228286
Tutorials <tutorials/intro>
229287
```
230288

231-
232289
```{toctree}
233290
:hidden:
234-
:caption: Documentation
291+
:caption: Packaging
235292
236-
Documentation <documentation/index>
293+
Packaging <package-structure-code/intro>
237294
238295
```
239296

240297
```{toctree}
241298
:hidden:
242-
:caption: Packaging
299+
:caption: Documentation
243300
244-
Packaging <package-structure-code/intro>
301+
Documentation <documentation/index>
245302
246303
```
247304

noxfile.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,26 @@
1111

1212
@nox.session
1313
def docs(session):
14-
session.install("-r", "requirements.txt")
14+
session.install("-e", ".")
1515
cmd = ["sphinx-build"]
1616
cmd.extend(build_command + session.posargs)
1717
session.run(*cmd)
1818

19+
@nox.session(name="docs-test")
20+
def docs_test(session):
21+
"""
22+
Same as `docs`, but rebuild everything and fail on warnings for testing
23+
"""
24+
session.install("-e", ".")
25+
cmd = ["sphinx-build"]
26+
cmd.extend(['-W', '--keep-going', '-E', '-a'])
27+
cmd.extend(build_command + session.posargs)
28+
session.run(*cmd)
29+
1930

2031
@nox.session(name="docs-live")
2132
def docs_live(session):
22-
session.install("-r", "requirements.txt")
33+
session.install("-e", ".")
2334

2435
AUTOBUILD_IGNORE = [
2536
"_build",

pyproject.toml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
15
[project]
26
name = "python-package-guide"
3-
4-
[project.optional.dependencies]
5-
dev = [
7+
dynamic = [
8+
"version"
9+
]
10+
dependencies = [
611
"pydata-sphinx-theme==0.15.1",
712
"myst-nb",
813
"sphinx",
@@ -17,8 +22,14 @@ dev = [
1722
"sphinx-inline-tabs",
1823
# for project cards
1924
"matplotlib",
20-
"sphinxcontrib-bibtex"
21-
]
25+
"sphinxcontrib-bibtex",
26+
]
27+
28+
[tool.hatch.build.targets.wheel]
29+
bypass-selection = true
30+
31+
[tool.hatch]
32+
version.source = "vcs"
2233

2334

2435
# https://github.com/codespell-project/codespell#usage

requirements.txt

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

0 commit comments

Comments
 (0)