A Rya bootstrapped example application.
Clone this repository, cd into the project directory, then run uv --sync.
$ git clone https://github.com/uhd-urz/myapp.git ~/myapp
$ cd ~/myapp
$ uv --sync
$ source .venv/bin/activateDone! myapp should be installed as an executable within the virtual environment. Run myapp and the
--help message should be displayed.
Note
The following steps will be automated in the future.
- Open
src/myapp/names/names.py, and update the following Enum class:
class AppIdentity(StrEnum):
app_name = "<new app name here>"
app_fancy_name = "<new fancy name here>"
pypi_name = "<the [project] 'name' from pyproject.toml>"
log_file_name = f"{app_name}.log"
config_file_extension = "toml"
user_config_file_name = f"config.{config_file_extension}"
project_config_file_name = f"{app_name}.{config_file_extension}"- Rename the project directory.
mv src/myapp src/<new app name from AppIdentity>- Update the executable name in
pyproject.toml
[project.scripts]
myapp = "<new app name from AppIdentity>.cli.__main__:app"- Run
uv --syncto update the virtual environment metadata. Run<new app name here>on the terminal and the--helpmessage should be displayed like before.