Skip to content

Commit

Permalink
Small bug fixes and updates (#52)
Browse files Browse the repository at this point in the history
* chore: clean up

* chore: bump version
  • Loading branch information
nickatnight authored Oct 13, 2024
1 parent 59fa6a4 commit fee79f7
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cookiecutter-fastapi-backend"
version = "0.4.0"
version = "0.4.1"
description = "Cookiecutter template to build and deploy fastapi backends..batteries included"
authors = ["nickatnight <[email protected]>"]
readme = "README.md"
Expand Down
3 changes: 1 addition & 2 deletions {{ cookiecutter.project_slug }}/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
tags:
- '*'
branches:
- master
- develop
- main

{%- if cookiecutter.deployments == 'yes' %}
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: Clean-up
if: always()
run: |
docker-compose -f ops/docker-compose.test.yml down -v
docker compose -f ops/docker-compose.test.yml down -v
20 changes: 20 additions & 0 deletions {{ cookiecutter.project_slug }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,27 @@

## Backend local development, additional details

Initialize first migration (project must be up with docker compose up and contain no 'version' files)
```shell
$ make alembic-init
```

Create new migration file
```shell
$ docker compose exec {{ cookiecutter.backend_container_name }} alembic revision --autogenerate -m "some cool comment"
```

Apply migrations
```shell
$ make alembic-migrate
```

### Migrations
Every migration after that, you can create new migrations and apply them with
```console
$ make alembic-make-migrations "cool comment dude"
$ make alembic-migrate
```

### General workflow
See the [Makefile](/Makefile) to view available commands.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ lint.ignore = [
ignore-words-list = 'selectin,'

[tool.coverage.report]
fail_under = 55
fail_under = 20

[tool.coverage.run]
omit = ['*tests/*']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

def create_init_data() -> None:
with SessionLocal() as session:
# Add initial data here eg session.add(Model(field=value))
session.add()
session.add()

Expand Down

0 comments on commit fee79f7

Please sign in to comment.