From 85b5b6e35c8a790503001720789cddd5485ae37b Mon Sep 17 00:00:00 2001 From: Pat Tressel Date: Mon, 8 Apr 2024 13:59:43 -0700 Subject: [PATCH] Update get-to-know-hatch.md for consistent style of "Hatch" etc. Use "Hatch" to refer to the tool, "hatch" to the command. Use fixed-pitch text for commands and file names. Add missing periods. Note there is one sentence re. comparing Hatch to other tools, where their names are all lowercase, but I don't know if the other tools are commonly referred to that way. --- tutorials/get-to-know-hatch.md | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tutorials/get-to-know-hatch.md b/tutorials/get-to-know-hatch.md index 8d56b821f..34bd91faa 100644 --- a/tutorials/get-to-know-hatch.md +++ b/tutorials/get-to-know-hatch.md @@ -1,38 +1,38 @@ -# Get to know hatch +# Get to know Hatch 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. +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/). :::{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. +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. -However if you are not sure about pipx, you can install hatch using pip or conda. +However if you are not sure about pipx, you can install Hatch using pip or conda. ::: -## Configure hatch +## Configure Hatch -Once you have installed hatch, you will want to customize the configuration. +Once you have installed Hatch, you will want to customize the configuration. -Hatch stores your configuration information in a [config.toml file](https://hatch.pypa.io/latest/config/project-templates/). +Hatch stores your configuration information in a [`config.toml` file](https://.pypa.io/latest/config/project-templates/). While you can update the `config.toml` file through the command line, it might be easier to look at it and update it in a text editor if you are using it for the first time. -### Step 1: Open and edit your config.toml file +### Step 1: Open and edit your `config.toml` file To open the config file in your file browser, run the following command in your shell: `hatch config explore` -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 +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. ### Step 2 - update your email and name -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. +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. ```toml [template] @@ -45,7 +45,7 @@ email = "your-email@your-domain.org" Next, set tests to false in the `[template.plugins.default]` table. While tests are important, setting the tests configuration in Hatch -to `true` will create a more complex pyproject.toml file. You won't +to `true` will create a more complex `pyproject.toml` file. You won't need to use this feature in this beginner friendly tutorial series but we will introduce it in later tutorials. @@ -92,19 +92,19 @@ license in more detail in a later lesson, the MIT license is the recommended permissive license from [choosealicense.com](https://www.choosealicense.com) and as such we will use it for this tutorial series. -You are of course welcome to select another license +You are of course welcome to select another license. :::{todo} I think we'd need the SPDX license options here if they want to chose bsd-3 for instance ::: -### Step 4: Close the config file and run hatch config show +### Step 4: Close the config file and run `hatch config show` Once you have completed the steps above run the following command in your shell. `hatch config show` -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. +`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`. ## Hatch features @@ -113,14 +113,14 @@ and maintaining your Python package easier. :::{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) +[We compared Hatch to several of the other popular packaging tools in the ecosystem including flit, pdm and poetry. Learn more here](package-features) ::: -[More on hatch here](hatch) +[More on Hatch here](hatch) -A few features that hatch offers +A few features that Hatch offers -1. it will convert metadata stored in a `setup.py` or `setup.cfg` file to a pyproject.toml file for you. While we have not extensively tested this feature yet, please let us know if you try it! +1. it will convert metadata stored in a `setup.py` or `setup.cfg` file to a `pyproject.toml` file for you. While we have not extensively tested this feature yet, please let us know if you try it! 2. It will help you by storing configuration information for publishing to PyPI after you've entered it once. Use `hatch -h` to see all of the available commands.