Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/flightpath.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flightpath_status_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: '3.13'
cache: 'pip'

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: '3.13'
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: '3.13'
cache: 'poetry'
- uses: actions/download-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
default_language_version:
node: system
python: python3.11
python: python3.13
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
language_version: python3.11
language_version: python3.13
exclude: .+/migrations
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN npm run build:prod
# ones becase they use a different C compiler. Debian images also come with
# all useful packages required for image manipulation out of the box. They
# however weight a lot, approx. up to 1.5GiB per built image.
FROM python:3.11 AS production
FROM python:3.13 as production

ARG POETRY_INSTALL_ARGS="--no-dev"

Expand Down Expand Up @@ -71,7 +71,7 @@ USER tbx
# Install your app's Python requirements.
RUN python -m venv $VIRTUAL_ENV
COPY --chown=tbx pyproject.toml poetry.lock ./
RUN pip install --no-cache --upgrade pip && poetry install ${POETRY_INSTALL_ARGS} --no-root --extras gunicorn && rm -rf $HOME/.cache
RUN pip install --no-cache --upgrade pip && poetry install ${POETRY_INSTALL_ARGS} --no-root && rm -rf $HOME/.cache

COPY --chown=tbx --from=frontend ./tbx/static_compiled ./tbx/static_compiled

Expand Down
20 changes: 7 additions & 13 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Process .env file
if os.path.exists(".env"):
with open(".env", "r") as f:
with open(".env") as f:
for line in f.readlines():
if not line or line.startswith("#") or "=" not in line:
continue
Expand Down Expand Up @@ -36,9 +36,7 @@


def dexec(cmd, service="web"):
return local(
"docker compose exec -T {} bash -c {}".format(quote(service), quote(cmd))
)
return local(f"docker compose exec -T {quote(service)} bash -c {quote(cmd)}")


@task
Expand All @@ -51,7 +49,7 @@ def build(c):

group = subprocess.check_output(["id", "-gn"], encoding="utf-8").strip()
local("mkdir -p " + directories_arg)
local("chown -R $USER:{} {}".format(group, directories_arg))
local(f"chown -R $USER:{group} {directories_arg}")
local("chmod -R 775 " + directories_arg)

local("docker compose pull", pty=True)
Expand Down Expand Up @@ -267,9 +265,7 @@ def dev_shell(c):


def delete_local_database(c, local_database_name=LOCAL_DATABASE_NAME):
local(
"dropdb --if-exists {database_name}".format(database_name=LOCAL_DATABASE_NAME)
)
local(f"dropdb --if-exists {LOCAL_DATABASE_NAME}")


####
Expand Down Expand Up @@ -391,7 +387,7 @@ def open_heroku_shell(c, app_instance, shell_command="bash"):


def make_bold(msg):
return "\033[1m{}\033[0m".format(msg)
return f"\033[1m{msg}\033[0m"


@task
Expand Down Expand Up @@ -441,16 +437,14 @@ def dellar_list(c):
def dellar_remove(c, filename):
"""Remove database snapshots"""
dexec(
"rm {filename}.psql".format(filename=filename),
f"rm {filename}.psql",
service="db",
),
print(f"Snapshot {filename} removed")


def get_heroku_variable(c, app_instance, variable):
return local(
"heroku config:get {var} --app {app}".format(app=app_instance, var=variable)
).stdout.strip()
return local(f"heroku config:get {variable} --app {app_instance}").stdout.strip()


@task
Expand Down
Loading
Loading