Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Simplify running of release scripts with dependency groups (#604)

Jarek Potiuk34d1fd64267e
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: