Skip to content

Commit

Permalink
New Major Release (#45)
Browse files Browse the repository at this point in the history
* chore: update packages [#44]

* chore: remove async [#44]

* fix: lint [#44]

* fix: wrong compose conmand [#44]

* chore: remove py3.8 support [#44]

* fix: lint [#44]

* chore: lint [#44]

* chore: clean up [#44]

* chore: remove deprecated 'version' from compose files [#44]

* docs: update README [#44]

* chore: update license year [#44]
  • Loading branch information
nickatnight authored Sep 14, 2024
1 parent 7db8497 commit fc8f242
Show file tree
Hide file tree
Showing 36 changed files with 178 additions and 392 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ jobs:
- name: Basic
args: ""
- name: Deployments, Example Api, & py3.11
args: "include_example_api='yes' deployments='yes' py_version=3.11"
args: "deployments='yes' py_version=3.11"
- name: Deployments, Example Api, & py3.9
args: "include_example_api='yes' deployments='yes' py_version=3.9"
- name: Deployments, Example Api, & py3.8
args: "include_example_api='yes' deployments='yes' py_version=3.8"
args: "deployments='yes' py_version=3.9"
name: "Docker ${{ matrix.script.name }}"
runs-on: ubuntu-latest
env:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: trailing-whitespace
Expand All @@ -13,15 +13,15 @@ repos:
- id: debug-statements
# - id: pretty-format-json
- repo: https://github.com/psf/black
rev: 23.10.1
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.1.3'
hooks:
- id: ruff
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/codespell-project/codespell
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Nick Kelly
Copyright (c) 2024 Nick Kelly

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ cookiecutter https://github.com/nickatnight/cookiecutter-fastapi-backend.git
* :globe_with_meridians: **NGINX** High Performance Load Balancer, [Web Server](https://www.nginx.com/), & Reverse Proxy
* :lock: **Let's Encrypt** A free, automated, and open [certificate authority](https://letsencrypt.org/) (CA), provided by the Internet Security Research Group (ISRG)...with automatic cert renewal
* :floppy_disk: **postgresql** Powerful open source [object-relational](https://www.postgresql.org/) database
* :left_right_arrow: **AsyncPG** [Database](https://magicstack.github.io/asyncpg/current/) interface library designed specifically for PostgreSQL and Python/asyncio
* :convenience_store: **Redis** In-memory data structure [store](https://redis.io/), used as a distributed, in-memory key–value database, cache and message broker
* :inbox_tray: **Continuous Integration/Deployment** Modular [GitHub Actions](https://github.com/features/actions) to lint, build, test, and deploy to DigitalOcean cloud
* :leftwards_arrow_with_hook: **pre-commit** [Git hooks](https://pre-commit.com/) to maintain code quality using modern tooling (ruff, black, isort)
Expand All @@ -44,13 +43,12 @@ The input variables, with their default values (some auto generated) are:
* `project_slug`: The development friendly name of the project. By default, based on the project name
* `project_slug_db`: The database friendly name of the project. By default, based on the project name
* `author_email`: The authors email...used for certbot
* `py_version`: The version of Python to install. Options are `3.8`, `3.9`, `3.10`, and `3.11`
* `py_version`: The version of Python to install. Options are `3.9`, `3.10`, and `3.11`
* `db_container_name`: The name of the database container. Default `db`
* `backend_container_name`: The name of the backend container. Default `backend`
* `nginx_container_name`: The name of the nginx web server container. Default `nginx`
* `doctl_version`: The version name of [DigitalOcean Command Line Interface](https://docs.digitalocean.com/reference/doctl/) to use. Default `1.92.0`
* `github_username`: The username of the GitHub user. Used for badge display in generated project `README.md`
* `include_example_api`: Include example API, models, schemas, and script to init db data. Options are `y` or `n`
* `deployments`: Include `docker-compose` files needed for deployment step in GitHub Action. Options are `y` or `n`


Expand Down
4 changes: 1 addition & 3 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

"author_email": "[email protected]",

"py_version": ["3.10", "3.11", "3.9", "3.8"],
"py_version": ["3.10", "3.11", "3.9"],

"db_container_name": "db",
"backend_container_name": "backend",
Expand All @@ -15,7 +15,5 @@

"github_username": "change.me",

"include_example_api": ["no", "yes"],

"deployments": ["no", "yes"]
}
6 changes: 0 additions & 6 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ def rename_file(old: str, new: str):
os.rename(in_, out_)


if "{{ cookiecutter.include_example_api}}" == "no":
print("Removing example api files...")
for p in MEME_FILE_PATHS:
remove_file(p)


if "{{ cookiecutter.deployments }}" == "no":
print("Removing deployment files...")
for p in DEPLOYMENT_FILES:
Expand Down
Loading

0 comments on commit fc8f242

Please sign in to comment.