Skip to content

Commit

Permalink
Update post-gen output for hatch (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Sep 6, 2024
1 parent 89da795 commit 3f3bd13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
10 changes: 6 additions & 4 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@
tool!
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
\x1b[1mInstall the package\x1b[0m ┃
\x1b[1mLocal development\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
11 changes: 7 additions & 4 deletions scripts/src/scverse_template_scripts/make_rich_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
All CI checks should pass, you are ready to start developing your new tool!
# Install the package
# Local development
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 3f3bd13

Please sign in to comment.