The code behind sqlfmt.com, a web UI for sqlfmt.
This project uses pywebio, which makes it very simple.
It is deployed on Heroku.
- Install Python and poetry
- Install the Heroku CLI:
brew install heroku/brew/heroku
- Install dependencies into a venv with
poetry install --no-root
- Activate the venv:
poetry shell
- Launch the application:
heroku local
- Open a browser and visit
http://localhost:5000
. Voila
- Create a new branch, make commits to that branch
- Open a PR to main
- When the PR to main is merged, Heroku will automatically deploy the new code to prod
Until Heroku gets its act together with a better-scoped Github integration, use git push heroku main
- Create a new branch
- In pyproject.toml, change version of sqlfmt-web to 0.x.0 and bump the dependency on sqlfmt to ^0.x.0
- Run
poetry lock
to update the poetry.lock file. If this fails (can't find new version of sqlfmt), trypoetry cache clear pypi --all
- Run
poetry install --remove-untracked
to install the updated dependecies - Use
poetry run make
to run test suite - Commit, push, open PR