Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"njpwerner.autodocstring",
"redhat.vscode-yaml",
"shardulm94.trailing-spaces",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"yzhang.markdown-all-in-one"
]
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Relates to #

### Code Quality & Tests
- [ ] All functions/methods have type hints
- [ ] Code has docstrings for public APIs
- [ ] Code has docstring for public APIs
- [ ] New test files follow `test__*.py` naming convention
- [ ] Tests are meaningful and cover edge cases

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Creating coverage folder
run: mkdir -p coverage

- name: Coverage Bagdge
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2
with:
output: coverage/coverage.svg
Expand Down
114 changes: 114 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"language": "en",
"ignorePaths": [
".venv",
"uv.lock"
],
"words": [
"addopts",
"anyio",
"apdisk",
"autoflake",
"buildkit",
"buildx",
"caplog",
"celerybeat",
"charliermarsh",
"classmethod",
"commitable",
"configfile",
"connor",
"contextlib",
"cookiecutter",
"cooldown",
"coveragerc",
"cython",
"dhoeric",
"direnv",
"dmypy",
"dockerfiles",
"donotpresent",
"exiasr",
"fastapi",
"fontawesome",
"fseventsd",
"googlecloud",
"htmlcov",
"imread",
"ipykernel",
"ipynb",
"ipython",
"isort",
"junitxml",
"kevinrose",
"kwargs",
"levelname",
"levelno",
"libgl",
"libglib",
"linenums",
"mishakav",
"mkdocs",
"monkeypatch",
"mosapride",
"mypy",
"njpwerner",
"norecursedirs",
"nosetests",
"noxfile",
"nullcontext",
"opencontainers",
"opencv",
"pipefail",
"pipenv",
"pipfile",
"pluggy",
"posargs",
"pybuilder",
"pycache",
"pycodestyle",
"pydantic",
"pydocstyle",
"pyenv",
"pyflakes",
"pyflow",
"pymdownx",
"pypa",
"pypackages",
"pyproject",
"pyrightconfig",
"pytest",
"pythondontwritebytecode",
"pythonpath",
"pythonunbuffered",
"pytype",
"pyupgrade",
"qodo",
"redoc",
"rootdir",
"ropeproject",
"scrapy",
"sdist",
"sessionmaker",
"shardulm",
"spyder",
"spyderproject",
"spyproject",
"sqlalchemy",
"stmts",
"superfences",
"tamasfe",
"testpaths",
"timemachine",
"toolsai",
"typer",
"uline",
"usecases",
"usefixtures",
"usermod",
"venv",
"webassets",
"yzhang",
"zenkaku"
]
}
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"pkief.material-icon-theme",
"redhat.vscode-yaml",
"shardulm94.trailing-spaces",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"usernamehw.errorlens",
"yzhang.markdown-all-in-one"
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def process_data(items, max_count=10):
...
```

### Docstrings
### Docstring

All public functions, classes, and modules must have docstrings:
All public functions, classes, and modules must have docstring:

```python
def calculate_total(items: list[float], tax_rate: float) -> float:
Expand Down Expand Up @@ -458,7 +458,7 @@ uv sync

Before submitting your PR, verify:

- [ ] Code follows project standards (Ruff, Pyright, type hints, docstrings)
- [ ] Code follows project standards (Ruff, Pyright, type hints, docstring)
- [ ] All tests pass: `uv run nox -s test` (coverage ≥ 75%)
- [ ] Linting passes: `uv run nox -s lint -- --pyright --ruff`
- [ ] Code is formatted: `uv run nox -s fmt`
Expand Down
2 changes: 1 addition & 1 deletion docs/configurations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ If you modify configurations, document why:
# ruff.toml
[lint]
ignore = [
"D100", # Exclude module docstrings (team decision 2024-01-15)
"D100", # Exclude module docstring (team decision 2024-01-15)
]
```

Expand Down
2 changes: 1 addition & 1 deletion docs/configurations/uv.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# uv Configations
# uv Configurations

!!! TIP
Official documentation for uv is available at [https://docs.astral.sh/uv](https://docs.astral.sh/uv)
Expand Down
32 changes: 17 additions & 15 deletions docs/guides/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,37 @@ uv run pytest
```

```sh
============================================= test session starts =============================================
platform linux -- Python 3.12.6, pytest-8.3.4, pluggy-1.5.0
rootdir: /workspaces/python-uv
================================================ test session starts ================================================
platform linux -- Python 3.14.0, pytest-9.0.1, pluggy-1.6.0
rootdir: /workspace
configfile: pytest.ini
testpaths: tests
plugins: cov-6.0.0
collected 4 items
plugins: anyio-4.11.0, cov-7.0.0
collected 8 items

tests/tools/test__logger.py .... [100%]
tests/tools/test__config.py .. [ 25%]
tests/tools/test__logger.py .... [ 75%]
tests/tools/test__tracer.py .. [100%]

================================================ tests coverage ================================================
________________________________________ coverage: platform linux, python 3.14.0-final-0 _________________________________________

---------- coverage: platform linux, python 3.12.6-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
-------------------------------------------------------------------------
tests/tools/test__logger.py 24 0 0 0 100%
tools/__init__.py 2 0 0 0 100%
tools/logger/__init__.py 5 0 0 0 100%
tools/config/fastapi.py 2 0 0 0 100%
tools/config/settings.py 20 0 0 0 100%
tools/logger/color.py 12 0 0 0 100%
tools/logger/googlecloud.py 10 0 0 0 100%
tools/logger/googlecloud.py 6 0 0 0 100%
tools/logger/local.py 12 0 0 0 100%
tools/logger/logger.py 23 0 2 0 100%
tools/logger/style.py 7 0 0 0 100%
tools/logger/type.py 5 0 0 0 100%
tools/tracer/timer.py 16 0 0 0 100%
-------------------------------------------------------------------------
TOTAL 100 0 2 0 100%
TOTAL 103 0 2 0 100%
Coverage HTML written to dir htmlcov

Required test coverage of 75% reached. Total coverage: 100.00%

============================================== 4 passed in 2.00s ==============================================
================================================ 8 passed in 1.23s ================================================
```

## Run pytest on VS Code
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/tools/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Settings(BaseSettings):
Then in your `.env` file:

```bash
DATABASE_URL=postgresql://user:pass@localhost/dbname
DATABASE_URL=postgresql://user:pass@localhost/db_name
SECRET_KEY=your-secret-key-here
REDIS_HOST=redis.example.com
REDIS_PORT=6380
Expand Down Expand Up @@ -299,7 +299,7 @@ class Settings(BaseSettings):

### 4. Document Your Settings

Add docstrings to custom settings:
Add docstring to custom settings:

```python
class Settings(BaseSettings):
Expand Down
2 changes: 1 addition & 1 deletion tools/tracer/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __enter__(self) -> None:
self.start = time.time()

def __exit__(self, *exc: object) -> None:
"""Run when exit ContextManager or Decoraotr."""
"""Run when exit ContextManager or Decorator."""
self.end = time.time()

from tools import Logger
Expand Down