Skip to content

Commit 2e4b058

Browse files
authored
Bump deps and use uv (#54)
* Bump deps and use uv * Bump deps and use uv * new docs * force * force
1 parent a05e837 commit 2e4b058

18 files changed

Lines changed: 1425 additions & 4375 deletions

.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: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ jobs:
1717
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
1818
strategy:
1919
matrix:
20-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
20+
python-version: ["3.11", "3.12", "3.13", "3.14"]
2121

2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Set up Python ${{ matrix.python-version }}
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
32+
- name: Install taplo
33+
uses: uncenter/setup-taplo@v1
3234
- name: run lint
3335
run: make lint
3436
- name: run tests
@@ -48,16 +50,15 @@ jobs:
4850
- build
4951
steps:
5052
- uses: actions/checkout@v4
51-
- name: Set up Python 3.12
52-
uses: actions/setup-python@v5
53-
with:
54-
python-version: "3.14"
55-
- name: Install all dev dependencies
56-
run: make install-dev
57-
- name: build book
58-
run: make book
59-
- name: publish book
60-
run: make publish-book
53+
- name: Install uv
54+
uses: astral-sh/setup-uv@v5
55+
- name: Install dependencies
56+
run: uv sync --all-extras --group book
57+
- name: build docs
58+
run: make docs
59+
- name: publish docs
60+
if: github.ref == 'refs/heads/main'
61+
run: make publish-docs
6162
- name: publish
6263
if: ${{ github.ref == 'refs/heads/main' && github.event.head_commit.message == 'release' }}
6364
run: make publish

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ build
1616
docs/build
1717
htmlcov
1818
dist
19+
site
1920
venv
2021
MANIFEST
2122
.python-version

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: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,38 @@ clean: ## Remove python cache files
1212
rm -rf .pytest_cache
1313
rm -rf .coverage
1414

15-
.PHONY: docs
16-
docs: ## Build docs
17-
cd docs && make docs
18-
1915
.PHONY: install-dev
2016
install-dev: ## Install packages for development
2117
@./dev/install
2218

2319
.PHONY: lint
2420
lint: ## Run linters
25-
@poetry run ./dev/lint fix
21+
@uv run ./dev/lint fix
2622

2723
.PHONY: lint-check
2824
lint-check: ## Run linters in check mode
29-
@poetry run ./dev/lint
25+
@uv run ./dev/lint
3026

3127
.PHONY: test
3228
test: ## Test with python 3.8 with coverage
33-
@poetry run pytest -x -v --cov --cov-report xml
29+
@uv run pytest -x -v --cov --cov-report xml
3430

3531
.PHONY: publish
3632
publish: ## Release to pypi
37-
@poetry publish --build -u __token__ -p $(PYPI_TOKEN)
33+
@uv build && uv publish --token $(PYPI_TOKEN)
3834

39-
.PHONY: notebook
40-
notebook: ## Run Jupyter notebook server
41-
@poetry run ./dev/start-jupyter 9095
35+
.PHONY: docs
36+
docs: ## Build mkdocs site
37+
uv run mkdocs build
4238

43-
.PHONY: book
44-
book: ## Build static jupyter {book}
45-
poetry run jupyter-book build docs --all
39+
.PHONY: docs-serve
40+
docs-serve: ## Serve docs locally with live reload
41+
uv run mkdocs serve
4642

47-
.PHONY: publish-book
48-
publish-book: ## Publish the book to github pages
49-
poetry run ghp-import -n -p -f docs/_build/html
43+
.PHONY: publish-docs
44+
publish-docs: ## Publish docs to github pages
45+
uv run mkdocs gh-deploy --force
5046

5147
.PHONY: outdated
5248
outdated: ## Show outdated packages
53-
poetry show -o -a
49+
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"

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ccy.quantmind.com

docs/_config.yml

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

0 commit comments

Comments
 (0)