Skip to content

Commit 01dad11

Browse files
author
coderkrp
committed
build(env): pin Python version to 3.12 and update CI workflow
- Pin requires-python to "==3.12.*" in pyproject.toml - Update .github/workflows/ci.yml to pin Python to 3.12 and cache on uv.lock - Replace manual uv pip installs with 'uv sync --extra dev' in CI environment - Enable pytest execution step in CI since test suite is now present - Regenerate uv.lock with pinned Python version
1 parent b64481a commit 01dad11

3 files changed

Lines changed: 58 additions & 423 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,22 @@ jobs:
1717
uses: astral-sh/setup-uv@v2
1818
with:
1919
enable-cache: true
20-
cache-dependency-glob: "requirements.txt"
20+
cache-dependency-glob: "uv.lock"
2121

2222
- name: Set up Python
2323
uses: actions/setup-python@v5
2424
with:
25-
python-version-file: ".python-version"
26-
# Fallback if file doesn't exist
2725
python-version: "3.12"
2826

2927
- name: Install dependencies
3028
run: |
31-
uv venv
32-
uv pip install -r requirements.txt
33-
uv pip install ruff pytest pytest-asyncio pytest-cov
29+
uv sync --extra dev
3430
3531
- name: Lint with Ruff
3632
run: |
3733
uv run ruff check .
3834
uv run ruff format --check .
3935
4036
- name: Run Tests
41-
# We skip testing for the raw boilerplate right now.
42-
# Replace with `uv run pytest tests/ --cov=src` when tests are present.
4337
run: |
44-
echo "Pytest integration ready. Add tests/ to run."
38+
uv run pytest

pyproject.toml

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
[project]
2-
name = "ratio-scanner"
3-
version = "1.0.0"
4-
description = "Relative Strength Leadership Scanner for Indian Equities"
5-
authors = [
6-
{name = "coderkrp", email = "krp.sign.up@gmail.com"},
7-
]
8-
dependencies = [
9-
"pandas>=2.2.0",
10-
"numpy>=1.26.0",
11-
"SQLAlchemy>=2.0.0",
12-
"PyYAML>=6.0.1",
13-
"yfinance>=0.2.37",
14-
"pandas-ta>=0.3.14b0",
15-
"httpx>=0.27.0",
16-
"pydantic>=2.0",
17-
]
18-
requires-python = ">=3.12"
19-
20-
[project.optional-dependencies]
21-
dev = [
22-
"pytest>=8.0.0",
23-
"pytest-asyncio>=0.23.0",
24-
"pytest-cov>=4.1.0",
25-
"ruff>=0.4.4",
26-
"pre-commit>=3.7.0",
27-
]
28-
29-
[tool.ruff]
30-
line-length = 100
31-
target-version = "py312"
32-
33-
[tool.ruff.lint]
34-
select = [
35-
"E", # pycodestyle errors
36-
"W", # pycodestyle warnings
37-
"F", # pyflakes
38-
"I", # isort
39-
"C", # flake8-comprehensions
40-
"B", # flake8-bugbear
41-
]
42-
ignore = [
43-
"E501", # line too long, handled by formatter
44-
]
45-
46-
[tool.pytest.ini_options]
47-
minversion = "8.0"
48-
addopts = "-ra -q --cov=src"
49-
testpaths = [
50-
"tests",
51-
]
52-
asyncio_mode = "auto"
1+
[project]
2+
name = "ratio-scanner"
3+
version = "1.0.0"
4+
description = "Relative Strength Leadership Scanner for Indian Equities"
5+
authors = [
6+
{name = "coderkrp", email = "krp.sign.up@gmail.com"},
7+
]
8+
dependencies = [
9+
"pandas>=2.2.0",
10+
"numpy>=1.26.0",
11+
"SQLAlchemy>=2.0.0",
12+
"PyYAML>=6.0.1",
13+
"yfinance>=0.2.37",
14+
"pandas-ta>=0.3.14b0",
15+
"httpx>=0.27.0",
16+
"pydantic>=2.0",
17+
]
18+
requires-python = "==3.12.*"
19+
20+
[project.optional-dependencies]
21+
dev = [
22+
"pytest>=8.0.0",
23+
"pytest-asyncio>=0.23.0",
24+
"pytest-cov>=4.1.0",
25+
"ruff>=0.4.4",
26+
"pre-commit>=3.7.0",
27+
]
28+
29+
[tool.ruff]
30+
line-length = 100
31+
target-version = "py312"
32+
33+
[tool.ruff.lint]
34+
select = [
35+
"E", # pycodestyle errors
36+
"W", # pycodestyle warnings
37+
"F", # pyflakes
38+
"I", # isort
39+
"C", # flake8-comprehensions
40+
"B", # flake8-bugbear
41+
]
42+
ignore = [
43+
"E501", # line too long, handled by formatter
44+
]
45+
46+
[tool.pytest.ini_options]
47+
minversion = "8.0"
48+
addopts = "-ra -q --cov=src"
49+
testpaths = [
50+
"tests",
51+
]
52+
asyncio_mode = "auto"

0 commit comments

Comments
 (0)