Browse Source

Migrate the CI to --uv

tags/v0.3.10-rc3
haixuanTao 11 months ago
parent
commit
a516e731cf
3 changed files with 17 additions and 27 deletions
  1. +13
    -19
      .github/workflows/ci.yml
  2. +2
    -4
      apis/python/node/README.md
  3. +2
    -4
      examples/python-dataflow/README.md

+ 13
- 19
.github/workflows/ci.yml View File

@@ -307,14 +307,8 @@ jobs:
shell: bash
run: |
# Test Python template Project
python3 -m venv .venv
if [ ! -d ".venv/bin" ]; then
mv .venv/Scripts .venv/bin # venv is placed under `Scripts` on Windows
fi
source .venv/bin/activate
pip3 install maturin ruff pytest
maturin build -m apis/python/node/Cargo.toml
pip3 install target/wheels/*
uv venv --seed -p 3.11
uv run pip install -e apis/python/node
dora new test_python_project --lang python --internal-create-with-path-dependencies
cd test_python_project

@@ -326,43 +320,43 @@ jobs:
export OPERATING_MODE=SAVE
dora up
dora list
dora build dataflow.yml
dora start dataflow.yml --name ci-python-test --detach
dora build dataflow.yml --uv
dora start dataflow.yml --name ci-python-test --detach --uv
sleep 10
dora stop --name ci-python-test --grace-duration 5s

cd ..

# Run Python Node Example
dora build examples/python-dataflow/dataflow.yml
dora start examples/python-dataflow/dataflow.yml --name ci-python --detach
dora build examples/python-dataflow/dataflow.yml --uv
dora start examples/python-dataflow/dataflow.yml --name ci-python --detach --uv
sleep 10
dora stop --name ci-python --grace-duration 10s

# Run Python Dynamic Node Example

dora start examples/python-dataflow/dataflow_dynamic.yml --name ci-python-dynamic --detach
opencv-plot --name plot
dora start examples/python-dataflow/dataflow_dynamic.yml --name ci-python-dynamic --detach --uv
uv run opencv-plot --name plot
sleep 10
dora stop --name ci-python-dynamic --grace-duration 10s

# Run Python Operator Example

dora start examples/python-operator-dataflow/dataflow.yml --name ci-python-operator --detach
dora start examples/python-operator-dataflow/dataflow.yml --name ci-python-operator --detach --uv
sleep 10
dora stop --name ci-python-operator --grace-duration 10s

dora destroy

# Run Python queue latency test
dora run tests/queue_size_latest_data_python/dataflow.yaml
dora run tests/queue_size_latest_data_python/dataflow.yaml --uv

# Run Python queue latency test + timeout
dora run tests/queue_size_and_timeout_python/dataflow.yaml
dora run tests/queue_size_and_timeout_python/dataflow.yaml --uv

# Run Rust queue latency test
dora build tests/queue_size_latest_data_rust/dataflow.yaml
dora run tests/queue_size_latest_data_rust/dataflow.yaml
dora build tests/queue_size_latest_data_rust/dataflow.yaml --uv
dora run tests/queue_size_latest_data_rust/dataflow.yaml --uv

- name: "Test CLI (C)"
timeout-minutes: 30


+ 2
- 4
apis/python/node/README.md View File

@@ -5,10 +5,8 @@ This crate corresponds to the Node API for Dora.
To build the Python module for development:

```bash
python -m venv .env
source .env/bin/activate
pip install maturin
maturin develop
uv venv --seed -p 3.11
uv run pip install -e .
```

## Type hinting


+ 2
- 4
examples/python-dataflow/README.md View File

@@ -15,9 +15,7 @@ information on how to start such a dataflow.

## Getting started

After installing Rust, `dora-cli` and `Python >3.11`, you will need to **activate** (or create and **activate**) a
[Python virtual environment](https://docs.python.org/3/library/venv.html).
Then, you will need to install the dependencies:
After installing Rust, `dora-cli` and `uv` (if you installed the cli without pip), you will need to install the dependencies:

```bash
cd examples/python-dataflow
@@ -36,5 +34,5 @@ dora run ./dataflow.yml --uv (or dora start ./dataflow_dynamic.yml --uv)

```bash
# activate your virtual environment in another terminal
python opencv-plot --name plot
python opencv-plot --name plot --uv
```

Loading…
Cancel
Save