Compare commits
No commits in common. "master" and "4.1.3" have entirely different histories.
@ -4,14 +4,14 @@ on: [push]
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
container: python:3.12.6
|
||||
container: python:3.12.3
|
||||
steps:
|
||||
- run: apt-get update
|
||||
- run: apt-get install -y git nodejs
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Gr1N/setup-poetry@v9
|
||||
- run: poetry install
|
||||
- run: poetry run ruff check .
|
||||
- run: poetry run flake8 .
|
||||
- run: poetry run mypy .
|
||||
- run: poetry run djlint .
|
||||
|
||||
@ -35,15 +35,15 @@ jobs:
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- uses: docker/build-push-action@v6
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: ${{ gitea.ref_name == gitea.event.repository.default_branch || gitea.ref_type == 'tag' }}
|
||||
push: ${{ gitea.ref_name == 'master' || gitea.ref_type == 'tag' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
pypi:
|
||||
runs-on: ubuntu-latest
|
||||
container: python:3.12.6
|
||||
container: python:3.12.3
|
||||
needs: [lint]
|
||||
if: gitea.ref_type == 'tag'
|
||||
env:
|
||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -107,10 +107,8 @@ ipython_config.py
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
.pdm.toml
|
||||
.pdm-python
|
||||
.pdm-build/
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
@ -160,4 +158,4 @@ cython_debug/
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
.idea/
|
||||
|
@ -1,10 +1,10 @@
|
||||
FROM python:3.12.6 as build
|
||||
FROM python:3.12.3 as build
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN pip install poetry && poetry build
|
||||
|
||||
FROM python:3.12.6
|
||||
FROM python:3.12.3
|
||||
|
||||
COPY --from=build /app/dist /tmp/dist
|
||||
RUN pip install /tmp/dist/*.whl && rm -rf /tmp/dist
|
||||
|
@ -8,12 +8,13 @@ from typing import Dict, Optional, Union
|
||||
from disnake import Asset, Client, Guild, Intents, Member, User
|
||||
from disnake.guild_scheduled_event import GuildScheduledEvent
|
||||
from dotenv import load_dotenv
|
||||
from hypercorn.middleware import ProxyFixMiddleware
|
||||
from ics import Calendar, ContentLine, Event
|
||||
from ics.alarm import DisplayAlarm
|
||||
from oauthlib.oauth2 import OAuth2Error
|
||||
from quart import Quart, redirect, render_template, request, session, url_for
|
||||
from requests_oauthlib import OAuth2Session # type: ignore
|
||||
from uvicorn.middleware.proxy_headers import ProxyHeadersMiddleware
|
||||
|
||||
|
||||
load_dotenv()
|
||||
|
||||
@ -79,7 +80,7 @@ client = Discord(intents=intents)
|
||||
app = Quart(__name__)
|
||||
app.config["SECRET_KEY"] = OAUTH2_CLIENT_SECRET
|
||||
app.config["EXPLAIN_TEMPLATE_LOADING"] = QUART_DEBUG
|
||||
app.asgi_app = ProxyFixMiddleware(app.asgi_app) # type: ignore
|
||||
app.asgi_app = ProxyHeadersMiddleware(app.asgi_app, "*") # type: ignore
|
||||
|
||||
|
||||
def get_guild_by_id(guild_id: str) -> Optional[Guild]:
|
||||
|
1329
poetry.lock
generated
1329
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "divent"
|
||||
version = "4.1.4"
|
||||
version = "4.1.3"
|
||||
description = "The discord scheduled event calendar generator"
|
||||
authors = ["Xéfir Destiny <xefir@crystalyx.net>"]
|
||||
license = "WTFPL"
|
||||
@ -12,26 +12,31 @@ repository = "https://git.crystalyx.net/Xefir/Divent"
|
||||
divent = 'divent.bot:run'
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.8,<4.0"
|
||||
python = ">=3.8.1,<4.0.0"
|
||||
disnake = "^2.9.2"
|
||||
ics = "0.8.0.dev0"
|
||||
python-dotenv = "^1.0.1"
|
||||
quart = "^0.19.6"
|
||||
requests-oauthlib = "^2.0.0"
|
||||
uvicorn = "^0.29.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
djlint = "^1.35.2"
|
||||
mypy = "^1.11.2"
|
||||
ruff = "^0.6.5"
|
||||
black = "^24.4.2"
|
||||
djlint = "^1.34.1"
|
||||
flake8 = "^7.0.0"
|
||||
flake8-alphabetize = "^0.0.21"
|
||||
flake8-black = "^0.3.6"
|
||||
flake8-pyproject = "^1.2.3"
|
||||
mypy = "^1.10.0"
|
||||
types-oauthlib = "^3.2.0"
|
||||
|
||||
[tool.flake8]
|
||||
max-line-length = 88
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "I"]
|
||||
|
||||
[tool.djlint]
|
||||
extension = "j2"
|
||||
profile = "jinja"
|
||||
|
Loading…
Reference in New Issue
Block a user