2 Commits

Author SHA1 Message Date
0988d53231 Bump versions and remove sentry
Some checks failed
release-tag / release-image (push) Failing after 4m26s
2024-07-01 21:10:07 +02:00
Marijn Doeve
02d225f2b2 Update dependencies
All checks were successful
release-nightly / release-image (push) Successful in 21m55s
2024-04-12 11:19:52 +02:00
9 changed files with 865 additions and 798 deletions

View File

@@ -1,54 +0,0 @@
name: release-nightly
on:
push:
branches: [ main ]
jobs:
release-image:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
DOCKER_LATEST: nightly
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # all history for all branches and tags
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v2
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: gitea.marijndoeve.nl
username: ${{ gitea.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v4
env:
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119
IMAGE_NAME: gitea.marijndoeve.nl/marijn/${{ steps.meta.outputs.REPO_NAME }}
with:
context: .
file: ./Containerfile
platforms: |
linux/arm/v7
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.DOCKER_LATEST }}
# cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:${{ env.DOCKER_LATEST }}
# cache-to: type:inline
# cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
# cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max

View File

@@ -2,14 +2,14 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/python-poetry/poetry
rev: 1.6.0 # add version here
rev: 1.8.0 # add version here
hooks:
- id: poetry-check
- id: poetry-lock
@@ -23,6 +23,6 @@ repos:
"--without-hashes",
]
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.4.2
hooks:
- id: black

View File

@@ -1,4 +1,4 @@
FROM docker.io/python:3.11-slim AS base
FROM docker.io/python:3.12-slim AS base
WORKDIR /app

1498
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
__version__ = "0.2.0"
__version__ = "0.4.0"

View File

@@ -1,18 +1,9 @@
from fastapi import FastAPI, Path, HTTPException, status
from fastapi.responses import RedirectResponse, FileResponse
from projectorpi.cli import ProjectorSerial, ExtronSerial
from fastapi.responses import FileResponse
from projectorpi import ProjectorSerial, ExtronSerial
from pydantic import BaseModel
from time import sleep
from typing import Optional
import sentry_sdk
sentry_sdk.init(
dsn="https://8dce3a0f69f643c0a3547b8baf19d00b@sentry.marijndoeve.nl/3",
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production,
traces_sample_rate=1.0,
)
app = FastAPI()
@@ -27,7 +18,7 @@ class Response(BaseModel):
@app.get("/")
async def index() -> RedirectResponse:
async def index() -> FileResponse:
return FileResponse("projectorpi_web/index.html")
# return RedirectResponse("/docs", HTTPStatus.MOVED_PERMANENTLY)

View File

@@ -1,15 +1,15 @@
[tool.poetry]
name = "projectorpi-web"
version = "0.2.0"
version = "0.4.0"
description = ""
authors = ["Marijn Doeve <marijn@doeve.me>"]
[tool.poetry.dependencies]
python = "^3.9"
fastapi = {extras = ["all"], version = "^0.101.0"}
pydantic = "^2.0.0"
projectorpi = {version = "^0.3.0", source = "gitea"}
sentry-sdk = {extras = ["fastapi"], version = "^1.25.0"}
fastapi = { extras = ["all"], version = "^0.111.0" }
pydantic = "^2.8.0"
projectorpi = { version = "^0.4.1", source = "gitea" }
uvicorn = "^0.30.1"
[tool.poetry.group.dev.dependencies]
mypy = "^1.3.0"

View File

@@ -1,41 +1,45 @@
--extra-index-url https://gitea.marijndoeve.nl/api/packages/Marijn/pypi/simple
annotated-types==0.5.0 ; python_version >= "3.9" and python_version < "4.0"
anyio==4.0.0 ; python_version >= "3.9" and python_version < "4.0"
certifi==2023.7.22 ; python_version >= "3.9" and python_version < "4.0"
annotated-types==0.7.0 ; python_version >= "3.9" and python_version < "4.0"
anyio==4.4.0 ; python_version >= "3.9" and python_version < "4.0"
certifi==2024.6.2 ; python_version >= "3.9" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.9" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows")
dnspython==2.4.2 ; python_version >= "3.9" and python_version < "4.0"
email-validator==2.0.0.post2 ; python_version >= "3.9" and python_version < "4.0"
exceptiongroup==1.1.3 ; python_version >= "3.9" and python_version < "3.11"
fastapi==0.101.1 ; python_version >= "3.9" and python_version < "4.0"
fastapi[all]==0.101.1 ; python_version >= "3.9" and python_version < "4.0"
dnspython==2.6.1 ; python_version >= "3.9" and python_version < "4.0"
email-validator==2.2.0 ; python_version >= "3.9" and python_version < "4.0"
exceptiongroup==1.2.1 ; python_version >= "3.9" and python_version < "3.11"
fastapi-cli==0.0.4 ; python_version >= "3.9" and python_version < "4.0"
fastapi[all]==0.111.0 ; python_version >= "3.9" and python_version < "4.0"
h11==0.14.0 ; python_version >= "3.9" and python_version < "4.0"
httpcore==0.18.0 ; python_version >= "3.9" and python_version < "4.0"
httptools==0.6.0 ; python_version >= "3.9" and python_version < "4.0"
httpx==0.25.0 ; python_version >= "3.9" and python_version < "4.0"
idna==3.4 ; python_version >= "3.9" and python_version < "4.0"
itsdangerous==2.1.2 ; python_version >= "3.9" and python_version < "4.0"
jinja2==3.1.2 ; python_version >= "3.9" and python_version < "4.0"
markupsafe==2.1.3 ; python_version >= "3.9" and python_version < "4.0"
orjson==3.9.7 ; python_version >= "3.9" and python_version < "4.0"
projectorpi==0.3.0 ; python_version >= "3.9" and python_version < "4.0"
pydantic-core==2.6.3 ; python_version >= "3.9" and python_version < "4.0"
pydantic-extra-types==2.1.0 ; python_version >= "3.9" and python_version < "4.0"
pydantic-settings==2.0.3 ; python_version >= "3.9" and python_version < "4.0"
pydantic==2.3.0 ; python_version >= "3.9" and python_version < "4.0"
httpcore==1.0.5 ; python_version >= "3.9" and python_version < "4.0"
httptools==0.6.1 ; python_version >= "3.9" and python_version < "4.0"
httpx==0.27.0 ; python_version >= "3.9" and python_version < "4.0"
idna==3.7 ; python_version >= "3.9" and python_version < "4.0"
itsdangerous==2.2.0 ; python_version >= "3.9" and python_version < "4.0"
jinja2==3.1.4 ; python_version >= "3.9" and python_version < "4.0"
markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "4.0"
markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "4.0"
mdurl==0.1.2 ; python_version >= "3.9" and python_version < "4.0"
orjson==3.10.5 ; python_version >= "3.9" and python_version < "4.0"
projectorpi==0.4.1 ; python_version >= "3.9" and python_version < "4.0"
pydantic-core==2.20.0 ; python_version >= "3.9" and python_version < "4.0"
pydantic-extra-types==2.8.2 ; python_version >= "3.9" and python_version < "4.0"
pydantic-settings==2.3.4 ; python_version >= "3.9" and python_version < "4.0"
pydantic==2.8.0 ; python_version >= "3.9" and python_version < "4.0"
pygments==2.18.0 ; python_version >= "3.9" and python_version < "4.0"
pyserial==3.5 ; python_version >= "3.9" and python_version < "4.0"
python-dotenv==1.0.0 ; python_version >= "3.9" and python_version < "4.0"
python-multipart==0.0.6 ; python_version >= "3.9" and python_version < "4.0"
python-dotenv==1.0.1 ; python_version >= "3.9" and python_version < "4.0"
python-multipart==0.0.9 ; python_version >= "3.9" and python_version < "4.0"
pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "4.0"
sentry-sdk==1.31.0 ; python_version >= "3.9" and python_version < "4.0"
sentry-sdk[fastapi]==1.31.0 ; python_version >= "3.9" and python_version < "4.0"
sniffio==1.3.0 ; python_version >= "3.9" and python_version < "4.0"
starlette==0.27.0 ; python_version >= "3.9" and python_version < "4.0"
typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "4.0"
ujson==5.8.0 ; python_version >= "3.9" and python_version < "4.0"
urllib3==2.0.5 ; python_version >= "3.9" and python_version < "4.0"
uvicorn[standard]==0.23.2 ; python_version >= "3.9" and python_version < "4.0"
uvloop==0.17.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.9" and python_version < "4.0"
watchfiles==0.20.0 ; python_version >= "3.9" and python_version < "4.0"
websockets==11.0.3 ; python_version >= "3.9" and python_version < "4.0"
rich==13.7.1 ; python_version >= "3.9" and python_version < "4.0"
shellingham==1.5.4 ; python_version >= "3.9" and python_version < "4.0"
sniffio==1.3.1 ; python_version >= "3.9" and python_version < "4.0"
starlette==0.37.2 ; python_version >= "3.9" and python_version < "4.0"
typer==0.12.3 ; python_version >= "3.9" and python_version < "4.0"
typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "4.0"
ujson==5.10.0 ; python_version >= "3.9" and python_version < "4.0"
uvicorn==0.30.1 ; python_version >= "3.9" and python_version < "4.0"
uvicorn[standard]==0.30.1 ; python_version >= "3.9" and python_version < "4.0"
uvloop==0.19.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.9" and python_version < "4.0"
watchfiles==0.22.0 ; python_version >= "3.9" and python_version < "4.0"
websockets==12.0 ; python_version >= "3.9" and python_version < "4.0"

View File

@@ -1,5 +1,5 @@
from projectorpi_web import __version__
def test_version():
assert __version__ == "0.1.0"
def test_version() -> None:
assert __version__ == "0.4.0"