Skip to content

Commit

Permalink
Merge branch 'master' into fix-log-print
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo authored Sep 27, 2024
2 parents b10499f + 4d5b0a0 commit b18d0ed
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/generate-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
# For PRs from forks
- uses: actions/checkout@v4
# For PRs from the same repo
- uses: actions/checkout@v4
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.FULL_STACK_FASTAPI_TEMPLATE_REPO_TOKEN }}
Expand All @@ -35,10 +39,19 @@ jobs:
- run: uv run bash scripts/generate-client.sh
env:
VIRTUAL_ENV: backend/.venv
- name: Commit changes
- name: Add changes to git
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git add frontend/src/client
# Same repo PRs
- name: Push changes
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' )
run: |
git diff --staged --quiet || git commit -m "✨ Autogenerate frontend client"
git push
# Fork PRs
- name: Check changes
if: ( github.event_name == 'pull_request' && github.secret_source != 'Actions' )
run: |
git diff --staged --quiet || (echo "Changes detected in generated client, run scripts/generate-client.sh and commit the changes" && exit 1)
2 changes: 1 addition & 1 deletion .github/workflows/issue-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: tiangolo/[email protected].0
- uses: tiangolo/[email protected].1
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ repos:
args:
- --unsafe
- id: end-of-file-fixer
exclude: ^frontend/src/client/.*
exclude: |
(?x)^(
frontend/src/client/.*|
backend/app/email-templates/build/.*
)$
- id: trailing-whitespace
exclude: ^frontend/src/client/.*
- repo: https://github.com/charliermarsh/ruff-pre-commit
Expand Down
2 changes: 2 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM python:3.10

ENV PYTHONUNBUFFERED=1

WORKDIR /app/

# Install uv
Expand Down
1 change: 0 additions & 1 deletion backend/app/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def init_db(session: Session) -> None:
# the tables un-commenting the next lines
# from sqlmodel import SQLModel

# from app.core.engine import engine
# This works because the models are already imported and registered from app.models
# SQLModel.metadata.create_all(engine)

Expand Down
2 changes: 1 addition & 1 deletion copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ _exclude:
_answers_file: .copier/.copier-answers.yml

_tasks:
- "python .copier/update_dotenv.py"
- ["{{ _copier_python }}", .copier/update_dotenv.py]
23 changes: 22 additions & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@

## Latest Changes

* 👷 Do not sync labels as it overrides manually added labels. PR [#1307](https://github.com/fastapi/full-stack-fastapi-template/pull/1307) by [@tiangolo](https://github.com/tiangolo).
### Refactors

* 🔧 Add `ENV PYTHONUNBUFFERED=1` to log output directly to Docker. PR [#1378](https://github.com/fastapi/full-stack-fastapi-template/pull/1378) by [@tiangolo](https://github.com/tiangolo).
* 💡 Remove unnecessary comment. PR [#1260](https://github.com/fastapi/full-stack-fastapi-template/pull/1260) by [@sebhani](https://github.com/sebhani).

### Internal

* 👷 Update pre-commit end-of-file-fixer hook to exclude email-templates. PR [#1296](https://github.com/fastapi/full-stack-fastapi-template/pull/1296) by [@goabonga](https://github.com/goabonga).
* ⬆ Bump tiangolo/issue-manager from 0.5.0 to 0.5.1. PR [#1332](https://github.com/fastapi/full-stack-fastapi-template/pull/1332) by [@dependabot[bot]](https://github.com/apps/dependabot).
* 🔧 Run task by the same Python environment used to run Copier. PR [#1157](https://github.com/fastapi/full-stack-fastapi-template/pull/1157) by [@waketzheng](https://github.com/waketzheng).
* 👷 Tweak generate client to error out if there are errors. PR [#1377](https://github.com/fastapi/full-stack-fastapi-template/pull/1377) by [@tiangolo](https://github.com/tiangolo).
* 👷 Generate and commit client only on same repo PRs, on forks, show the error. PR [#1376](https://github.com/fastapi/full-stack-fastapi-template/pull/1376) by [@tiangolo](https://github.com/tiangolo).

## 0.7.1

### Highlights

* Migrate from Poetry to [`uv`](https://github.com/astral-sh/uv).
* Simplifications and improvements for Docker Compose files, Traefik Dockerfiles.
* Make the API use its own domain `api.example.com` and the frontend use `dashboard.example.com`. This would make it easier to deploy them separately if you needed that.
* The backend and frontend on Docker Compose now listen on the same port as the local development servers, this way you can stop the Docker Compose services and run the local development servers without changing the frontend configuration.

### Features

Expand Down Expand Up @@ -34,6 +54,7 @@

### Internal

* 👷 Do not sync labels as it overrides manually added labels. PR [#1307](https://github.com/fastapi/full-stack-fastapi-template/pull/1307) by [@tiangolo](https://github.com/tiangolo).
* 👷 Use uv cache on GitHub Actions. PR [#1366](https://github.com/fastapi/full-stack-fastapi-template/pull/1366) by [@tiangolo](https://github.com/tiangolo).
* 👷 Update GitHub Actions format. PR [#1363](https://github.com/fastapi/full-stack-fastapi-template/pull/1363) by [@tiangolo](https://github.com/tiangolo).
* 👷 Use `uv` for Python env to generate client. PR [#1362](https://github.com/fastapi/full-stack-fastapi-template/pull/1362) by [@tiangolo](https://github.com/tiangolo).
Expand Down

0 comments on commit b18d0ed

Please sign in to comment.