Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

update: hatch tutorial #217

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions tutorials/get-to-know-hatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,35 @@ Our Python packaging tutorials use the tool Hatch.
In this tutorial, you will install and get to know hatch a bit more before starting to use it.

## Install Hatch
To begin, install Hatch following the
[instructions here](https://hatch.pypa.io/latest/install/).
To begin, install Hatch from the command line using [pipx](https://pipx.pypa.io/stable/)

```bash
pipx install hatch
```

:::{tip}
Hatch also provides pre-build binaries available from common OS package managers or directly from
the [hatch website](https://hatch.pypa.io/latest/install/).
:::

:::{tip}
If you are comfortable using [pipx](https://pipx.pypa.io/stable/) to install hatch, we encourage you to do so. pipx will ensure that your package is available across all of your Python environments on your computer rather than just in the environment that you install it into.
Hatch can also be installed directly using `pip` or `conda`, but we encourage you to use `pipx`.
This is because `pipx` will ensure that your package is available across all of your Python
environments on your computer rather than just in the environment that you install it into.

However if you are not sure about pipx, you can install hatch using pip or conda.
If you install hatch this way you will have to take care that the environment it is installed into
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a continuation of the pip/conda paragraph to make it clear that it isn't referring to pipx?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that would that make it clearer then yes. I did see some ambiguity here, but it also felt weird to write out pipx so many times in one block.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

is activated for the command to work.
:::

You can check that hatch is working properly by issuing a simple command to get the version

```bash
hatch --version
# Hatch, version 1.9.4
```

Note the version numbers will likely be different

## Configure hatch

Once you have installed hatch, you will want to customize the configuration.
Expand Down
Loading