Skip to content

Commit 3cf4b18

Browse files
authored
Merge pull request #4 from softinio/softinio-push-zxwmtquonnwo
More poetry related updates and dependencies updated
2 parents 933f573 + 023b461 commit 3cf4b18

7 files changed

Lines changed: 68 additions & 65 deletions

File tree

.pre-commit-config.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
repos:
2-
- repo: https://github.com/facebook/pyrefly
3-
rev: main
4-
hooks:
5-
- id: pyrefly-typecheck
6-
- repo: https://github.com/psf/black
7-
rev: 25.1.0
2+
- repo: local
83
hooks:
4+
- id: pyrefly
5+
name: pyrefly
6+
entry: poetry run pyrefly check
7+
language: system
8+
types_or: [python, pyi]
9+
pass_filenames: false
910
- id: black
11+
name: black
12+
entry: poetry run black
13+
language: system
1014
types_or: [python, pyi]
11-
- repo: https://github.com/PyCQA/isort
12-
rev: 5.13.2
13-
hooks:
1415
- id: isort
16+
name: isort
17+
entry: poetry run isort
18+
language: system
1519
types_or: [python, pyi]
16-
- repo: https://github.com/PyCQA/flake8
17-
rev: 7.2.0
18-
hooks:
1920
- id: flake8
21+
name: flake8
22+
entry: poetry run flake8
23+
language: system
2024
types_or: [python, pyi]
21-
additional_dependencies:
22-
- flake8-bugbear
23-
- flake8-unused-arguments
24-
- flake8-print
25-
- flake8-type-checking
26-
- flake8-pyproject

CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ This is an AI-centric Python application with a clean, modular structure:
7070
- Pydantic for data validation and settings management
7171
- Structured logging with structlog
7272
- Async-first design with httpx for HTTP operations
73-
- Type safety enforced through Basedpyright and Pyrefly
73+
- Type safety enforced through Pyrefly
7474

7575
4. **AI/ML Integration Points**:
7676
- Anthropic Claude API integration
@@ -85,11 +85,11 @@ This project uses Nix for reproducible development environments. Enter the dev s
8585
nix develop
8686
```
8787

88-
The environment includes:
88+
The Nix environment provides:
8989
- Python 3.13
90-
- All development tools (black, isort, flake8, pytest, pyrefly, etc.)
91-
- Pre-configured pre-commit hooks
92-
- Environment file support (`.env`, `.test.env`, `.deploy.env`)
90+
- Poetry
91+
92+
Run `poetry install` after entering the shell to install all development tools (black, isort, flake8, pytest, pyrefly, pre-commit, etc.).
9393

9494
## Code Quality Standards
9595

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ This template provides a complete development environment for AI/ML applications
4242

4343
3. The Nix environment will automatically provide:
4444
- Python 3.13
45-
- All development tools (poetry, black, isort, flake8, pyrefly, etc.)
46-
- Pre-commit hooks
45+
- Poetry
46+
47+
4. Install all development tools (black, isort, flake8, pyrefly, pre-commit, etc.) via Poetry:
48+
```bash
49+
poetry install
50+
```
4751

4852
#### Option 2: Without Nix (You already have Python)
4953

@@ -90,7 +94,7 @@ poetry run pyrefly check # Type checking
9094

9195
#### Pre-commit Hooks
9296
```bash
93-
pre-commit run --all-files
97+
poetry run pre-commit run --all-files
9498
```
9599

96100
## Configuration
@@ -134,9 +138,9 @@ poetry add --group dev <package-name>
134138

135139
## Type Checking
136140

137-
This template uses Pyrefly (and Basedpyright) for type checking. Run type checks with:
141+
This template uses Pyrefly for type checking. Run type checks with:
138142
```bash
139-
pyrefly check
143+
poetry run pyrefly check
140144
```
141145

142146
## Tips for Development

devshell.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
# https://numtide.github.io/devshell
22
# https://numtide.github.io/devshell/getting_started.html
3-
[[commands]]
4-
package = "python313"
5-
63
[devshell]
7-
packages = [
8-
"poetry"
9-
]
4+
packages = []
105

116
[[commands]]
127
name = "runLint"

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@
2323
overlays = [ devshell.overlays.default ];
2424
};
2525
in
26+
let
27+
poetryWithPlugins = pkgs.poetry.withPlugins (ps: [ ps.poetry-plugin-up ]);
28+
in
2629
pkgs.devshell.mkShell {
2730
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
31+
packages = [ pkgs.python313 poetryWithPlugins ];
2832
};
2933
});
3034
}

poetry.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ authors = [
88
]
99
requires-python = ">=3.13"
1010
dependencies = [
11-
"anthropic>=0.55.0",
11+
"anthropic (>=0.86.0)",
1212
"httpx>=0.28.1",
13-
"huggingface-hub>=0.33.1",
14-
"mcp[cli]>=1.10.1",
15-
"openai>=1.93.0",
16-
"pydantic>=2.11.7",
17-
"pydantic-settings>=2.10.1",
18-
"rich>=14.0.0",
19-
"structlog>=25.4.0",
20-
"tenacity>=9.1.2",
13+
"huggingface-hub (>=1.7.2)",
14+
"mcp[cli] (>=1.26.0)",
15+
"openai (>=2.29.0)",
16+
"pydantic (>=2.12.5)",
17+
"pydantic-settings (>=2.13.1)",
18+
"rich (>=14.3.3)",
19+
"structlog (>=25.5.0)",
20+
"tenacity (>=9.1.4)",
2121
]
2222

2323
[project.scripts]
@@ -31,24 +31,24 @@ requires = ["poetry-core"]
3131
build-backend = "poetry.core.masonry.api"
3232

3333
[tool.poetry.group.dev.dependencies]
34-
coverage = ">=7.9.1"
35-
debugpy = ">=1.8.14"
36-
pre-commit = ">=4.2.0"
37-
pyrefly = ">=0.21.0"
38-
pytest = ">=8.4.1"
39-
pytest-asyncio = ">=1.0.0"
40-
pytest-cov = ">=6.2.1"
34+
coverage = ">=7.13.5"
35+
debugpy = ">=1.8.20"
36+
pre-commit = ">=4.5.1"
37+
pyrefly = ">=0.57.1"
38+
pytest = ">=9.0.2"
39+
pytest-asyncio = ">=1.3.0"
40+
pytest-cov = ">=7.1.0"
4141
pytest-dotenv = ">=0.5.2"
42-
pytest-mock = ">=3.14.1"
43-
pytest-sugar = ">=1.0.0"
44-
black = ">=24.0.0"
45-
isort = ">=5.13.0"
46-
flake8 = ">=7.0.0"
47-
flake8-bugbear = ">=24.0.0"
48-
flake8-unused-arguments = ">=0.0.13"
42+
pytest-mock = ">=3.15.1"
43+
pytest-sugar = ">=1.1.1"
44+
black = ">=26.3.1"
45+
isort = ">=8.0.1"
46+
flake8 = ">=7.3.0"
47+
flake8-bugbear = ">=25.11.29"
48+
flake8-unused-arguments = ">=0.0.14"
4949
flake8-print = ">=5.0.0"
50-
flake8-type-checking = ">=2.9.0"
51-
flake8-pyproject = ">=1.2.0"
50+
flake8-type-checking = ">=3.2.0"
51+
flake8-pyproject = ">=1.2.4"
5252

5353
[tool.pyrefly]
5454
project_includes = ["**/*"]
@@ -89,7 +89,9 @@ per-file-ignores = [
8989
"bin/*.py:T201,T203",
9090
"scripts/*.py:T201,T203",
9191
"tests/*.py:T201,T203",
92+
"tests/**/*.py:T201,T203",
9293
"examples/*.py:T201,T203",
94+
"examples/**/*.py:T201,T203",
9395
]
9496

9597
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)