Skip to content

Commit bb89cbd

Browse files
committed
Bump deps and use uv
1 parent a05e837 commit bb89cbd

11 files changed

Lines changed: 2500 additions & 4247 deletions

File tree

.github/copilot-instructions.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: ccy-instructions
3+
description: 'Instructions for ccy'
4+
applyTo: '/**'
5+
---
6+
7+
8+
# Ccy Instructions
9+
10+
11+
## Development
12+
13+
* Always run `make lint` after code changes — runs taplo, isort, black, ruff, and mypy
14+
* Never edit `readme.md` directly — it is generated from `docs/index.md` via `make docs`
15+
* To run all tests use `make test` — runs all tests in the `tests/` directory using pytest
16+
* To run a specific test file, use `uv run pytest tests/path/to/test_file.py`
17+
18+
19+
## Documentation
20+
21+
* The documentation for ccy is available at `https://ccy.quantmid.com`
22+
* Documentation is built using [mkdocs](https://www.mkdocs.org/) and stored in the `docs/` directory. The documentation source files are written in markdown format.
23+
* Do not use em dashes (—) in documentation files or docstrings. Use colons, parentheses, or restructure the sentence instead.

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
28-
- name: Install poetry
29-
run: pip install -U pip poetry
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v5
3030
- name: Install dependencies
31-
run: poetry install --all-extras
31+
run: uv sync --all-extras
3232
- name: run lint
3333
run: make lint
3434
- name: run tests

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@readme.md
2+
@.github/copilot-instructions.md

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2009-2023, Quantmind
1+
Copyright (c) 2009-2026, Quantmind
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,32 @@ install-dev: ## Install packages for development
2222

2323
.PHONY: lint
2424
lint: ## Run linters
25-
@poetry run ./dev/lint fix
25+
@uv run ./dev/lint fix
2626

2727
.PHONY: lint-check
2828
lint-check: ## Run linters in check mode
29-
@poetry run ./dev/lint
29+
@uv run ./dev/lint
3030

3131
.PHONY: test
3232
test: ## Test with python 3.8 with coverage
33-
@poetry run pytest -x -v --cov --cov-report xml
33+
@uv run pytest -x -v --cov --cov-report xml
3434

3535
.PHONY: publish
3636
publish: ## Release to pypi
37-
@poetry publish --build -u __token__ -p $(PYPI_TOKEN)
37+
@uv build && uv publish --token $(PYPI_TOKEN)
3838

3939
.PHONY: notebook
4040
notebook: ## Run Jupyter notebook server
41-
@poetry run ./dev/start-jupyter 9095
41+
@uv run ./dev/start-jupyter 9095
4242

4343
.PHONY: book
4444
book: ## Build static jupyter {book}
45-
poetry run jupyter-book build docs --all
45+
uv run jupyter-book build docs --all
4646

4747
.PHONY: publish-book
4848
publish-book: ## Publish the book to github pages
49-
poetry run ghp-import -n -p -f docs/_build/html
49+
uv run ghp-import -n -p -f docs/_build/html
5050

5151
.PHONY: outdated
5252
outdated: ## Show outdated packages
53-
poetry show -o -a
53+
uv tree --outdated

dev/install

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

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

dev/lint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ set -e
33

44
BLACK_ARG="--check"
55
RUFF_ARG=""
6+
TAPLO_ARG="format --check"
67

78
if [ "$1" = "fix" ] ; then
89
BLACK_ARG=""
910
RUFF_ARG="--fix"
11+
TAPLO_ARG="format"
1012
fi
1113

14+
taplo ${TAPLO_ARG}
1215
echo "run black"
1316
black ccy tests --exclude "fluid_common/protos/v2|fluid_apps/db/migrations" ${BLACK_ARG}
1417
echo "run ruff"

poetry.lock

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

pyproject.toml

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,48 @@
1-
[tool.poetry]
1+
[project]
22
name = "ccy"
3-
version = "1.7.2"
3+
version = "1.8.0"
44
description = "Python currencies"
5-
authors = ["Luca Sbardella <luca@quantmind.com>"]
6-
license = "BSD"
5+
authors = [ { name = "Luca Sbardella", email = "luca@quantmind.com" } ]
6+
license = { text = "BSD" }
77
readme = "readme.md"
8-
packages = [
9-
{ include = "ccy" }
8+
requires-python = ">=3.11"
9+
dependencies = [
10+
"python-dateutil>=2.9.0",
11+
"pycountry>=24.6.1",
1012
]
1113

12-
[tool.poetry.dependencies]
13-
python = ">=3.10"
14-
python-dateutil = "^2.9.0"
15-
pycountry = "^24.6.1"
16-
rich = {version = "^13.7.1", optional = true}
17-
click = {version = "^8.1.7", optional = true}
18-
pandas = {version = "^2.0.3", optional = true}
19-
holidays = {version = "^0.63", optional = true}
20-
21-
22-
[tool.poetry.group.dev.dependencies]
23-
black = "^25.12.0"
24-
isort = "^7.0.0"
25-
pytest-cov = "^7.0.0"
26-
mypy = "^1.14.1"
27-
ruff = "^0.14.10"
28-
types-python-dateutil = "^2.9.0.20241003"
29-
30-
[tool.poetry.extras]
31-
cli = ["rich", "click", "pandas"]
32-
holidays = ["holidays"]
33-
34-
[tool.poetry.group.book]
35-
optional = true
36-
37-
[tool.poetry.group.book.dependencies]
38-
jupyter-book = "^1.0.3"
39-
jupyterlab = "^4.3.4"
40-
jupytext = "^1.16.6"
41-
ghp-import = "^2.1.0"
42-
14+
[project.optional-dependencies]
15+
cli = [
16+
"click>=8.1.7",
17+
"pandas>=3.0.1",
18+
"rich>=13.7.1",
19+
]
20+
holidays = [
21+
"holidays>=0.93",
22+
]
4323

44-
[tool.poetry.scripts]
24+
[project.scripts]
4525
ccys = "ccy.cli:ccys"
4626

27+
[dependency-groups]
28+
dev = [
29+
"black>=25.12.0",
30+
"isort>=7.0.0",
31+
"pytest-cov>=7.0.0",
32+
"mypy>=1.14.1",
33+
"ruff>=0.14.10",
34+
"types-python-dateutil>=2.9.0.20241003",
35+
]
36+
book = [
37+
"jupyter-book>=1.0.3",
38+
"jupyterlab>=4.3.4",
39+
"jupytext>=1.16.6",
40+
"ghp-import>=2.1.0",
41+
]
4742

4843
[build-system]
49-
requires = ["poetry-core"]
50-
build-backend = "poetry.core.masonry.api"
44+
requires = [ "hatchling" ]
45+
build-backend = "hatchling.build"
5146

5247
[tool.jupytext]
5348
formats = "ipynb,myst"
@@ -56,7 +51,7 @@ formats = "ipynb,myst"
5651
profile = "black"
5752

5853
[tool.ruff]
59-
lint.select = ["E", "F"]
54+
lint.select = [ "E", "F" ]
6055
line-length = 88
6156

6257
[tool.mypy]

taplo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
include = [ "pyproject.toml", "taplo.toml" ]
2+
3+
[formatting]
4+
allowed_blank_lines = 1
5+
array_auto_collapse = false
6+
array_auto_expand = true
7+
compact_arrays = false
8+
indent_string = " "
9+
trailing_newline = true
10+
11+
[[rule]]
12+
formatting = { reorder_arrays = true, reorder_keys = true, array_auto_expand = true, column_width = 1 }
13+
include = [ "pyproject.toml" ]
14+
keys = [
15+
"project.optional-dependencies",
16+
"project.optional-dependencies.cli",
17+
"project.optional-dependencies.holidays",
18+
]

0 commit comments

Comments
 (0)