|
4 | 4 | **What these tables are:** These tables summarize the command line inputs (e.g., `pipx install hatch`, `hatch build`) necessary to complete all steps in the package creation process, from installing Hatch to publishing the package on PyPI and conda-forge.
|
5 | 5 |
|
6 | 6 | **What these tables are not:** These tables do not cover the manual/non-automated steps (e.g., create PyPI account, create PyPI API token) you have to complete throughout the package creation process.
|
| 7 | +
|
| 8 | +**Operating system note:** The current iteration of this guide has been tested on the Windows OS only. Many commands are Windows-specific. OS-specific commands are indicated with parentheses after the description of the command, e.g., [COMMAND_DESCRIPTION] (Windows). Corresponding commands for macOS and Linux will be added in the future. |
7 | 9 | ```
|
8 | 10 |
|
9 | 11 | ## Environment Setup
|
|
14 | 16 |
|
15 | 17 | | Description | Syntax |
|
16 | 18 | |---|---|
|
17 |
| -| Set PowerShell execution policy | `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser` | |
18 |
| -| Install Scoop | `Invoke-RestMethod -Uri https://get.scoop.sh \| Invoke-Expression` | |
19 |
| -| Add "main" bucket as download source | `scoop bucket add main` | |
20 |
| -| Add "versions" bucket as download source | `scoop bucket add versions` | |
21 |
| -| Install pipx | `scoop install pipx` or `scoop install main/pipx` | |
22 |
| -| Install python | `scoop install python` or `scoop install main/python` | |
23 |
| -| Install specific python version | `scoop install versions/python311` | |
| 19 | +| Set PowerShell execution policy (Windows) | `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser` | |
| 20 | +| Install Scoop (Windows) | `Invoke-RestMethod -Uri https://get.scoop.sh \| Invoke-Expression` | |
| 21 | +| Add "main" bucket as download source (Windows) | `scoop bucket add main` | |
| 22 | +| Add "versions" bucket as download source (Windows) | `scoop bucket add versions` | |
| 23 | +| Install pipx (Windows) | `scoop install pipx` or `scoop install main/pipx` | |
| 24 | +| Install python (Windows) | `scoop install python` or `scoop install main/python` | |
| 25 | +| Install specific python version (Windows) | `scoop install versions/python311` | |
24 | 26 | | Update PATH variable with pipx directory | `pipx ensurepath` |
|
25 |
| -| Install hatch | `pipx install hatch` | |
| 27 | +| Install hatch | `pipx install hatch` or `pip install hatch` | |
26 | 28 | | List hatch commands | `hatch -h` |
|
27 | 29 | | Open location of hatch config file | `hatch config explore` |
|
28 | 30 | | Print contents of hatch config file | `hatch config show` |
|
29 |
| -| Install grayskull | `pipx install grayskull` | |
| 31 | +| Install grayskull | `pipx install grayskull` or `pip install grayskull` | |
30 | 32 |
|
31 | 33 | :::
|
32 | 34 |
|
|
40 | 42 | |---|---|
|
41 | 43 | | Create package structure and baseline contents | `hatch new [PACKAGE_NAME]` |
|
42 | 44 | | Install package locally in editable mode | `python -m pip install -e .` |
|
| 45 | +| Install development dependencies | `python -m pip install ".[DEPENDENCY_GROUP]"` | |
43 | 46 | | List packages installed in current environment | `pip list` |
|
44 | 47 | | Install package from GitHub | `pip install git+https://github.com/user/repo.git@branch_or_tag` |
|
45 | 48 | | Create development environment | `hatch env create` |
|
|
67 | 70 |
|
68 | 71 | :::
|
69 | 72 |
|
70 |
| -## Miscellaneous Commands |
| 73 | +## Versions and Environments |
71 | 74 |
|
72 | 75 | :::{table}
|
73 | 76 | :widths: auto
|
74 | 77 | :align: center
|
75 | 78 |
|
76 | 79 | | Description | Syntax |
|
77 | 80 | |---|---|
|
78 |
| -| View environments hatch has access to | `hatch env show` | |
| 81 | +| View environments | `hatch env show` | |
79 | 82 | | Print path to active hatch environment | `hatch env find` |
|
80 | 83 | | Bump package version - major | `hatch version major` |
|
81 | 84 | | Bump package version - minor | `hatch version minor` |
|
|
0 commit comments