Skip to content

Commit

Permalink
Update post output for hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Sep 5, 2024
1 parent 89da795 commit 0d532f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 5 additions & 3 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@
┃ \x1b[1mInstall the package\x1b[0m ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
To run tests or build the documentation locally, you need to install
your package and its dependencies. You can do so with
To run tests or build the documentation locally, get familiar with \x1b]8;id=707150;https://hatch.pypa.io/latest/tutorials/environment/basic-usage/\x1b\\\x1b[4;34mhatch\x1b[0m\x1b]8;;\x1b\\
\x1b]8;id=707150;https://hatch.pypa.io/latest/tutorials/environment/basic-usage/\x1b\\\x1b[4;34menvironments\x1b[0m\x1b]8;;\x1b\\, and see \x1b[1;36;40m[tool.hatch.envs.*]\x1b[0m in \x1b[1;36;40mpyproject.toml\x1b[0m:
\x1b[40m \x1b[0m
\x1b[40m \x1b[0m\x1b[97;40mpip\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40minstall\x1b[0m\x1b[97;40m \x1b[0m\x1b[93;40m".[test,dev,doc]"\x1b[0m\x1b[40m \x1b[0m\x1b[40m \x1b[0m
\x1b[40m \x1b[0m\x1b[97;40mhatch\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40mrun\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40mpre-commit\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40mrun\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40m--all-files\x1b[0m\x1b[97;40m \x1b[0m\x1b[37;40m# tool.hatch.envs.default\x1b[0m\x1b[40m \x1b[0m\x1b[40m \x1b[0m
\x1b[40m \x1b[0m\x1b[97;40mhatch\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40mtest\x1b[0m\x1b[97;40m \x1b[0m\x1b[37;40m# tool.hatch.envs.hatch-test\x1b[0m\x1b[40m \x1b[0m\x1b[40m \x1b[0m
\x1b[40m \x1b[0m\x1b[97;40mhatch\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40mrun\x1b[0m\x1b[97;40m \x1b[0m\x1b[97;40mdocs:build\x1b[0m\x1b[97;40m \x1b[0m\x1b[37;40m# tool.hatch.envs.docs\x1b[0m\x1b[40m \x1b[0m\x1b[40m \x1b[0m
\x1b[40m \x1b[0m
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
Expand Down
9 changes: 6 additions & 3 deletions scripts/src/scverse_template_scripts/make_rich_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
# Install the package
To run tests or build the documentation locally, you need to install your package and its dependencies.
You can do so with
To run tests or build the documentation locally, get familiar with [hatch environments][hatch-envs],
and see `[tool.hatch.envs.*]` in `pyproject.toml`:
```bash
pip install ".[test,dev,doc]"
hatch run pre-commit run --all-files # tool.hatch.envs.default
hatch test # tool.hatch.envs.hatch-test
hatch run docs:build # tool.hatch.envs.docs
```
# Customizations
Expand All @@ -47,6 +49,7 @@
[setup-pre-commit]: {dev_docs_url}#pre-commit-checks
[setup-rtd]: {dev_docs_url}#documentation-on-readthedocs
[setup-codecov]: {dev_docs_url}#coverage-tests-with-codecov
[hatch-envs]: https://hatch.pypa.io/latest/tutorials/environment/basic-usage/
[write-tests]: {dev_docs_url}#writing-tests
[write-docs]: {dev_docs_url}#writing-documentation
[scverse discourse]: https://discourse.scverse.org/
Expand Down

0 comments on commit 0d532f7

Please sign in to comment.