From 66393befe948ffe8870452a85f17889472d1a8b2 Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Thu, 11 Jan 2024 14:17:25 -0800 Subject: [PATCH] Add a 'development' convenience script Signed-off-by: Nic Cope --- README.md | 3 +++ example/README.md | 2 +- pyproject.toml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5fa20d9..16a3443 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ This template uses [Python][python], [Docker][docker], and the [Crossplane CLI][cli] to build functions. ```shell +# Run the code in development mode, for crossplane beta render +hatch run development + # Lint the code - see pyproject.toml hatch run lint:check diff --git a/example/README.md b/example/README.md index 25d9b5e..265e9cd 100644 --- a/example/README.md +++ b/example/README.md @@ -5,7 +5,7 @@ with these example manifests. ```shell # Run the function locally -$ hatch run python function/main.py --insecure --debug +$ hatch run development ``` ```shell diff --git a/pyproject.toml b/pyproject.toml index 30950b1..b852c8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,9 @@ type = "virtual" path = ".venv-default" dependencies = ["ipython==8.20.0"] +[tool.hatch.envs.default.scripts] +development = "python function/main.py --insecure --debug" + [tool.hatch.envs.lint] type = "virtual" detached = true