Reword past passages

This commit is contained in:
Gabriel Augendre 2022-03-25 19:18:15 +01:00
parent 96e3efac94
commit 122da21a07
5 changed files with 18 additions and 13 deletions

View file

@ -1,17 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: check-ast
types: [python]
- id: check-json
types: [json]
- id: check-toml
types: [toml]
- id: check-xml
types: [xml]
- id: check-yaml
types: [yaml]
- id: end-of-file-fixer
- id: check-merge-conflict
- id: pretty-format-json
@ -22,12 +17,12 @@ repos:
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/timothycrosley/isort
rev: 5.9.2
rev: 5.10.1
hooks:
- id: isort
types: [python]
- repo: https://github.com/psf/black
rev: 21.6b0
rev: 22.1.0
hooks:
- id: black
types: [python]

View file

@ -1 +1 @@
tcl-filtrage
tcl

View file

@ -1,8 +1,8 @@
## Build venv
FROM python:3.10.1-buster AS venv
FROM python:3.10.4-buster AS venv
# https://python-poetry.org/docs/#installation
ENV POETRY_VERSION=1.1.11
ENV POETRY_VERSION=1.1.13
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
ENV PATH /root/.local/bin:$PATH
@ -26,7 +26,7 @@ RUN git rev-parse HEAD | tee /version
## Beginning of runtime image
FROM python:3.10.1-slim-buster as final
FROM python:3.10.4-slim-buster as final
RUN echo "Europe/Paris" > /etc/timezone

View file

@ -118,7 +118,7 @@ def get_delai(heure_passage: str) -> str:
dt = datetime.strptime(heure_passage, "%Y-%m-%d %H:%M:%S")
now = datetime.now()
if now > dt:
return "Proche"
return "Passé"
delai = dt - now
minutes = delai.seconds // 60
if minutes <= 0:

View file

@ -4,3 +4,13 @@ from invoke import task
@task
def run(ctx):
ctx.run("uvicorn main:app --reload", pty=True, echo=True)
@task
def test(ctx):
ctx.run("pytest", pty=True, echo=True)
@task
def deploy(ctx):
ctx.run("ssh ubuntu /home/gaugendre/tcl-filtrage/update", pty=True, echo=True)