This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/burr.git
The following commit(s) were added to refs/heads/main by this push:
new 34d1fd64 Simplify running of release scripts with dependency groups
(#604)
34d1fd64 is described below
commit 34d1fd64267ecfaad5c286451609ea64d2c0ace7
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Dec 7 12:12:53 2025 +0100
Simplify running of release scripts with dependency groups (#604)
While verifying the release, I realised that there were a small
issue with setting up the environment - the installation instructions
asked to install burr without extras in local dev env, but that
was not enoughm you need to also install `cli` extra.
I have updated the docs appropriately, but also added an alternative
workflow for running the installation scripts with `uv` and the
standard "dependency groups". The dependency groups are
already standardised and used by `uv` and others - for example to
install dev dependency group automatically when `uv sync` is used.
This makes it as easy to run the scripts as possible without having
all the venv manual installation and syncing (uv does it for you).
---
docs/contributing/setup.rst | 16 ++++++++++++++++
docs/getting_started/install.rst | 1 -
pyproject.toml | 6 ++++++
scripts/README.md | 21 ++++++++++++++++++++-
4 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/docs/contributing/setup.rst b/docs/contributing/setup.rst
index f9e29781..efe856d3 100644
--- a/docs/contributing/setup.rst
+++ b/docs/contributing/setup.rst
@@ -47,6 +47,22 @@ Next you'll want to ``cd`` into the directory and install
cd burr
pip install -e ".[developer]"
+You can also use dependency group:
+
+.. code-block:: bash
+
+ pip install -e . --group dev
+
+or, if you use ``uv``:
+
+.. code-block:: bash
+
+ uv sync
+
+The latter command will automatically create and install virtual env if one
does not exist and will
+automatically install the project in editable mode with all developer
dependencies defined in dev
+dependency group.
+
This will install all potential dependencies. Burr will work with ``python
>=3.9``.
------------------
diff --git a/docs/getting_started/install.rst b/docs/getting_started/install.rst
index db7d2e1e..1afa3fbd 100644
--- a/docs/getting_started/install.rst
+++ b/docs/getting_started/install.rst
@@ -66,7 +66,6 @@ This installs the dependencies to run the burr CLI, i.e.
`burr --help`.
This installs all the dependencies for developing locally.
-
.. code-block:: bash
pip install "burr[documentation]"
diff --git a/pyproject.toml b/pyproject.toml
index 48ccc6f8..7b8da0fa 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -252,6 +252,12 @@ burr-admin-build-ui = "burr.cli.__main__:cli_build_ui"
burr-admin-generate-demo-data = "burr.cli.__main__:cli_generate_demo_data"
burr-test-case = "burr.cli.__main__:cli_test_case"
+[dependency-groups]
+dev = [
+ "apache-burr[cli]",
+ "flit",
+]
+
[tool.flit.module]
name = "burr"
diff --git a/scripts/README.md b/scripts/README.md
index 8db4f235..ed9c12b1 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -102,7 +102,7 @@ ls burr/tracking/server/build/ # Should NOT exist (no
pre-built UI)
# Create clean environment
python -m venv venv && source venv/bin/activate
-pip install -e .
+pip install -e ".[cli]"
pip install flit
# Build artifacts and wheel (see step 3)
@@ -111,6 +111,25 @@ ls dist/*.whl
deactivate
```
+Alternatively, instead of manually creating the `venv` and installing burr
with `pip install`, you can use
+`uv` and use simplified development workflow of uv you can run the command
directly:
+
+```bash
+uv run scripts/build_artifacts.py all --clean
+ls dist/*.whl
+```
+
+This will automatically:
+
+* download the right python version if you do not have python installed
+* create virtual environment in local `.venv` directory
+* activates the venv
+* installs `burr` in editable mode with `dev` dependency group (that contains
`cli` extra, `developer` extra
+ and `flit` package.
+* deactivates the venv
+
+Next time when you run `uv run` it will also automatically sync the
environment with latest `pyproject.toml`
+
## 3. Build Artifacts and Wheel
The `build_artifacts.py` script has three subcommands: