diff --git a/README.md b/README.md index 5320c2a..008e50d 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,7 @@ things such as GitHub actions or python async libraries. [![Master workflow](https://github.com/Jakub3628800/async-url-shortener/actions/workflows/master.yml/badge.svg?branch=master)](https://github.com/Jakub3628800/async-url-shortener/actions/workflows/python-app.yml) ![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Jakub3628800/async-url-shortener/master.svg) -![coverage](https://gist.githubusercontent.com/Jakub3628800/5163dbd0fdea4409fd7a3ae6383c6b66/raw/gistfile1.svg) -It works: https://async-url-shortener.herokuapp.com/shipit # not anymore, heroku is expensive. Looking for a new deployment. ## Running 1. Activate a virtual environment diff --git a/docs/TODO.md b/docs/TODO.md deleted file mode 100644 index c279361..0000000 --- a/docs/TODO.md +++ /dev/null @@ -1,14 +0,0 @@ - -# TODO - -soon -- use alembic + sqlalchemy (or something else?) for migrations -- add sqlite support -- wait-for-it.sh for docker-compose (or maybe create wait-for-it.py) - -later -- change to fastapi -- replace heroku deployment - -maybe -- experiment with docker scout diff --git a/run_app.py b/run_app.py index 80c5be4..08f908b 100644 --- a/run_app.py +++ b/run_app.py @@ -3,7 +3,6 @@ import uvicorn from shortener.factory import app -from shortener_fastapi.main import app as app_fastapi # noqa: F401 if __name__ == "__main__": port = os.getenv("APPLICATION_PORT", 8000) diff --git a/shortener_fastapi/main.py b/shortener_fastapi/main.py deleted file mode 100644 index 30d4a45..0000000 --- a/shortener_fastapi/main.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Union - -from fastapi import FastAPI - -app = FastAPI() - - -@app.get("/") -def read_root(): - return {"Hello": "World"} - - -@app.get("/items/{item_id}") -def read_item(item_id: int, q: Union[str, None] = None): - return {"item_id": item_id, "q": q} diff --git a/upload_test_coverage.py b/upload_test_coverage.py deleted file mode 100644 index ff70129..0000000 --- a/upload_test_coverage.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -import sys - -import requests - - -def upload_coverage_badge(): - cov = sys.argv[-1] - badge_svg = f""" - coverage: 11%coverage{cov} - """ # noqa: E501 - - gh_token = os.environ["GITHUB_TOKEN"] - r = requests.patch( - url="https://api.github.com/gists/5163dbd0fdea4409fd7a3ae6383c6b66", - json={"files": {"gistfile1.svg": {"content": badge_svg}}}, - headers={ - "Authorization": f"token {gh_token}", - "Accept": "application/vnd.github.v3+json", - }, - ) - print(r.status_code) - - -if __name__ == "__main__": - raise SystemExit(upload_coverage_badge())