Skip to content

Commit

Permalink
Re-fix broken links and highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Mar 4, 2024
1 parent c5f8d4c commit 8fb8370
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Below you will learn more specifics about the differences between PyPI and conda
:::


:::{figure-md} pypi-conda-channels
:::{figure-md} upload-conda-forge

<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">

Expand Down
1 change: 1 addition & 0 deletions package-structure-code/python-package-build-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ Build your sdist and wheel distributions|✅|Poetry will build your sdist and wh

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

(challenges-with-poetry)=
### Challenges with Poetry

Some challenges of Poetry include:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Learn about Building a Python Package


:::{figure-md} pypi-conda-channels
:::{figure-md} pypi-conda-overview

<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">

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.
:::

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.
:::

(build-package)=
## What is building a Python package?
Expand Down
4 changes: 2 additions & 2 deletions tests/run-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Python versions.



### Tools to run your tests
## Tools to run your tests

There are three categories of tools that will make is easier to setup
and run your tests in various environments:
Expand Down Expand Up @@ -80,7 +80,7 @@ extensions that can be used to add functionality such as:
- [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/).

:::{todo}
[Learn more about code coverage here.](code-cov)
Learn more about code coverage here. (add link)
:::

```{note}
Expand Down
2 changes: 1 addition & 1 deletion tests/tests-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CI can also be triggered for pull requests and pushes to your repository. This m

::::{todo}
```{note}
[Learn more about Continuous Integration and how it can be used, here.](ci)
Learn more about Continuous Integration and how it can be used, here. (add link)
```
::::

Expand Down
4 changes: 2 additions & 2 deletions tutorials/1-installable-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ Python versions your package supports. While this won't impact your package buil
Also because we are assuming you're creating a pure Python package, you can remove the following classifiers:

```toml
[
classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -482,7 +482,7 @@ While you can do this using hatch, we are going to use pip for this lesson, so y

:::{todo}
Add this back in when the lesson is published
- 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).
- Activate the Python environment that you wish to use. If you need help with working with virtual environments check out this lesson (add link).
:::

```bash
Expand Down
2 changes: 1 addition & 1 deletion tutorials/add-license-coc.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ You can use your code of conduct as a tool that can be referenced when moderatin
If you are unsure of what language to add to your `CODE_OF_CONDUCT`
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.

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

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

Expand Down
2 changes: 1 addition & 1 deletion tutorials/get-to-know-hatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ hatch config show will print out the contents of your config.toml file in your s
Hatch offers a suite of features that will make creating, publishing
and maintaining your Python package easier.

:::{admonition}
:::{admonition} Comparison to other tools
:class: tip
[We compared hatch to several of the other popular packaging tools in the ecosystem including flit, pdm and poetry. Learn more here](package-features)
:::
Expand Down
4 changes: 2 additions & 2 deletions tutorials/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ You can install a Python package into a Python environment in the same way
you might install NumPy or Pandas. Installing your package into an environment
allows you to access it from any code run with that specific Python environment activated.

:::{figure-md} packages-environment
:::{figure-md} packages-environment-install

<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">

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

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

:::{figure-md} build-workflow-tutorial
:::{figure-md} publish-package-pypi-conda-overview
<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">

In the image above, you can see the steps associated with publishing
Expand Down
2 changes: 1 addition & 1 deletion tutorials/publish-pypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Show them how to do this
2. update the module repository directory to be the same
:::

:::{figure-md} build-workflow-tutorial
:::{figure-md} test-pypi-search
<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">

Before you try to upload to test PyPI, check to see if the name of your package is already taken. You can do that using
Expand Down
2 changes: 1 addition & 1 deletion tutorials/pyproject-toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ resolving a Python environment more challenging. As such only
pin dependencies to a specific version if you absolutely need to
do so.

One build tool that you should be aware of that pins dependencies to an upper bound by default is Poetry. [Read more about how to safely add dependencies with Poetry, here.](../package-structure-code/python-package-build-tools.html#challenges-with-poetry)
One build tool that you should be aware of that pins dependencies to an upper bound by default is Poetry. [Read more about how to safely add dependencies with Poetry, here.](challenges-with-poetry)
:::

### Step 5: Add PyPI classifiers to your pyproject.toml file
Expand Down

0 comments on commit 8fb8370

Please sign in to comment.