Skip to content

Commit 9c9dc59

Browse files
committed
dev: Updating the Justfile for the new repo structure
Justfile: codetracer-python-recorder/codetracer_python_recorder/.gitignore: codetracer-python-recorder/pyproject.toml: pyproject.toml: uv.lock: Signed-off-by: Tzanko Matev <[email protected]>
1 parent 4d2199e commit 9c9dc59

File tree

5 files changed

+40
-21
lines changed

5 files changed

+40
-21
lines changed

Justfile

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,42 @@
1+
default:
2+
@just --list
3+
14
# Development helpers for the monorepo
25

6+
# Python version used for development
7+
PYTHON_DEV_VERSION := "3.13"
8+
39
# Python versions used for multi-version testing/building with uv
410
PY_VERSIONS := "3.10 3.11 3.12 3.13"
511
PY_SHORT_VERSIONS := "10 11 12 13"
12+
613
# Print toolchain versions to verify the dev environment
714
env:
15+
uv --version
816
python3 --version
917
cargo --version
1018
rustc --version
1119
maturin --version
1220

21+
clean:
22+
rm -rf .venv **/__pycache__ **/*.pyc **/*.pyo **/.pytest_cache
23+
rm -rf codetracer-python-recorder/target codetracer-python-recorder/**/*.so
24+
25+
1326
# Create a local virtualenv for Python tooling
1427
venv:
15-
test -d .venv || python3 -m venv .venv
16-
17-
# Build and develop-install the Rust-backed Python module
18-
build-rust:
19-
test -d .venv || python3 -m venv .venv
20-
VIRTUAL_ENV=.venv maturin develop -m crates/codetracer-python-recorder/Cargo.toml
28+
uv venv -p python{{PYTHON_DEV_VERSION}}
2129

22-
# Smoke test the Rust module after build
23-
smoke-rust:
24-
.venv/bin/python -m pip install -U pip pytest
25-
.venv/bin/python -m pytest crates/codetracer-python-recorder/test -q
30+
dev:
31+
just venv
32+
uv run --directory codetracer-python-recorder maturin develop --uv
2633

27-
# Run the Python test suite for the pure-Python recorder
2834
test:
29-
python3 -m unittest discover -v
35+
just venv
36+
uv run pytest
37+
38+
build:
39+
uv run --directory codetracer-python-recorder maturin build
3040

3141
# Run the test suite across multiple Python versions using uv
3242
test-uv-all:
@@ -36,13 +46,13 @@ test-uv-all:
3646
# Build wheels for all target Python versions with maturin
3747
build-rust-uv-all:
3848
for v in {{PY_VERSIONS}}; do \
39-
maturin build --interpreter "python$v" -m crates/codetracer-python-recorder/Cargo.toml --release; \
49+
uv run -p "$v" --directory codetracer-python-recorder maturin build --release; \
4050
done
4151

4252
# Smoke the built Rust wheels across versions using uv
43-
smoke-rust-uv-all:
53+
test-rust-uv-all:
4454
for v in {{PY_SHORT_VERSIONS}}; do \
45-
file=(crates/codetracer-python-recorder/target/wheels/codetracer_python_recorder-*-cp3$v-cp3$v-*.whl); \
55+
file=(codetracer-python-recorder/target/wheels/codetracer_python_recorder-*-cp3$v-cp3$v-*.whl); \
4656
file="${file[0]}"; \
47-
uv run -p "python3.$v" --with "${file}" --with pytest -- python -m pytest crates/codetracer-python-recorder/test -q; \
57+
uv run -p "python3.$v" --with "${file}" --with pytest -- pytest -q; \
4858
done
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.so

codetracer-python-recorder/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["maturin>=1.5,<2"]
3-
build-backend = "maturin"
4-
51
[project]
62
name = "codetracer-python-recorder"
73
version = "0.1.0"
@@ -20,3 +16,7 @@ classifiers = [
2016
# Build the PyO3 extension module
2117
bindings = "pyo3"
2218
# Use the library name as the Python import name: codetracer_python_recorder
19+
20+
[build-system]
21+
requires = ["maturin>=1.5,<2"]
22+
build-backend = "maturin"

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,7 @@ typeCheckingMode = "basic"
2626
[dependency-groups]
2727
dev = [
2828
"pytest>=8.3.5",
29+
"codetracer-python-recorder",
30+
"codetracer-pure-python-recorder"
2931
]
3032

uv.lock

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)