Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #584

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Dev #584

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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"VARIANT": "3.11",
// Options
// "NODE_VERSION": "lts/*",
"POETRY_VERSION": "1.8.3"
"POETRY_VERSION": "2.1.1"
}
},
// Set *default* container specific settings.json values on container create.
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-poetry-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
poetry-version:
required: false
type: string
default: latest
default: 2.1.1
python-version:
required: false
type: string
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
branches:
- dependabot/pip/**

env:
PYTHON_VERSION: '3.11'
POETRY_VERSION: 1.8.2

jobs:
run:
name: Update requirements.txt and lock file
Expand All @@ -26,8 +22,6 @@ jobs:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
install-dependencies: false
- name: Update dependencies
run: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
- v[0-9]+.[0-9]+.[0-9]+
pull_request:

env:
PYTHON_VERSION: '3.11'
POETRY_VERSION: 1.8.2

jobs:
docker-images:
name: Build Docker Images
Expand Down Expand Up @@ -105,8 +101,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
without: test
- name: Run PyInstaller (linux/macos)
if: matrix.tag == 'linux' || matrix.tag == 'macos'
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Tests
on:
pull_request:

env:
POETRY_VERSION: 1.8.2

jobs:
tests:
name: Run Tests
Expand All @@ -19,7 +16,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ matrix.python }}
without: build
- uses: actions/cache@v4
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/tgtg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
schedule:
- cron: 0 1 * * *

env:
PYTHON_VERSION: '3.11'
POETRY_VERSION: 1.8.2

jobs:
test:
name: Run Test
Expand All @@ -16,8 +12,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry-action
with:
poetry-version: ${{ env.POETRY_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
without: build
- name: Run tests
uses: nick-fields/retry@v2
Expand Down
20 changes: 11 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ repos:
- id: check-added-large-files

- repo: https://github.com/ambv/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
args: [--line-length, '130', --target-version, py38]

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.1.2
hooks:
- id: flake8
args: [--max-line-length, '130']
Expand All @@ -42,22 +42,24 @@ repos:
args: [--autofix]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.44.0
hooks:
- id: markdownlint
args: [--fix]

- repo: https://github.com/python-poetry/poetry
rev: 1.8.3
rev: 2.1.1
hooks:
- id: poetry-check
- id: poetry-lock
args: [--no-update]

- repo: https://github.com/python-poetry/poetry-plugin-export
rev: 1.9.0
hooks:
- id: poetry-export
args: [-f, requirements.txt, -o, requirements.txt, --without-hashes]
args: [--no-cache, -f, requirements.txt, -o, requirements.txt, --without-hashes]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies: [types-requests]
1,126 changes: 112 additions & 1,014 deletions poetry.lock

Large diffs are not rendered by default.

57 changes: 31 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,55 @@
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]

[tool.poetry]
authors = ["Henning Merklinger <[email protected]>"]
[project]
authors = [{name = "Henning Merklinger", email = "[email protected]"}]
dependencies = [
'apprise (>=1.4.0,<2.0.0)',
'babel (>=2.16.0,<3.0.0)',
'colorlog (>=6.7.0,<7.0.0)',
'cron-descriptor (>=1.4.0,<2.0.0)',
'discord (>=2.3.2,<3.0.0)',
'googlemaps (>=4.10.0,<5.0.0)',
'humanize (>=4.7.0,<5.0.0)',
'packaging (>=24.0,<25.0)',
'progress (>=1.6,<2.0)',
'prometheus-client (>=0.21.0,<0.22.0)',
'pycron (>=3.0.0,<4.0.0)',
'python-pushsafer (>=1.1,<2.0)',
'python-telegram-bot[callback-data] (>=21.0.1,<22.0.0)',
'requests (>=2.31.0,<3.0.0)'
]
description = "Notifications for Too Good To Go"
documentation = "https://github.com/Der-Henning/tgtg/wiki"
dynamic = ["version"]
keywords = ["tgtg", "toogoodtogo", "notifications"]
license = "GPL-3.0-or-later"
name = "tgtg-scanner"
packages = [{include = "tgtg_scanner"}]
readme = "README.md"
requires-python = '>=3.9,<3.13'

[project.scripts]
scanner = "tgtg_scanner.__main__:main"
tgtg_server = "tests.tgtg_server:main"

[project.urls]
documentation = "https://github.com/Der-Henning/tgtg/wiki"
repository = "https://github.com/Der-Henning/tgtg"
version = "1.22.2"

[tool.poetry.dependencies]
apprise = "^1.4.0"
babel = "^2.16.0"
colorlog = "^6.7.0"
cron-descriptor = "^1.4.0"
discord = "^2.3.2"
googlemaps = "^4.10.0"
humanize = "^4.7.0"
packaging = "^24.0"
progress = "^1.6"
prometheus-client = "^0.21.0"
pycron = "^3.0.0"
python = ">=3.9,<3.13"
python-pushsafer = "^1.1"
python-telegram-bot = {extras = ["callback-data"], version = "^21.0.1"}
requests = "^2.31.0"
[tool.poetry]
packages = [{include = "tgtg_scanner"}]
requires-poetry = '>=2.0.0,<3.0.0'
version = "1.22.2"

[tool.poetry.group.build.dependencies]
pyinstaller = "^6.3.0"

[tool.poetry.group.test.dependencies]
poetry-plugin-export = "^1.9.0"
pre-commit = "^4.0.1"
pytest = "^8.0.0"
pytest-cov = "^6.0.0"
pytest-mock = "^3.11.1"
responses = "^0.25.0"

[tool.poetry.scripts]
scanner = "tgtg_scanner.__main__:main"
tgtg_server = "tests.tgtg_server:main"

[tool.pytest.ini_options]
markers = [
"tgtg_api: test directly calls the tgtg API (deselect with '-m \"not tgtg_api\"')"
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cachetools==5.5.2 ; python_version >= "3.9" and python_version < "3.13"
certifi==2025.1.31 ; python_version >= "3.9" and python_version < "3.13"
charset-normalizer==3.4.1 ; python_version >= "3.9" and python_version < "3.13"
click==8.1.8 ; python_version >= "3.9" and python_version < "3.13"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows")
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (platform_system == "Windows" or sys_platform == "win32")
colorlog==6.9.0 ; python_version >= "3.9" and python_version < "3.13"
cron-descriptor==1.4.5 ; python_version >= "3.9" and python_version < "3.13"
discord-py==2.5.0 ; python_version >= "3.9" and python_version < "3.13"
Expand All @@ -23,7 +23,7 @@ httpcore==1.0.7 ; python_version >= "3.9" and python_version < "3.13"
httpx==0.28.1 ; python_version >= "3.9" and python_version < "3.13"
humanize==4.12.1 ; python_version >= "3.9" and python_version < "3.13"
idna==3.10 ; python_version >= "3.9" and python_version < "3.13"
importlib-metadata==8.6.1 ; python_version >= "3.9" and python_version < "3.10"
importlib-metadata==8.6.1 ; python_version == "3.9"
markdown==3.7 ; python_version >= "3.9" and python_version < "3.13"
multidict==6.1.0 ; python_version >= "3.9" and python_version < "3.13"
oauthlib==3.2.2 ; python_version >= "3.9" and python_version < "3.13"
Expand All @@ -33,12 +33,12 @@ prometheus-client==0.21.1 ; python_version >= "3.9" and python_version < "3.13"
propcache==0.3.0 ; python_version >= "3.9" and python_version < "3.13"
pycron==3.1.2 ; python_version >= "3.9" and python_version < "3.13"
python-pushsafer==1.1 ; python_version >= "3.9" and python_version < "3.13"
python-telegram-bot[callback-data]==21.10 ; python_version >= "3.9" and python_version < "3.13"
python-telegram-bot==21.11.1 ; python_version >= "3.9" and python_version < "3.13"
pyyaml==6.0.2 ; python_version >= "3.9" and python_version < "3.13"
requests-oauthlib==2.0.0 ; python_version >= "3.9" and python_version < "3.13"
requests==2.32.3 ; python_version >= "3.9" and python_version < "3.13"
sniffio==1.3.1 ; python_version >= "3.9" and python_version < "3.13"
typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.13"
urllib3==2.3.0 ; python_version >= "3.9" and python_version < "3.13"
yarl==1.18.3 ; python_version >= "3.9" and python_version < "3.13"
zipp==3.21.0 ; python_version >= "3.9" and python_version < "3.10"
zipp==3.21.0 ; python_version == "3.9"
Loading