Skip to content

Commit ae4a4aa

Browse files
committed
Fix: update links throughout lessons
1 parent 3ab920c commit ae4a4aa

File tree

4 files changed

+36
-48
lines changed

4 files changed

+36
-48
lines changed

index.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Community docs
5656
5757
Publish your docs
5858
```
59-
## _new_ Tutorial series - how to create a Python package
59+
## _new_ Tutorial Series: How to Create a Python Package
6060

6161
The how to create a Python package tutorial series is being developed
6262
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).
@@ -67,18 +67,32 @@ by the community now! Join our community review process or watch development of
6767
:gutter: 3
6868

6969
::::{grid-item}
70-
71-
:::{card} ✿ Tutorials ✿
70+
:::{card} ✿ Create a Package Tutorials ✿
7271
:class-card: left-aligned
7372

7473
* [What is a Python package?](/tutorials/intro)
7574
* [Make your code installable](/tutorials/1-installable-code)
7675
* [Publish your package to (test) PyPi](/tutorials/publish-pypi)
77-
* *How to add a README and LICENSE to support publication (coming next!)*
78-
* *How to add metadata to a pyproject.toml file for publication to PyPI.*
76+
* [Publish your package to conda-forge](/tutorials/publish-conda-forge)
77+
78+
:::
79+
::::
80+
81+
::::{grid-item}
82+
:::{card} ✿ Package Metadata Tutorials ✿
83+
:class-card: left-aligned
7984

80-
_The third lesson is currently under review in our [GitHub Repo here](https://github.com/pyOpenSci/python-package-guide/pulls). It will be live by the end of Feb 2024_
85+
* [How to add a README file](/tutorials/add-readme)
86+
* [How to add metadata to a pyproject.toml file for publication to PyPI.](/tutorials/pyproject-toml.md)
87+
88+
:::
89+
::::
90+
91+
::::{grid-item}
92+
:::{card} ✿ Packaging Tool Tutorials ✿
93+
:class-card: left-aligned
8194

95+
* [Introduction to Hatch](/tutorials/get-to-know-hatch)
8296

8397
:::
8498
::::

tutorials/1-installable-code.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,9 @@ file.
331331
[Learn more about the pyproject.toml format here.](../package-structure-code/pyproject-toml-python-package-metadata)
332332
:::
333333

334-
:::{todo}
334+
335335
You will learn more about the `pyproject.toml` format in the
336-
[next lesson when you add additional metadata / information to this file.](5-pyproject-toml.md)
337-
:::
336+
[next lesson when you add additional metadata / information to this file.](pyproject-toml.md)
338337

339338
- Open up the `pyproject.toml` file that Hatch created in your favorite text editor. It should look something like the example below.
340339

@@ -614,13 +613,12 @@ In the upcoming lessons you will:
614613
* Add more metadata to your `pyproject.toml` file to support PyPI publication.
615614
* learn how to publish to **conda-forge** from **PyPI**.
616615
617-
:::{todo}
618-
This is the content with links once the links are live we can uncomment this and remove the unlinked content above!
619-
* Add a [README file](2-add-readme.md) and [LICENSE](4-add-license-file.md) to your package
616+
617+
* Add a [README file](add-readme.md) and [LICENSE](add-license-coc.md) to your package
620618
* [Add more metadata to your `pyproject.toml`](5-pyproject-toml.md) file to support PyPI publication.
621-
* [Learn how to build your package distribution](6-publish-pypi.md) files (**sdist** and **wheel**) and publish to **test PyPI**.
622-
* Finally you will learn how to publish to **conda-forge** from **PyPI**.
623-
:::
619+
* [Learn how to build your package distribution](publish-pypi) files (**sdist** and **wheel**) and publish to **test PyPI**.
620+
* Finally you will learn how to [publish to **conda-forge**](publish-conda-forge) from **PyPI**.
621+
624622
625623
## Footnotes
626624

tutorials/publish-pypi.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Publish your Python package to PyPI
22

33
:::{todo}
4-
54
- emphasize that we recommended the trusted publisher GitHub action for most maintainers
65
- Make sure they add /dist to their .gitignore file. We have not discussed GitHub workflows anywhere yet. Where does that fit?
76
- https://hatch.pypa.io/latest/intro/#existing-project <- hatch will migrate from setup.py for you - if we go with hatch then we may want to add this to the installable code lesson
8-
- Should we install hatch with pipx?
7+
:::
8+
99

1010
```bash
1111
pipx install hatch
@@ -38,13 +38,8 @@ using [Grayskull](https://conda.github.io/grayskull/).
3838

3939
You will learn how to publish to conda-forge in a future lesson.
4040

41-
:::{todo}
42-
Fix this link once the lesson is published.
41+
You will learn how to publish to conda-forge in the [next lesson](publish-conda-forge).
4342

44-
You will learn how to publish to conda-forge in the [next lesson](7-publish-conda-forge.md).
45-
:::
46-
47-
:::
4843

4944
:::{figure-md} build-workflow-tutorial
5045
<img src="../images/tutorials/publish-package-pypi-conda.png" alt="Graphic showing the high level packaging workflow. On the left you see a graphic with code, metadata and tests in it. Those items all go into your package. An arrow to the right takes you to a build distribution files box. Another arrow to the right takes you to a publish to PyPI box which has an arrow containing sdist and wheel that notes those files go to PyPI for hosting. From PyPI is an arrow containing sdist since you can then connect to conda-forge for an automated build that sends distributions from PyPI to conda-forge." width="700px">
@@ -191,10 +186,8 @@ You can learn more about
191186
building in the [build page of our packaging guide](../package-structure-code/python-package-distribution-files-sdist-wheel).
192187
:::
193188

194-
:::{todo}
195189
The sdist is important if you wish to [publish
196-
your package to conda-forge](7-publish-conda-forge) which you will learn about in a later lesson.
197-
:::
190+
your package to conda-forge](publish-conda-forge). You will learn about this in a later lesson.
198191

199192
:::{todo}
200193
➜ hatch build
@@ -232,7 +225,7 @@ Show them how to do this
232225

233226
1. update the project-name in the pyproject.toml file
234227
2. update the module repository directory to be the same
235-
:::
228+
:::
236229

237230
:::{figure-md} build-workflow-tutorial
238231
<img src="../images/tutorials/testpypi-search.png" alt="This is a screenshot of the test PyPI website. At the top in the search bar, you can see the search for pyosPackage. The search return says there were no results for pyosPackage Did you mean probpackage" width="700px">
@@ -361,14 +354,12 @@ testPyPI as a permanent way to install your package. Test PyPi is a perfect plac
361354
In this lesson you are using Hatch and hatchling to create, build and publish your Python Package. [Click here to learn about other packaging tools in the ecosystem.](../package-structure-code/python-package-build-tools.md)
362355
:::
363356

364-
365-
<!-- TODO: venv will always be different for windows - do we need a third tab?? Also is conda different on windows? i forget -->
366-
367-
<!--TODO: teach them to setup trusted publisher for actions... in the actions lesson
357+
:::{todo}
358+
teach them to setup trusted publisher for actions... in the actions lesson
368359
https://pypi.org/help/#twofa
369360

370361
from PyPI: https://pypi.org/help/#apitoken - You can create a token for an entire PyPI account, in which case, the token will work for all projects associated with that account. Alternatively, you can limit a token's scope to a specific project.
371-
-->
362+
:::
372363

373364
## Package-specific token vs trusted publisher
374365

tutorials/pyproject-toml.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
# Make your Python package PyPI ready - pyproject.toml
22

3-
:::{todo}
4-
- add a note for hatch - if you want to use dynamic versioning you'll need to add `tool.hatch.version` to the pyproject.toml file.
5-
- TODO: decide how we want to list readme and license? it might make sense to just follow the simplest option and do spdx?
6-
- make sure they add the dev requirements here... including build.
7-
license = { text = "MIT" } that format is a toml inline table https://toml.io/en/v1.0.0#inline-table and it becomes a subtable of the project table
8-
9-
* make sure we have this listing for license
10-
* SPDX for licenses https://spdx.dev/use/overview/
11-
is 2 above enough for examples? should we show a few others?
12-
13-
:::
14-
15-
163
In [the installable code lesson](2-installable-code), you learned how to add the bare minimum information to a `pyproject.toml` file to make it installable. You then learned how to [publish that bare minimum version of your package to PyPI](publish-pypi.md).
174

185
Following that you learned how to add a:
196
* [README.md](add-readme)
207
* [LICENSE](add-license-coc) and
218
* [CODE_OF_CONDUCT](add-coc)
229

23-
to your package directory.
10+
to the root of your project directory.
2411

2512
To enhance the visibility of your package on PyPI and provide more information
2613
about its compatibility with Python versions, project development status, and
@@ -29,8 +16,6 @@ file. This
2916
lesson will guide you through the process.
3017

3118

32-
of your GitHub or GitLab repository.
33-
3419
:::{admonition} Learning Objectives
3520
:class: tip
3621

0 commit comments

Comments
 (0)