Skip to content

Commit 45636f7

Browse files
authored
Fix: typos throughout the packaging build page (#180)
1 parent 634d769 commit 45636f7

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

documentation/write-user-documentation/document-your-code-api-docstrings.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class, method, attribute and/or function in your package (_within reason_) that:
4343
- Defines the `type` inputs and outputs (ie. `string`, `int`, `np.array`)
4444
- Explains the expected output `return` of the object, method or function.
4545

46+
(numpy-docstring)=
4647
### Three Python docstring formats and why we like NumPy style
4748

4849
There are several Python docstring formats that you can chose to use when documenting
@@ -252,7 +253,7 @@ the output of the function is also an int.
252253
def add_me(num1: int, num2: int) -> int:
253254
"""A function that sums two numbers.
254255
```
255-
256+
(type-hints)=
256257
### Why use type hints
257258

258259
Type hints:

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ extensions.
1212

1313
:::{figure-md} package-decision-tree
1414

15-
<img src="../images/python-package-tools-decision-tree.png" alt="Decision tree diagram showing the various front and back end packaging tools. You can decide what packaging tool to use by thinking about what features you need. PDM is currently the most flexible tool that also supports both non pure Python projects and also using different build back-ends. As such currently PDM is the tool we think beginners might appreciate most with Poetry being a close second. Poetry is ideal for pure python projects." width="700px">
15+
<img src="../images/python-package-tools-decision-tree.png" alt="Decision tree diagram showing the various front and back end packaging tools. You can decide what packaging tool to use by thinking about what features you need. PDM and Hatch are currently the most flexible tools as they also using different build back-ends. As such currently PDM and Hatch are the tools we think beginners might appreciate most with Poetry being a close second. Poetry is nice for pure Python projects." width="700px">
1616

17-
Diagram showing the various from end build tools that you can select from. Each tool has different features as highlighted below.
18-
NOTE: this is still a DRAFT so i'm not going to spend time truly cleaning it up until i get lots of feedback on the general approach!!
17+
Diagram showing the different front end build tools available to use in the Python package ecosystem that you can select from. We selected tools to include in this diagram based upon the PyPI survey which helped us understand the most populate tools in the ecosystem. Each tool has different features as highlighted below.
1918
:::
2019

2120
If you want to know more about Python packages that have extensions written in
@@ -207,6 +206,7 @@ front-end tools remove the need to use other core tools in your workflow. For ex
207206
Note that because setuptools does not offer a front-end interface, it is not
208207
included in the table.
209208

209+
(package-features)=
210210
### Package tool features table
211211

212212
```{csv-table}
@@ -215,7 +215,7 @@ included in the table.
215215
:delim: "|"
216216
217217
Default Build Back-end| Flit-core| hatchling| PDM| Poetry-core
218-
Use Other Build Backends|✖ | |✅ |✖
218+
Use Other Build Backends|✖ | |✅ |✖
219219
Dependency management| ✖|✖|✅|✅
220220
Publish to PyPI| ✅|✅|✅|✅
221221
Version Control based versioning (using `git tags`)|✖|✅|✅|✅
@@ -310,7 +310,7 @@ Install your package in editable mode|✅| Flit supports installing your package
310310
Build your sdist and wheel distributions|✅| Flit can be used to build your packages sdist and wheel distributions.
311311
```
312312

313-
\*\* NOTE: _If you are using the most current version of pip, it supports both a symlink approach `flit install -s` and `pip install -e .`_
313+
NOTE: _If you are using the most current version of pip, it supports both a symlink approach `flit install -s` and `pip install -e .`_
314314

315315
```{admonition} Learn more about flit
316316
* [Why use flit?](https://flit.pypa.io/en/stable/rationale.html)
@@ -329,6 +329,7 @@ You may NOT want to use flit if:
329329
- You have a project that is not pure Python (Use Hatch, PDM or setuptools)
330330
- You want environment management (use PDM, Hatch or Poetry)
331331

332+
(hatch)=
332333
## Hatch
333334

334335
[**Hatch**](https://hatch.pypa.io/latest/), similar to Poetry and PDM, provides a
@@ -345,14 +346,14 @@ as building your documentation locally. This means that you could potentially dr
345346
:widths: 20,5,50
346347
:delim: "|"
347348
348-
Use Other Build Backends|| Switching out build back-ends is not currently an option with Hatch. However, this feature is planned for a future release.
349+
Use Other Build Backends|| Switching out build back-ends is not currently an option with Hatch. However, this feature is planned for a future release.
349350
Dependency management|✖| Currently you have to add dependencies manually with Hatch. However a feature to support dependencies management may be added in a future release.
350351
Environment Management |✅ | Hatch supports Python virtual environments. If you wish to use other types of environments such as Conda, you will need to [install a plugin such as hatch-conda for conda support](https://github.com/OldGrumpyViking/hatch-conda).
351352
Publish to PyPI and test PyPI|✅|Hatch supports publishing to both test PyPI and PyPI
352353
Version Control based versioning|✅ | Hatch offers `hatch_vcs` which is a plugin that uses setuptools_scm to support versioning using git tags. The workflow with `hatch_vcs` is the same as that with `setuptools_scm`.
353354
Version bumping| ✅ | Hatch supports you bumping the version of your package using standard semantic version terms patch; minor; major
354355
Follows current packaging standards|✅|Hatch supports current packaging standards for adding metadata to the **pyproject.toml** file.
355-
Install your package in editable mode|✅| You can install your package in editable mode using `pip install -e .` Hatch mentions [editable installs](https://hatch.pypa.io/latest/config/build/#dev-mode) but refers to pip in its documentation.
356+
Install your package in editable mode|✅| Hatch will install your package into any of its environments by default in editable mode. You can install your package in editable mode manually using `pip install -e .` Hatch mentions [editable installs](https://hatch.pypa.io/latest/config/build/#dev-mode) but refers to pip in its documentation.
356357
Build your sdist and wheel distributions|✅| Hatch will build the sdist and wheel distributions
357358
✨Matrix environment creation to support testing across Python versions✨|✅| The matrix environment creation is a feature that is unique to Hatch in the packaging ecosystem. This feature is useful if you wish to test your package locally across Python versions (instead of using a tool such as tox).
358359
✨[Nox / MAKEFILE like functionality](https://hatch.pypa.io/latest/environment/#selection)✨| ✅| This feature is also unique to Hatch. This functionality allows you to create workflows in the **pyproject.toml** configuration to do things like serve docs locally and clean your package build directory. This means you may have one less tool in your build workflow.
@@ -368,7 +369,6 @@ There are a few features that hatch is missing that may be important for some.
368369
These include:
369370

370371
- Hatch doesn't support adding dependencies. You will have to add them manually.
371-
- Hatch currently doesn't support use with other build back-ends. Lack of support for other build back-ends makes Hatch less desirable for users with more complex package builds. If your package is pure Python, then this won't be an issue.
372372
- Hatch won't by default recognize Conda environments without a plugin.
373373
- Similar to PDM, Hatch's documentation can difficult to work through, particularly if you are just getting started with creating a package.
374374
- Hatch, similar to PDM and Flit currently only has one maintainer.

0 commit comments

Comments
 (0)