Skip to content

Commit e7d8355

Browse files
committed
Basic webapp scaffolding
1 parent 646be3a commit e7d8355

File tree

13 files changed

+953
-0
lines changed

13 files changed

+953
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.py[co]
2+
/.coverage
3+
/dist

.pre-commit-config.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: debug-statements
9+
- id: double-quote-string-fixer
10+
- id: name-tests-test
11+
- id: requirements-txt-fixer
12+
- repo: https://github.com/asottile/reorder_python_imports
13+
rev: v3.8.2
14+
hooks:
15+
- id: reorder-python-imports
16+
args: ['--py38-plus']
17+
- repo: https://github.com/asottile/add-trailing-comma
18+
rev: v2.2.3
19+
hooks:
20+
- id: add-trailing-comma
21+
args: ['--py36-plus']
22+
- repo: https://github.com/asottile/pyupgrade
23+
rev: v2.37.3
24+
hooks:
25+
- id: pyupgrade
26+
args: ['--py38-plus']
27+
- repo: https://github.com/pre-commit/mirrors-autopep8
28+
rev: v1.7.0
29+
hooks:
30+
- id: autopep8
31+
- repo: https://github.com/PyCQA/flake8
32+
rev: 5.0.4
33+
hooks:
34+
- id: flake8

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.PHONY: test
2+
test:
3+
poetry run coverage run -m pytest tests
4+
poetry run coverage report
5+
poetry run mypy pypi_view
6+
poetry run pre-commit run --all-files
7+
8+
.PHONY: start-dev
9+
start-dev:
10+
PYPI_VIEW_DEBUG=1 poetry run uvicorn --reload --port 5000 pypi_view.app:app

mypy.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[mypy]
2+
check_untyped_defs = true
3+
disallow_any_generics = true
4+
disallow_incomplete_defs = true
5+
disallow_untyped_defs = true
6+
no_implicit_optional = true
7+
warn_redundant_casts = true
8+
warn_unused_ignores = true

0 commit comments

Comments
 (0)