Skip to content

Commit c76f6e3

Browse files
committed
Add uv to rt_segment_speeds and rt_delay to fix dependabot updates
1 parent 7fd284b commit c76f6e3

14 files changed

Lines changed: 50 additions & 66 deletions

File tree

Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,9 @@ add_precommit:
9494
#alias go='cd ~/data-analyses && uv sync'
9595

9696
install_env:
97-
#cd bus_service_increase/ && make setup_bus_service_utils && cd ..
98-
#cd rt_delay/ && make setup_rt_analysis && cd ..
97+
# "_shared_utils", "rt_segment_speeds", and "rt_delay" are already installed when `uv sync` runs.
9998
uv sync
10099
make add_precommit
101100

102101
install_portfolio:
103102
uv sync --group portfolio
104-
105-
# Create .egg to upload to dask cloud cluster
106-
egg_modules:
107-
cd ~/data-analyses/rt_segment_speeds && python setup.py bdist_egg && cd ..

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Follow these steps to start contributing:
2323

2424
1. [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) this `data-analyses` repo.
2525

26-
2. From the repo root (`data-analyses/`), run `make install_env` (runs `uv sync` + pre-commit setup)
26+
2. From the `data-analyses/` path (repo root path), run `make install_env` (runs `uv sync` + pre-commit setup)
2727

2828
3. In JupyterHub, select the **"Pyproject Local"** kernel when opening a notebook
2929

@@ -32,7 +32,13 @@ Follow these steps to start contributing:
3232
3333
### uv
3434

35-
This repository uses uv for package management. To learn more go to [uv documentation](https://docs.astral.sh/uv/concepts/projects/dependencies/).
35+
This repository uses [uv](https://docs.astral.sh/uv/concepts/projects/dependencies/) for package management.
36+
37+
Every time you rebase your branch, add, upgrade, or remove packages, you need to run `uv sync` to install/update any change.
38+
39+
* Dependencies from "\_shared_utils", "rt_segment_speeds", and "rt_delay" will be installed/updated too.
40+
41+
You can see all the current dependencies in [pyproject.toml](https://github.com/cal-itp/data-analyses/blob/main/pyproject.toml).
3642

3743
Basic commands:
3844

calitp-data-analysis/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "calitp-data-analysis"
33
version = "2026.4.0"
44
description = "Shared code for querying Cal-ITP data in notebooks, primarily."
5-
authors = [{ name = "Cal-ITP" }, { name = "Erika Pacheco" }, { name = "Rae Bonfanti" }]
5+
authors = [{ name = "Cal-ITP" }]
66
requires-python = ">=3.11.0, <3.12.0"
77
dependencies = [
88
"altair>=5.1.1",

pyproject.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[project]
22
name = "cal-itp-data-analyses"
3+
authors = [{ name = "Cal-ITP" }]
34
version = "0.1.0"
45
requires-python = ">=3.11.0, <3.12.0"
5-
dependencies = [
6-
"nbdime>=4.0.4",
7-
]
6+
dependencies = []
87

98
[tool.uv.workspace]
109
members = [
1110
"calitp-data-analysis",
1211
"_shared_utils",
1312
"portfolio",
13+
# "rt_segment_speeds",
14+
# "rt_delay",
1415
]
1516

1617
[tool.uv]
@@ -19,12 +20,13 @@ package = false
1920
[dependency-groups]
2021
dev = [
2122
"shared-utils",
22-
"segment-speed-utils",
23-
"rt-analysis",
23+
# "segment-speed-utils",
24+
# "rt-analysis",
2425
"ipykernel>=6.29.0",
2526
"black==24.10.0",
2627
"isort==5.10.1",
2728
"pre-commit>=2.18.1",
29+
"nbdime>=4.0.4",
2830
]
2931
portfolio = [
3032
"axe-selenium-python",
@@ -47,5 +49,5 @@ test = [
4749
[tool.uv.sources]
4850
shared-utils = { workspace = true }
4951
calitp-data-analysis = { workspace = true }
50-
segment-speed-utils = { path = "./rt_segment_speeds", editable = true }
51-
rt-analysis = { path = "./rt_delay", editable = true }
52+
# segment-speed-utils = { workspace = true }
53+
# rt-analysis = { workspace = true }

rt_delay/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
setup_rt_analysis:
2-
pip install -r requirements.txt
2+
cd .. && uv sync

rt_delay/pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[project]
2+
name = "rt-analysis"
3+
version = "0.4.2"
4+
description="Module for GTFS-RT transit speed analysis"
5+
authors = [{ name = "Cal-ITP" }]
6+
readme = "README.md"
7+
requires-python = ">=3.11.0, <3.12.0"
8+
dependencies = []

rt_delay/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

rt_delay/setup.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

rt_segment_speeds/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
setup_env:
2+
cd .. && uv sync

rt_segment_speeds/pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[project]
2+
name = "segment-speed-utils"
3+
version = "1.8"
4+
description = "Utility functions for GTFS RT segment speeds"
5+
authors = [{ name = "Cal-ITP" }]
6+
readme = "README.md"
7+
requires-python = ">=3.11.0, <3.12.0"
8+
dependencies = []

0 commit comments

Comments
 (0)