Skip to content

Commit d6cccf4

Browse files
committed
deploy: c66dfe7
1 parent c13fb56 commit d6cccf4

22 files changed

+969
-8
lines changed

.doctrees/environment.pickle

5.04 KB
Binary file not shown.

.doctrees/index.doctree

1.23 KB
Binary file not shown.
Binary file not shown.

.doctrees/tutorials/intro.doctree

336 Bytes
Binary file not shown.
Loading

_sources/index.md.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ The first round of our community-developed, how to create a Python package tutor
9696
:::
9797
::::
9898

99+
::::{grid-item}
100+
:::{card} ✿ Reference Guides ✿
101+
:class-card: left-aligned
102+
103+
* [Command Line Reference Guide](/tutorials/command-line-reference)
104+
105+
:::
106+
::::
107+
99108
:::::
100109

101110

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Command Line Reference Guide
2+
3+
```{important}
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+
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.
9+
```
10+
11+
## Environment Setup
12+
13+
:::{table}
14+
:widths: auto
15+
:align: center
16+
17+
| Description | Syntax |
18+
|---|---|
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+
| Update PATH variable with pipx directory | `pipx ensurepath` |
25+
| Install hatch | `pipx install hatch` or `pip install hatch` |
26+
| List hatch commands | `hatch -h` |
27+
| Open location of hatch config file | `hatch config explore` |
28+
| Print contents of hatch config file | `hatch config show` |
29+
| Install grayskull | `pipx install grayskull` or `pip install grayskull` |
30+
31+
:::
32+
33+
## Package Development
34+
35+
:::{table}
36+
:widths: auto
37+
:align: center
38+
39+
| Description | Syntax |
40+
|---|---|
41+
| Create package structure and baseline contents | `hatch new [PACKAGE_NAME]` |
42+
| Install package locally in editable mode | `python -m pip install -e .` |
43+
| Install development dependencies | `python -m pip install ".[DEPENDENCY_GROUP]"` |
44+
| List packages installed in current environment | `pip list` |
45+
| Install package from GitHub | `pip install git+https://github.com/user/repo.git@branch_or_tag` |
46+
| Create development environment | `hatch env create` |
47+
| Activate development environment | `hatch shell` |
48+
| Exit development environment | `exit` |
49+
50+
:::
51+
52+
## Package Publishing
53+
54+
:::{table}
55+
:widths: auto
56+
:align: center
57+
58+
| Description | Syntax |
59+
|---|---|
60+
| Build package sdist and wheel distributions | `hatch build` |
61+
| Publish package to Test PyPI | `hatch publish -r test` |
62+
| Install package from Test PyPI | `pip install -i https://test.pypi.org/simple/ [PACKAGE_NAME]` |
63+
| Publish package to PyPI | `hatch publish` |
64+
| Install package from PyPI | `pip install -i https://pypi.org/simple/ [PACKAGE_NAME]` |
65+
| Create conda-forge recipe | `grayskull pypi [PACKAGE_NAME]` |
66+
| Check that package installs properly | `pip check` |
67+
| Install package from conda-forge | `conda install -c conda-forge [PACKAGE_NAME]` |
68+
69+
:::
70+
71+
## Versions and Environments
72+
73+
:::{table}
74+
:widths: auto
75+
:align: center
76+
77+
| Description | Syntax |
78+
|---|---|
79+
| View environments | `hatch env show` |
80+
| Print path to active hatch environment | `hatch env find` |
81+
| Bump package version - major | `hatch version major` |
82+
| Bump package version - minor | `hatch version minor` |
83+
| Bump package version - patch | `hatch version patch` |
84+
| Run test scripts on multiple Python versions | `hatch run all:[SCRIPT_NAME]` |
85+
86+
:::

_sources/tutorials/intro.md.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ Add a license & code of conduct <add-license-coc>
5050
Update metadata in pyproject.toml <pyproject-toml>
5151
:::
5252

53+
:::{toctree}
54+
:hidden:
55+
:caption: Reference Guides
56+
57+
Command Line Reference Guide <command-line-reference>
58+
:::
59+
5360
:::{toctree}
5461
:hidden:
5562
:caption: Hatch for Existing Packages

index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,17 @@ <h2><em>new</em> Tutorial Series: Create a Python Package<a class="headerlink" h
529529
</div>
530530
</div>
531531
</div>
532+
<div class="sd-col sd-d-flex-column docutils">
533+
<div class="sd-card sd-sphinx-override sd-mb-3 sd-shadow-sm left-aligned docutils">
534+
<div class="sd-card-body docutils">
535+
<div class="sd-card-title sd-font-weight-bold docutils">
536+
✿ Reference Guides ✿</div>
537+
<ul class="simple">
538+
<li><p class="sd-card-text"><a class="reference internal" href="tutorials/command-line-reference.html"><span class="doc std std-doc">Command Line Reference Guide</span></a></p></li>
539+
</ul>
540+
</div>
541+
</div>
542+
</div>
532543
</div>
533544
</div>
534545
</section>

objects.inv

29 Bytes
Binary file not shown.

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sitemap.xml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tutorials/add-license-coc.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@
458458
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Add a license &amp; code of conduct</a></li>
459459
<li class="toctree-l1"><a class="reference internal" href="pyproject-toml.html">Update metadata in pyproject.toml</a></li>
460460
</ul>
461+
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference Guides</span></p>
462+
<ul class="nav bd-sidenav">
463+
<li class="toctree-l1"><a class="reference internal" href="command-line-reference.html">Command Line Reference Guide</a></li>
464+
</ul>
461465
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Hatch for Existing Packages</span></p>
462466
<ul class="nav bd-sidenav">
463467
<li class="toctree-l1"><a class="reference internal" href="setup-py-to-pyproject-toml.html">Migrate setup.py to a pyproject.toml using Hatch</a></li>

tutorials/add-readme.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@
458458
<li class="toctree-l1"><a class="reference internal" href="add-license-coc.html">Add a license &amp; code of conduct</a></li>
459459
<li class="toctree-l1"><a class="reference internal" href="pyproject-toml.html">Update metadata in pyproject.toml</a></li>
460460
</ul>
461+
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference Guides</span></p>
462+
<ul class="nav bd-sidenav">
463+
<li class="toctree-l1"><a class="reference internal" href="command-line-reference.html">Command Line Reference Guide</a></li>
464+
</ul>
461465
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Hatch for Existing Packages</span></p>
462466
<ul class="nav bd-sidenav">
463467
<li class="toctree-l1"><a class="reference internal" href="setup-py-to-pyproject-toml.html">Migrate setup.py to a pyproject.toml using Hatch</a></li>

0 commit comments

Comments
 (0)