Skip to content

Commit 3e134fc

Browse files
committed
Initial commit with content
1 parent 8623092 commit 3e134fc

101 files changed

Lines changed: 9915 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.testing

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DATABASE_URI=sqlite+aiosqlite:////tmp/${USER}_fact_inventory_testing.sqlite
2+
RATE_LIMIT_UNIT=second
3+
RATE_LIMIT_MAX_REQUESTS=1
4+
DEBUG=True
5+
APP_PREFIX="/fact_inventory"

.github/workflows/ci.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
permissions:
3+
contents: read
4+
pull-requests: read
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v7
17+
- uses: actions/setup-python@v6
18+
with:
19+
python-version: "3.x"
20+
- run: pip install uv
21+
- run: uv sync --group dev
22+
- run: uv run pre-commit run --all-files
23+
24+
pytest:
25+
runs-on: ubuntu-latest
26+
needs: pre-commit
27+
strategy:
28+
matrix:
29+
python-version:
30+
- "3.12"
31+
steps:
32+
- uses: actions/checkout@v7
33+
- name: Set up Python
34+
uses: actions/setup-python@v6
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
- run: pip install uv
38+
- run: uv sync --python ${{ matrix.python-version }} --group dev
39+
- run: uv run --python ${{ matrix.python-version }} pytest

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Python-generated files
2+
__pycache__/
3+
.pytest_cache/*
4+
*.py[oc]
5+
build/
6+
dist/
7+
wheels/
8+
*.egg-info
9+
uv.lock
10+
.python-version
11+
.coverage
12+
*.*,cover
13+
coverage.json
14+
coverage.xml
15+
16+
# Virtual environments
17+
.venv
18+
19+
# vim files
20+
*.sw[po]
21+
22+
# .env files
23+
.env
24+
.env.*
25+
!.env.testing

.pre-commit-config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.15.14
4+
hooks:
5+
- id: ruff-format
6+
- id: ruff-check
7+
args: [--fix]
8+
9+
- repo: https://github.com/JoC0de/pre-commit-prettier
10+
rev: v3.8.3
11+
hooks:
12+
- id: prettier
13+
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v6.0.0
16+
hooks:
17+
- id: check-ast
18+
- id: check-case-conflict
19+
- id: check-toml
20+
- id: debug-statements
21+
- id: end-of-file-fixer
22+
- id: check-merge-conflict
23+
- id: mixed-line-ending
24+
- id: trailing-whitespace
25+
26+
- repo: https://github.com/pre-commit/mirrors-mypy
27+
rev: v2.1.0
28+
hooks:
29+
- id: mypy
30+
name: Check variable types (mypy)
31+
files: ^fact_inventory/
32+
additional_dependencies:
33+
- advanced-alchemy
34+
- litestar
35+
- pydantic
36+
- pydantic_settings
37+
38+
- repo: https://github.com/RobertCraigie/pyright-python
39+
rev: v1.1.409
40+
hooks:
41+
- id: pyright
42+
name: Check variable types (pyright)
43+
files: ^fact_inventory/

0 commit comments

Comments
 (0)