Skip to content

Commit

Permalink
DEV: Update dev requirements and pre-commit configuration (#2922)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan6419846 authored Jan 23, 2025
1 parent eec079d commit b5d5f36
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 103 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/title-check.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: 'PR Title Check'
on:
pull_request:
# check when PR
# * is created,
# * title is edited, and
# * new commits are added (to ensure failing title blocks merging)
types: [opened, reopened, edited, synchronize]

jobs:
title-check:
name: Title check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: python .github/scripts/check_pr_title.py
name: 'PR Title Check'
on:
pull_request:
# check when PR
# * is created,
# * title is edited, and
# * new commits are added (to ensure failing title blocks merging)
types: [opened, reopened, edited, synchronize]

jobs:
title-check:
name: Title check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: python .github/scripts/check_pr_title.py
31 changes: 6 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pre-commit run --all-files
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v5.0.0
hooks:
- id: check-ast
- id: check-byte-order-marker
Expand All @@ -18,40 +18,21 @@ repos:
- id: check-added-large-files
args: ['--maxkb=1000']

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [--target-version, py37]

- repo: https://github.com/asottile/blacken-docs
rev: 1.14.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.1.0]
exclude: "docs/user/robustness.md"

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.9
rev: v0.7.0
hooks:
- id: ruff
args: ['--fix']

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
args: ["--ignore", "E,W,F"]
args: [--py38-plus]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.4.0'
rev: 'v1.13.0'
hooks:
- id: mypy
additional_dependencies: [types-Pillow==10.0.0.2]
additional_dependencies: [types-Pillow==10.2.0.20240822]
files: ^pypdf/.*
3 changes: 1 addition & 2 deletions docs/user/streaming-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ from io import BytesIO

from google.cloud import storage

# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] must be set
# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] must be set
storage_client = storage.Client()
blob = storage_client.bucket("my-bucket").blob("mydoc.pdf")
file_stream = BytesIO()
blob.download_to_file(file_stream)
reader = PdfReader(file_stream)
```

3 changes: 1 addition & 2 deletions requirements/dev.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
black
pillow
pip-tools
pre-commit<2.18.0
pre-commit
pytest-cov
flit
wheel
93 changes: 39 additions & 54 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,98 +4,83 @@
#
# pip-compile requirements/dev.in
#
black==24.3.0
# via -r dev.in
build==1.0.3
build==1.2.2.post1
# via pip-tools
certifi==2023.11.17
certifi==2024.8.30
# via requests
cfgv==3.3.1
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via requests
click==8.1.7
# via
# black
# pip-tools
coverage[toml]==7.2.7
# via pip-tools
coverage[toml]==7.6.1
# via pytest-cov
distlib==0.3.8
distlib==0.3.9
# via virtualenv
docutils==0.20.1
# via flit
exceptiongroup==1.2.0
exceptiongroup==1.2.2
# via pytest
filelock==3.12.2
filelock==3.16.1
# via virtualenv
flit==3.9.0
# via -r dev.in
# via -r requirements/dev.in
flit-core==3.9.0
# via flit
identify==2.5.24
identify==2.6.1
# via pre-commit
idna==3.6
idna==3.10
# via requests
importlib-metadata==6.7.0
importlib-metadata==8.5.0
# via build
iniconfig==2.0.0
# via pytest
mypy-extensions==1.0.0
# via black
nodeenv==1.8.0
nodeenv==1.9.1
# via pre-commit
packaging==23.2
packaging==24.1
# via
# black
# build
# pytest
pathspec==0.11.2
# via black
pillow==9.5.0
# via -r dev.in
pip-tools==6.14.0
# via -r dev.in
platformdirs==4.0.0
# via
# black
# virtualenv
pluggy==1.2.0
pillow==10.4.0
# via -r requirements/dev.in
pip-tools==7.4.1
# via -r requirements/dev.in
platformdirs==4.3.6
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==2.17.0
# via -r dev.in
pyproject-hooks==1.0.0
# via build
pytest==7.4.3
pre-commit==3.5.0
# via -r requirements/dev.in
pyproject-hooks==1.2.0
# via
# build
# pip-tools
pytest==8.3.3
# via pytest-cov
pytest-cov==4.1.0
# via -r dev.in
pyyaml==6.0.1
pytest-cov==5.0.0
# via -r requirements/dev.in
pyyaml==6.0.2
# via pre-commit
requests==2.31.0
requests==2.32.3
# via flit
toml==0.10.2
# via pre-commit
tomli==2.0.1
tomli==2.0.2
# via
# black
# build
# coverage
# pip-tools
# pyproject-hooks
# pytest
tomli-w==1.0.0
# via flit
typing-extensions==4.7.1
# via black
urllib3==2.0.7
urllib3==2.2.3
# via requests
virtualenv==20.26.6
virtualenv==20.27.0
# via pre-commit
wheel==0.42.0
wheel==0.44.0
# via
# -r dev.in
# -r requirements/dev.in
# pip-tools
zipp==3.15.0
zipp==3.20.2
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down

0 comments on commit b5d5f36

Please sign in to comment.