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

Upgrade dependencies #168

Merged
merged 3 commits into from
Feb 18, 2024
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
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"features": {
"ghcr.io/devcontainers/features/powershell:1": {
"version": "1.2.0",
"resolved": "ghcr.io/devcontainers/features/powershell@sha256:3b8a159d67a68419cbc13f09413fc3523c1a8f13d64bfb3aa7119df4fd324d0e",
"integrity": "sha256:3b8a159d67a68419cbc13f09413fc3523c1a8f13d64bfb3aa7119df4fd324d0e"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "1.3.2",
"resolved": "ghcr.io/devcontainers/features/python@sha256:585d4d8ad574891e2ffa2b1a5823a363fc1562121bdedea1c441daf3560f7006",
"integrity": "sha256:585d4d8ad574891e2ffa2b1a5823a363fc1562121bdedea1c441daf3560f7006"
}
}
}
5 changes: 5 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Docker Build and Push"
name: "Container Build and Push"

on:
push:
Expand All @@ -17,4 +17,6 @@ permissions:

jobs:
build-push:
uses: darbiadev/.github/.github/workflows/docker-build-push.yaml@f185cc076161b47921c6fb6da4c1fd5e40b50bff # v3.0.0
uses: darbiadev/.github/.github/workflows/docker-build-push.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
file-name: Dockerfile
14 changes: 10 additions & 4 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:

jobs:
pre-commit:
uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@f185cc076161b47921c6fb6da4c1fd5e40b50bff # v3.0.0
uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
python-version: "3.11"

lint:
needs: pre-commit
uses: darbiadev/.github/.github/workflows/python-lint.yaml@f185cc076161b47921c6fb6da4c1fd5e40b50bff # v3.0.0
uses: darbiadev/.github/.github/workflows/python-lint.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
python-version: "3.11"

test:
needs: lint
Expand All @@ -21,7 +25,7 @@ jobs:
os: [ ubuntu-latest ]
python-version: [ "3.11" ]

uses: darbiadev/.github/.github/workflows/python-test.yaml@f185cc076161b47921c6fb6da4c1fd5e40b50bff # v3.0.0
uses: darbiadev/.github/.github/workflows/python-test.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
Expand All @@ -33,4 +37,6 @@ jobs:
pages: write
id-token: write

uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@f185cc076161b47921c6fb6da4c1fd5e40b50bff # v3.0.0
uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
python-version: "3.11"
7 changes: 4 additions & 3 deletions Containerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM python:3.11-slim@sha256:edaf703dce209d774af3ff768fc92b1e3b60261e7602126276f9ceb0e3a96874

# Define Git SHA build argument for sentry
# Define Git SHA build argument for Sentry
ARG git_sha="development"
ENV GIT_SHA=$git_sha

COPY requirements/requirements.txt .
RUN python -m pip install --requirement requirements.txt

COPY . .
COPY pyproject.toml pyproject.toml
COPY src/ src/
RUN python -m pip install .

RUN adduser --disabled-password bot
USER bot

CMD ["python", "-m", "bot"]
CMD [ "python", "-m", "bot" ]
22 changes: 11 additions & 11 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COMMANDS
install-dev install local package in editable mode
update-deps update the dependencies
upgrade-deps upgrade the dependencies
lint run `pre-commit` and `black` and `ruff`
lint run `pre-commit` and `ruff` and `mypy`
test run `pytest`
build-dist run `python -m build`
clean delete generated content
Expand Down Expand Up @@ -40,29 +40,29 @@ function Invoke-Install-Dev

function Invoke-Update-Deps
{
python -m pip install --upgrade --editable ".[dev, tests, docs]"
python -m pip install --upgrade pip-tools
pip-compile --output-file requirements/requirements.txt requirements/requirements.in
pip-compile --output-file requirements/requirements-dev.txt requirements/requirements-dev.in
pip-compile --output-file requirements/requirements-tests.txtrequirements/requirements-tests.in
pip-compile --output-file requirements/requirements-docs.txt requirements/requirements-docs.in
pip-compile requirements/requirements.in
pip-compile requirements/requirements-dev.in
pip-compile requirements/requirements-tests.in
pip-compile requirements/requirements-docs.in
}

function Invoke-Upgrade-Deps
{
python -m pip install --upgrade pip-tools pre-commit
pre-commit autoupdate
pip-compile --upgrade --output-file requirements/requirements.txt requirements/requirements.in
pip-compile --upgrade --output-file requirements/requirements-dev.txt requirements/requirements-dev.in
pip-compile --upgrade --output-file requirements/requirements-tests.txtrequirements/requirements-tests.in
pip-compile --upgrade --output-file requirements/requirements-docs.txt requirements/requirements-docs.in
pip-compile --upgrade requirements/requirements.in
pip-compile --upgrade requirements/requirements-dev.in
pip-compile --upgrade requirements/requirements-tests.in
pip-compile --upgrade requirements/requirements-docs.in
}

function Invoke-Lint
{
pre-commit run --all-files
python -m black .
python -m ruff --fix .
python -m ruff format .
python -m mypy --strict src/
}

function Invoke-Test
Expand Down
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ dev = { file = ["requirements/requirements-dev.txt"] }
tests = { file = ["requirements/requirements-tests.txt"] }
docs = { file = ["requirements/requirements-docs.txt"] }

[tool.black]
target-version = ["py311"]
line-length = 120

[tool.ruff]
preview = true
unsafe-fixes = true
target-version = "py311"
line-length = 120

[tool.ruff.lint]
select = ["ALL"]
ignore = [
"CPY001", # (Missing copyright notice at top of file)
"ERA001", # (Found commented-out code) - Porting features a piece at a time
"G004", # (Logging statement uses f-string) - Developer UX
"S311", # (Standard pseudo-random generators are not suitable for cryptographic purposes) - all false positives
Expand All @@ -39,7 +39,7 @@ ignore = [
"PLR2004", # (Magic value used in comparison, consider replacing `` with a constant variable) - Be responsible
]

[tool.ruff.extend-per-file-ignores]
[tool.ruff.lint.extend-per-file-ignores]
"docs/*" = [
"INP001", # (File `tests/*.py` is part of an implicit namespace package. Add an `__init__.py`.) - Docs are not modules
]
Expand All @@ -48,6 +48,5 @@ ignore = [
"S101", # (Use of `assert` detected) - Yes, that's the point
]


[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
2 changes: 1 addition & 1 deletion requirements/requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

pip-tools
pre-commit
black
ruff
mypy
48 changes: 23 additions & 25 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,51 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements/requirements-dev.txt requirements/requirements-dev.in
# pip-compile requirements/requirements-dev.in
#
black==23.9.1
# via -r requirements/requirements-dev.in
build==1.0.3
# via pip-tools
cfgv==3.4.0
# via pre-commit
click==8.1.7
# via
# black
# pip-tools
distlib==0.3.7
# via pip-tools
distlib==0.3.8
# via virtualenv
filelock==3.12.4
filelock==3.13.1
# via
# -c requirements/requirements.txt
# virtualenv
identify==2.5.30
identify==2.5.34
# via pre-commit
mypy==1.8.0
# via -r requirements/requirements-dev.in
mypy-extensions==1.0.0
# via black
# via mypy
nodeenv==1.8.0
# via pre-commit
packaging==23.2
# via
# black
# build
pathspec==0.11.2
# via black
pip-tools==7.3.0
# via build
pip-tools==7.4.0
# via -r requirements/requirements-dev.in
platformdirs==3.11.0
# via
# black
# virtualenv
pre-commit==3.5.0
platformdirs==4.2.0
# via virtualenv
pre-commit==3.6.1
# via -r requirements/requirements-dev.in
pyproject-hooks==1.0.0
# via build
# via
# build
# pip-tools
pyyaml==6.0.1
# via pre-commit
ruff==0.0.292
ruff==0.2.2
# via -r requirements/requirements-dev.in
virtualenv==20.24.5
typing-extensions==4.9.0
# via
# -c requirements/requirements.txt
# mypy
virtualenv==20.25.0
# via pre-commit
wheel==0.41.2
wheel==0.42.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
41 changes: 18 additions & 23 deletions requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements/requirements-docs.txt requirements/requirements-docs.in
# pip-compile requirements/requirements-docs.in
#
alabaster==0.7.13
alabaster==0.7.16
# via sphinx
anyascii==0.3.2
# via sphinx-autoapi
astroid==3.0.0
astroid==3.0.3
# via sphinx-autoapi
babel==2.13.0
babel==2.14.0
# via sphinx
beautifulsoup4==4.12.2
beautifulsoup4==4.12.3
# via furo
certifi==2023.7.22
certifi==2024.2.2
# via
# -c requirements/requirements.txt
# requests
charset-normalizer==3.3.0
charset-normalizer==3.3.2
# via
# -c requirements/requirements.txt
# requests
docutils==0.20.1
# via sphinx
furo==2023.9.10
furo==2024.1.29
# via -r requirements/requirements-docs.in
idna==3.4
idna==3.6
# via
# -c requirements/requirements.txt
# requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.2
jinja2==3.1.3
# via
# sphinx
# sphinx-autoapi
markupsafe==2.1.3
markupsafe==2.1.5
# via jinja2
packaging==23.2
# via sphinx
pygments==2.16.1
pygments==2.17.2
# via
# furo
# sphinx
Expand All @@ -65,28 +65,23 @@ sphinx==7.2.6
# releases
# sphinx-autoapi
# sphinx-basic-ng
# sphinxcontrib-applehelp
# sphinxcontrib-devhelp
# sphinxcontrib-htmlhelp
# sphinxcontrib-qthelp
# sphinxcontrib-serializinghtml
sphinx-autoapi==3.0.0
# via -r requirements/requirements-docs.in
sphinx-basic-ng==1.0.0b2
# via furo
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-devhelp==1.0.6
# via sphinx
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-htmlhelp==2.0.5
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-qthelp==1.0.7
# via sphinx
sphinxcontrib-serializinghtml==1.1.9
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
urllib3==2.0.6
urllib3==2.2.1
# via
# -c requirements/requirements.txt
# requests
10 changes: 7 additions & 3 deletions requirements/requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements/requirements-tests.txt requirements/requirements-tests.in
# pip-compile requirements/requirements-tests.in
#
iniconfig==2.0.0
# via pytest
packaging==23.2
# via pytest
pluggy==1.3.0
pluggy==1.4.0
# via pytest
pytest==7.4.2
pytest==8.0.1
# via
# -r requirements/requirements-tests.in
# pytest-randomly
pytest-randomly==3.15.0
# via -r requirements/requirements-tests.in
Loading
Loading