Skip to content

Commit bd14ec5

Browse files
committed
Switch to uv
1 parent 324fd3d commit bd14ec5

9 files changed

Lines changed: 4297 additions & 5962 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
uses: actions/setup-python@v5
3030
with:
3131
python-version: ${{ matrix.python-version }}
32-
- name: Install poetry
33-
run: pip install -U pip poetry
34-
- name: Install dependencies no book
35-
run: poetry install --all-extras
36-
- name: run tests no book
32+
- name: Install uv
33+
run: pip install -U pip uv
34+
- name: Install dependencies
35+
run: make install-dev
36+
- name: run tests
3737
run: make tests
3838
- name: Install dependencies
3939
run: make install-dev

‎Makefile‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ help:
88

99
.PHONY: lint
1010
lint: ## Lint and fix
11-
@poetry run ./dev/lint fix
11+
@uv run ./dev/lint fix
1212

1313

1414
.PHONY: lint-check
1515
lint-check: ## Lint check only
16-
@poetry run ./dev/lint
16+
@uv run ./dev/lint
1717

1818

1919
.PHONY: install-dev
@@ -27,15 +27,15 @@ marimo: ## Run marimo for editing notebooks
2727
.PHONY: docs
2828
docs: ## build documentation
2929
@cp docs/index.md readme.md
30-
@poetry run mkdocs build
30+
@uv run mkdocs build
3131

3232
.PHONY: docs-serve
3333
docs-serve: ## serve documentation
34-
@poetry run mkdocs serve --livereload --watch quantflow --watch docs
34+
@uv run mkdocs serve --livereload --watch quantflow --watch docs
3535

3636
.PHONY: publish
3737
publish: ## Release to pypi
38-
@poetry publish --build -u __token__ -p $(PYPI_TOKEN)
38+
@uv publish --token $(PYPI_TOKEN)
3939

4040
.PHONY: tests
4141
tests: ## Unit tests
@@ -44,4 +44,4 @@ tests: ## Unit tests
4444

4545
.PHONY: outdated
4646
outdated: ## Show outdated packages
47-
poetry show -o -a
47+
uv tree --outdated

‎dev/install‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/usr/bin/env bash
22

3-
pip install -U pip poetry
4-
poetry install --all-extras --with book --with docs
3+
uv sync --all-extras

‎dev/lint‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ fi
1515

1616
taplo ${TAPLO_ARG}
1717
echo isort
18-
isort quantflow quantflow_tests ${ISORT_ARGS}
18+
uv run isort quantflow quantflow_tests ${ISORT_ARGS}
1919
echo black
20-
black quantflow quantflow_tests ${BLACK_ARG}
20+
uv run black quantflow quantflow_tests ${BLACK_ARG}
2121
echo ruff
22-
ruff check quantflow quantflow_tests ${RUFF_ARG}
22+
uv run ruff check quantflow quantflow_tests ${RUFF_ARG}
2323
echo mypy
24-
mypy quantflow
24+
uv run mypy quantflow
2525
echo mypy tests
26-
mypy quantflow_tests --explicit-package-bases
26+
uv run mypy quantflow_tests --explicit-package-bases

‎dev/test‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env sh
22

3-
poetry run \
3+
uv run \
44
pytest -x -vv \
55
--log-cli-level error \
66
--cov --cov-report xml --cov-report html "$@"
7-

‎poetry.lock‎

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

‎pyproject.toml‎

Lines changed: 47 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies = [
1212
"ccy>=1.7.1",
1313
"python-dotenv>=1.0.1",
1414
"polars[pandas,pyarrow]>=1.11.0",
15-
"statsmodels (>=0.14.6,<0.15.0)",
15+
"statsmodels>=0.14.6,<0.15.0",
1616
]
1717

1818
[project.urls]
@@ -21,70 +21,67 @@ Repository = "https://github.com/quantmind/quantflow"
2121
Documentation = "https://quantmind.github.io/quantflow/"
2222

2323
[project.optional-dependencies]
24-
data = [ "aio-fluid[http]>=1.2.1" ]
24+
book = [
25+
"altair>=6.0.0",
26+
"autodocsumm>=0.2.14",
27+
"duckdb>=1.4.4",
28+
"fastapi>=0.129.0",
29+
"google-genai>=1.61.0",
30+
"marimo>=0.19.7",
31+
"mcp>=1.26.0",
32+
"openai>=2.16.0",
33+
"plotly>=6.2.0",
34+
"pydantic-ai-slim>=1.51.0",
35+
"sympy>=1.12",
36+
]
2537
cli = [
2638
"asciichartpy>=1.5.25",
2739
"async-cache>=1.1.1",
28-
"prompt-toolkit>=3.0.43",
29-
"rich>=13.9.4",
3040
"click>=8.1.7",
3141
"holidays>=0.63",
42+
"prompt-toolkit>=3.0.43",
43+
"rich>=13.9.4",
44+
]
45+
data = [ "aio-fluid[http]>=1.2.1" ]
46+
dev = [
47+
"black>=26.3.1",
48+
"ghp-import>=2.0.2",
49+
"isort>=8.0.0",
50+
"mypy>=1.14.1",
51+
"pytest-asyncio>=1.0.0",
52+
"pytest-cov>=7.0.0",
53+
"ruff>=0.15.4",
54+
"types-python-dateutil>=2.9.0.20251115",
55+
]
56+
docs = [
57+
"griffe-pydantic>=1.1.0",
58+
"griffe-typingdoc>=0.2.7",
59+
"mkdocs-macros-plugin>=1.3.7",
60+
"mkdocs-material>=9.7.0",
61+
"mkdocs-redirects>=1.2.1",
62+
"mkdocstrings[python]==1.0.0",
63+
]
64+
ml = [
65+
"torch>=2.10.0",
3266
]
3367

3468
[project.scripts]
3569
qf = "quantflow.cli.script:main"
3670

37-
[tool.poetry.group.dev.dependencies]
38-
black = "^26.1.0"
39-
ghp-import = "^2.0.2"
40-
isort = "^8.0.0"
41-
mypy = "^1.14.1"
42-
pytest-asyncio = "^1.0.0"
43-
pytest-cov = "^7.0.0"
44-
ruff = "^0.15.4"
45-
types-python-dateutil = "^2.9.0.20251115"
46-
47-
[tool.poetry.group.docs]
48-
optional = true
49-
50-
[tool.poetry.group.docs.dependencies]
51-
mkdocs-material = "^9.7.0"
52-
mkdocs-macros-plugin = "^1.3.7"
53-
mkdocs-redirects = "^1.2.1"
54-
mkdocstrings = { version = "1.0.0", extras = [ "python" ] }
55-
griffe-pydantic = "^1.1.0"
56-
griffe-typingdoc = "^0.2.7"
57-
58-
[tool.poetry.group.book]
59-
optional = true
60-
61-
[tool.poetry.group.ml]
62-
optional = true
71+
[build-system]
72+
requires = [ "hatchling" ]
73+
build-backend = "hatchling.build"
6374

64-
[tool.poetry.group.book.dependencies]
65-
altair = "^6.0.0"
66-
autodocsumm = "^0.2.14"
67-
duckdb = "^1.4.4"
68-
fastapi = "^0.129.0"
69-
google-genai = "^1.61.0"
70-
marimo = "^0.19.7"
71-
mcp = "^1.26.0"
72-
openai = "^2.16.0"
73-
plotly = "^6.2.0"
74-
pydantic-ai-slim = "^1.51.0"
75-
sympy = "^1.12"
75+
[tool.uv.workspace]
76+
members = [ "packages/*" ]
7677

77-
[tool.poetry.group.ml.dependencies]
78-
torch = { version = "^2.10.0", source = "pytorch" }
78+
[tool.uv.sources]
79+
torch = { index = "pytorch" }
7980

80-
[[tool.poetry.source]]
81+
[[tool.uv.index]]
8182
name = "pytorch"
8283
url = "https://download.pytorch.org/whl/cu126"
83-
priority = "explicit"
84-
85-
[build-system]
86-
requires = [ "poetry-core>=1.0.0" ]
87-
build-backend = "poetry.core.masonry.api"
84+
explicit = true
8885

8986
[tool.jupytext.formats]
9087
"notebooks/" = "ipynb,py:percent"

‎taplo.toml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ trailing_newline = true
1212
formatting = { reorder_arrays = true, reorder_keys = true }
1313
include = [ "pyproject.toml" ]
1414
keys = [
15-
"tool.poetry.group.dev.dependencies",
16-
"tool.poetry.group.book.dependencies",
15+
"project.optional-dependencies",
16+
"project.optional-dependencies.book",
17+
"project.optional-dependencies.data",
18+
"project.optional-dependencies.dev",
19+
"project.optional-dependencies.docs",
20+
"project.optional-dependencies.ml",
1721
]

0 commit comments

Comments
 (0)