Skip to content

Commit 710e4e5

Browse files
authored
Fix: broken stuff
All the broken things are fixed here!!
2 parents 1fab12c + d7bf984 commit 710e4e5

13 files changed

+24
-24
lines changed

package-structure-code/publish-python-package-pypi-conda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Below you will learn more specifics about the differences between PyPI and conda
1919
:::
2020

2121

22-
:::{figure-md} pypi-conda-channels
22+
:::{figure-md} upload-conda-forge
2323

2424
<img src="../images/publish-python-package-pypi-conda.png" alt="Image showing the progression of creating a Python package, building it and then publishing to PyPI and conda-forge. You take your code and turn it into distribution files (sdist and wheel) that PyPI accepts. then there is an arrow towards the PyPI repository where ou publish both distributions. From PyPI if you create a conda-forge recipe you can then publish to conda-forge. " width="700px">
2525

package-structure-code/python-package-build-tools.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ Build your sdist and wheel distributions|✅|Poetry will build your sdist and wh
403403

404404
<!-- TODO: responses here on poetry's future dev work: https://github.com/python-poetry/poetry/discussions/7525 -->
405405

406+
(challenges-with-poetry)=
406407
### Challenges with Poetry
407408

408409
Some challenges of Poetry include:

package-structure-code/python-package-distribution-files-sdist-wheel.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# Learn about Building a Python Package
22

33

4-
:::{figure-md} pypi-conda-channels
4+
:::{figure-md} pypi-conda-overview
55

66
<img src="../images/publish-python-package-pypi-conda.png" alt="Image showing the progression of creating a Python package, building it and then publishing to PyPI and conda-forge. You take your code and turn it into distribution files (sdist and wheel) that PyPI accepts. then there is an arrow towards the PyPI repository where ou publish both distributions. From PyPI if you create a conda-forge recipe you can then publish to conda-forge. " width="700px">
77

88
Once you have published both package distributions (the source distribution and the wheel) to PyPI, you can then publish to conda-forge. conda-forge requires an source distribution on PyPI in order to build your package on conda-forge. You do not need to rebuild your package to publish to conda-forge.
99
:::
1010

1111
You need to build your Python package in order to publish it to PyPI (or a conda channel). The build process organizes your code and metadata into a distribution format that can be uploaded to PyPI and subsequently downloaded and installed by users. NOTE: you need to publish a sdist to PyPI in order for conda-forge to properly build your package automatically.
12-
:::
1312

1413
(build-package)=
1514
## What is building a Python package?

tests/run-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Python versions.
1616

1717

1818

19-
### Tools to run your tests
19+
## Tools to run your tests
2020

2121
There are three categories of tools that will make is easier to setup
2222
and run your tests in various environments:
@@ -80,7 +80,7 @@ extensions that can be used to add functionality such as:
8080
- [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) allows you to analyze the code coverage of your package during your tests, and generates a report that you can [upload to codecov](https://codecov.io/).
8181

8282
:::{todo}
83-
[Learn more about code coverage here.](code-cov)
83+
Learn more about code coverage here. (add link)
8484
:::
8585

8686
```{note}

tests/tests-ci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CI can also be triggered for pull requests and pushes to your repository. This m
66

77
::::{todo}
88
```{note}
9-
[Learn more about Continuous Integration and how it can be used, here.](ci)
9+
Learn more about Continuous Integration and how it can be used, here. (add link)
1010
```
1111
::::
1212

tutorials/1-installable-code.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,10 @@ Python versions your package supports. While this won't impact your package buil
414414
Also because we are assuming you're creating a pure Python package, you can remove the following classifiers:
415415

416416
```toml
417+
classifiers = [
417418
"Programming Language :: Python :: Implementation :: CPython",
418419
"Programming Language :: Python :: Implementation :: PyPy",
420+
]
419421
```
420422

421423
Your new pyproject.toml file should now look something like this:
@@ -480,7 +482,7 @@ While you can do this using hatch, we are going to use pip for this lesson, so y
480482

481483
:::{todo}
482484
Add this back in when the lesson is published
483-
- Activate the Python environment that you wish to use. If you need help with working with virtual environments [check out this lesson](extras/1-create-environment.md).
485+
- Activate the Python environment that you wish to use. If you need help with working with virtual environments check out this lesson (add link).
484486
:::
485487

486488
```bash
@@ -613,13 +615,11 @@ In the upcoming lessons you will:
613615
* Add more metadata to your `pyproject.toml` file to support PyPI publication.
614616
* learn how to publish to **conda-forge** from **PyPI**.
615617
616-
617618
* Add a [README file](add-readme.md) and [LICENSE](add-license-coc.md) to your package
618-
* [Add more metadata to your `pyproject.toml`](5-pyproject-toml.md) file to support PyPI publication.
619+
* [Add more metadata to your `pyproject.toml`](pyproject-toml.md) file to support PyPI publication.
619620
* [Learn how to build your package distribution](publish-pypi) files (**sdist** and **wheel**) and publish to **test PyPI**.
620621
* Finally you will learn how to [publish to **conda-forge**](publish-conda-forge) from **PyPI**.
621622
622-
623623
## Footnotes
624624
625625
[^shell-lesson]: [Carpentries shell lesson](https://swcarpentry.github.io/shell-novice/)

tutorials/add-license-coc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ You can use your code of conduct as a tool that can be referenced when moderatin
153153
If you are unsure of what language to add to your `CODE_OF_CONDUCT`
154154
file, we suggest that you adopt the [contributor covenant language](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) as a starting place.
155155

156-
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](#)
156+
![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)
157157

158158
The `CODE_OF_CONDUCT.md` should be placed at the root of your project directory, similar to the LICENSE file.
159159

tutorials/add-readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ Short description here using non-technical language that describes what your pac
196196

197197
## How to install pyosPackage
198198

199+
:::{todo}
200+
- when i add more to the pyos package this can use that readme>
201+
:::
202+
199203
To install this package run:
200204

201205
`pip install pyosPackage`

tutorials/get-to-know-hatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ hatch config show will print out the contents of your config.toml file in your s
111111
Hatch offers a suite of features that will make creating, publishing
112112
and maintaining your Python package easier.
113113

114-
:::{admonition}
114+
:::{admonition} Comparison to other tools
115115
:class: tip
116116
[We compared hatch to several of the other popular packaging tools in the ecosystem including flit, pdm and poetry. Learn more here](package-features)
117117
:::

tutorials/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ You can install a Python package into a Python environment in the same way
290290
you might install NumPy or Pandas. Installing your package into an environment
291291
allows you to access it from any code run with that specific Python environment activated.
292292

293-
:::{figure-md} packages-environment
293+
:::{figure-md} packages-environment-install
294294

295295
<img src="../images/tutorials/environment-package-install.png" alt="Diagram showing the steps associated with creating a package and then installing it. The first arrow says your package and the second says pip install package. The second arrow leads to a box that represents a Python environment that already has some packages installed such as Pandas and NumPy. Your package will also get installed into that same environment when you pip install it." width="700px">
296296

@@ -315,11 +315,11 @@ Then you can create a conda-forge recipe using the [Grayskull](https://github.co
315315

316316
[You will learn more about the conda-forge publication process here.](publish-conda-forge.md)
317317

318-
:::{figure-md} build-workflow-tutorial
318+
:::{figure-md} publish-package-pypi-conda-overview
319319
<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. Documentation and data are below that box because they aren't normally published in your packaging wheel distribution. an arrow to the right takes you to a build distribution files box. that box leads you to either publishing to testPyPI or the real PyPI. From PyPI you can then connect to conda-forge for an automated build that sends distributions from PyPI to conda-forge." width="700px">
320320

321321
In the image above, you can see the steps associated with publishing
322-
your package on PyPI and conda-forge. Note that the distribution files that PyPI requires are the [sdist](#python-source-distribution) and [wheel](#python-wheel) files. Once you are ready to make your code publicly installable, you can publish it on PyPI. Once your code is on PyPI it is straight forward to then publish to conda-forge. You create a recipe using the Grayskull package and then you open a pr in the conda-forge recipe repository. You will learn more about this process in the [conda-forge lesson](#).
322+
your package on PyPI and conda-forge. Note that the distribution files that PyPI requires are the [sdist](#python-source-distribution) and [wheel](#python-wheel) files. Once you are ready to make your code publicly installable, you can publish it on PyPI. Once your code is on PyPI it is straight forward to then publish to conda-forge. You create a recipe using the Grayskull package and then you open a pr in the conda-forge recipe repository. You will learn more about this process in the [conda-forge lesson](/tutorials/publish-conda-forge).
323323
:::
324324

325325
## Yay, your package has users! Now what?

0 commit comments

Comments
 (0)