Skip to content

mgurg/substio_app

Repository files navigation

Substio_APP

Places

cd tools
uv run offers.py
cd ..

Docker

COMPOSE_BAKE=true docker compose build

Migrations

New migration

alembic revision -m "create XXX table"

Note

Run below commands inside a docker container

Check current revision

docker exec -it substio_app .venv/bin/alembic current

To run all of your outstanding migrations, execute the upgrade head command

docker exec -it substio_app .venv/bin/alembic upgrade head

To roll back the latest migration operation, you may use the alembic downgrade command

docker exec -it substio_app .venv/bin/alembic downgrade -1

To run rolled back migration again:

docker exec -it substio_app .venv/bin/alembic upgrade +1

Revision History: Use .venv/bin/alembic history to see the history of migrations and understand the steps involved. Detailed View: Use .venv/bin/alembic show <revision> to get detailed information about specific revision scripts.

Tests

pytest -q tests

Update python dependencies

uv lock --upgrade

clean cache

uv cache clean

Check & format project

ruff check app/
ruff check app/ --fix

Cold start

  • alembic migration
  • insert geo data uv run locations.py

Truncate PG data

TRUNCATE TABLE cities RESTART IDENTITY CASCADE;

LLM friendly version

bunx repomix --style markdown --ignore "**/*.log,tmp/,Readme.md,uv.lock"
`tree -P '*.py' -I '__pycache__|*.pyc' --dirsfirst`

Truncate PG data

TRUNCATE TABLE places RESTART IDENTITY CASCADE ;

LLM prices

uvx genai-prices list
uvx genai-prices calc --input-tokens 100000 --output-tokens 3000 GPT-5-nano GPT-4.1-nano GPT-5 claude-sonnet-4-0 claude-sonnet-4-5

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published