Skip to content

Commit dd8f91f

Browse files
committed
Fix: edits from review
1 parent 6a7f72b commit dd8f91f

File tree

1 file changed

+49
-37
lines changed

1 file changed

+49
-37
lines changed

tutorials/get-to-know-hatch.md

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
# Get to know Hatch
1+
# Get to Know Hatch
22

33
Our Python packaging tutorials use the tool
4-
[Hatch](https://hatch.pypa.io/latest/). While there are [many great packaging](/package-structure-code/python-package-build-tools)
5-
tool options out there, we have selected to teach Hatch because
6-
7-
1. It is an end-to-end tool that supports most of the steps required to create a quality Python package. Beginners will have fewer tools to learn if they use Hatch.
8-
1. It supports different build back-ends if you ever need to compile code in other languages.
9-
1. As a community, pyOpenSci has decided that Hatch is a user-friendly tool that supports many different scientific Python use cases.
4+
[Hatch](https://hatch.pypa.io/latest/). While there are [many great packaging
5+
tools](/package-structure-code/python-package-build-tools) out there, we have
6+
selected Hatch because:
7+
8+
1. It is an end-to-end tool that supports most of the steps required to create
9+
a quality Python package. Beginners will have fewer tools to learn if they
10+
use Hatch.
11+
2. It supports different build back-ends if you ever need to compile code in
12+
other languages.
13+
3. As a community, pyOpenSci has decided that Hatch is a user-friendly tool that
14+
supports many different scientific Python use cases.
1015

1116
In this tutorial, you will install and get to know Hatch a bit more before
1217
starting to use it.
@@ -17,16 +22,14 @@ You need two things to successfully complete this tutorial:
1722
2. You need Hatch installed.
1823

1924
:::{important}
20-
If you don't already have Python installed, Hatch will do it for you when you
21-
install Hatch.
22-
23-
Hatch uses [UV](https://astral.sh/blog/uv) to install Python. UV is a super
24-
fast Python package installer and resolver written in Rust.
25+
If you don't already have Python installed on your computer, Hatch will do it
26+
for you when you install Hatch.
2527
:::
2628

2729
## Install Hatch
2830

29-
To begin, follow the operating-specific instructions below to install Hatch.
31+
To begin, follow the operating-system-specific instructions below to install
32+
Hatch.
3033

3134
::::{tab-set}
3235

@@ -65,8 +68,8 @@ however, if you prefer another method, check out the [Hatch installation documen
6568

6669
### Check that hatch installed correctly
6770

68-
Once you have completed the installation instructions above, you can open your terminal, and make sure that Hatch installed correctly using
69-
the command below:
71+
Once you have completed the installation instructions above, you can open your
72+
terminal, and make sure that Hatch installed correctly using the command below:
7073

7174
```bash
7275
hatch --version
@@ -77,38 +80,42 @@ hatch --version
7780
different from the output above in this tutorial.*
7881

7982
:::{tip}
80-
Hatch can also be installed directly using `pip` or `conda`. We
81-
encourage
82-
you to follow the instructions above because we have found that the Hatch installers for Windows and Mac are easiest and most efficient.
83+
Hatch can also be installed directly using pip or conda. We encourage you to
84+
follow the instructions above because we have found that the Hatch installers
85+
for Windows and Mac are the easiest and most efficient.
8386

84-
Our Linux users have found success installing Hatch with `pipx` if they
85-
already use `apt install`.
87+
Our Linux users have found success installing Hatch with pipx if they already
88+
use apt install.
8689

87-
Both approaches (using a graphical installer on Windows / MAC and `pipx`) ensure that you have Hatch installed
88-
globally. A global install means that Hatch is available
89-
across all of your Python environments on your computer.
90+
Both approaches (using a graphical installer on Windows/Mac and pipx) ensure
91+
that you have Hatch installed globally. A global install means that Hatch is
92+
available across all of your Python environments on your computer.
9093
:::
9194

92-
## Configure hatch
95+
## Configure Hatch
9396

94-
Once you have installed Hatch, you can customize the configuration which
95-
includes the default name and setup that you want to have for every
96-
package that you create using Hatch. While this step is not required, we suggest it.
97+
Once you have installed Hatch, you can customize its configuration. This
98+
includes setting the default name and setup for every package you create. While
99+
this step is not required, we suggest that you do it.
97100

98-
Hatch stores your configuration information in a [`config.toml` file](https://hatch.pypa.io/latest/config/project-templates/).
101+
Hatch stores your configuration in a [`config.toml` file](https://hatch.pypa.io/latest/config/project-templates/).
99102

100-
While you can update the `config.toml` file through the command line,
101-
it might be easier to look at it and update it in a text editor if you are using it for the first time.
103+
While you can update the `config.toml` file through the command line, it might
104+
be easier to look at and update it in a text editor if you are using it for the
105+
first time.
102106

103-
### Step 1: Open and edit your `config.toml` file
107+
### Step 1: Open and Edit Your `config.toml` File
104108

105-
To open the config file in your file browser, run the following command in your shell:
109+
To open the config file in your file browser, run the following command in your
110+
shell:
106111

107112
`hatch config explore`
108113

109-
This will open up a directory window that will allow you to double click on the file and open it in your favorite text editor.
114+
This will open up a directory window that allows you to double-click on the file
115+
and open it in your favorite text editor.
110116

111-
You can also retrieve the location of the Hatch config file by running the following command in your shell:
117+
You can also retrieve the location of the Hatch config file by running the
118+
following command in your shell:
112119

113120
```bash
114121
hatch config find
@@ -117,7 +124,9 @@ hatch config find
117124

118125
### Step 2 - update your email and name
119126

120-
Once the file is open, update the [template] table of the `config.toml` file with your name and email. This information will be used in any `pyproject.toml` metadata files that you create using Hatch.
127+
Once the file is open, update the [template] table of the `config.toml` file
128+
with your name and email. This information will be used in any `pyproject.toml`
129+
metadata files that you create using Hatch.
121130

122131
```toml
123132
[template]
@@ -174,7 +183,8 @@ src-layout = true
174183

175184
Also notice that the default license option is MIT. While we will discuss
176185
license in more detail in a later lesson, the MIT license is the
177-
recommended permissive license from [choosealicense.com](https://www.choosealicense.com) and as such we will
186+
recommended permissive license from
187+
[choosealicense.com](https://www.choosealicense.com) and as such we will
178188
use it for this tutorial series.
179189

180190
You are of course welcome to select another license.
@@ -189,7 +199,9 @@ Once you have completed the steps above run the following command in your shell.
189199

190200
`hatch config show`
191201

192-
`hatch config show` will print out the contents of your `config.toml` file in your shell. look at the values and ensure that your name, email is set. Also make sure that `tests=false`.
202+
`hatch config show` will print out the contents of your `config.toml` file in
203+
your shell. look at the values and ensure that your name, email is set. Also
204+
make sure that `tests=false`.
193205

194206
## Hatch features
195207

0 commit comments

Comments
 (0)