Initial commit
All checks were successful
Run linters on applied template / Python 3.13 lint and build (push) Successful in 1m0s
All checks were successful
Run linters on applied template / Python 3.13 lint and build (push) Successful in 1m0s
This is a FastAPI backend microservice template used with `copier` utility. Features of applied template are: - Configuration file processing logic - Metrics and tracing (both optional) configuration available - Debug endpoints - Database migration commands, prepared Alembic environment - Database usage example in ping_db endpoint - gitea sanity check pipeline
This commit is contained in:
39
Makefile.jinja
Normal file
39
Makefile.jinja
Normal file
@@ -0,0 +1,39 @@
|
||||
CODE := {{project_slug}}
|
||||
|
||||
lint:
|
||||
poetry run pylint $(CODE)
|
||||
|
||||
format:
|
||||
poetry run isort $(CODE)
|
||||
poetry run black $(CODE)
|
||||
|
||||
config-example:
|
||||
CONFIG_PATH=config.yaml poetry run {{project_name}} config-example
|
||||
|
||||
run:
|
||||
CONFIG_PATH=config.yaml poetry run {{project_name}} launch
|
||||
|
||||
install:
|
||||
pip install .
|
||||
|
||||
install-dev:
|
||||
poetry install --with dev
|
||||
|
||||
install-dev-pip:
|
||||
pip install -e . --config-settings editable_mode=strict
|
||||
|
||||
clean:
|
||||
rm -rf ./dist
|
||||
|
||||
build:
|
||||
poetry build
|
||||
|
||||
install-from-build:
|
||||
python -m wheel install dist/{{project_name}}-*.whl
|
||||
|
||||
prepare-migration:
|
||||
cd {{project_slug}}/db; CONFIG_PATH=../../config.yaml poetry run alembic revision --autogen
|
||||
|
||||
apply-migrations:
|
||||
cd {{project_slug}}/db; CONFIG_PATH=../../config.yaml poetry run alembic upgrade head
|
||||
|
||||
Reference in New Issue
Block a user