Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update post-gen output for hatch #311

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading