Skip to content

Commit 52f0f46

Browse files
authored
migrate project completely to pyproject.toml (#271)
1 parent 9b19623 commit 52f0f46

22 files changed

+119
-122
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/cache@v4
3030
with:
3131
path: ~/.cache/pip
32-
key: ${{ runner.os }}-docs-${{ hashFiles('setup.cfg') }}
32+
key: ${{ runner.os }}-docs-${{ hashFiles('pyproject.toml') }}
3333
restore-keys: |
3434
${{ runner.os }}-docs-
3535

.github/workflows/license.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
timeout-minutes: 30
1414
strategy:
1515
matrix:
16-
python-version: ["3.8"]
16+
python-version: ["3.10"]
1717
steps:
1818
- uses: actions/checkout@v4
1919

@@ -26,16 +26,16 @@ jobs:
2626
uses: actions/cache@v4
2727
with:
2828
path: ~/.cache/pip
29-
key: ${{ runner.os }}-lic-${{ hashFiles('**/setup.cfg') }}
29+
key: ${{ runner.os }}-lic-${{ hashFiles('**/pyproject.toml') }}
3030
restore-keys: |
3131
${{ runner.os }}-lic-
3232
3333
- name: Install dependencies
3434
run: |
3535
python -m pip install pip
36-
pip install pylic~=2.2
36+
pip install pylic~=3.6.1
3737
pip install -e .
3838
3939
- name: License check
4040
run: |
41-
pylic check
41+
pylic check --allow-extra-safe-licenses

.github/workflows/linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ jobs:
2525
uses: actions/cache@v4
2626
with:
2727
path: ~/.cache/pip
28-
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}
28+
key: ${{ runner.os }}-lint-${{ hashFiles('pyproject.toml') }}
2929
restore-keys: |
30-
${{ runner.os }}-dev-
30+
${{ runner.os }}-lint-
3131
3232
- name: Install dependencies
3333
# We install the full dev requirements to make sure everything installs OK
3434
run: |
3535
python -m pip install pip
36-
pip install -e .[dev]
36+
pip install -e .[lint]
3737
3838
- name: Cache pre-commit
3939
uses: actions/cache@v4

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/cache@v4
3030
with:
3131
path: ~/.cache/pip
32-
key: ${{ runner.os }}-build-${{ hashFiles('setup.cfg') }}
32+
key: ${{ runner.os }}-build-${{ hashFiles('pyproject.toml') }}
3333
restore-keys: |
3434
${{ runner.os }}-build-
3535

.github/workflows/test-code-samples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/cache@v4
3434
with:
3535
path: ~/.cache/pip
36-
key: ${{ runner.os }}-samples-${{ hashFiles('**/setup.cfg') }}
36+
key: ${{ runner.os }}-samples-${{ hashFiles('**/pyproject.toml') }}
3737
restore-keys: |
3838
${{ runner.os }}-samples-
3939

.github/workflows/test-integration.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ jobs:
3838
uses: actions/cache@v4
3939
with:
4040
path: ~/.cache/pip
41-
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}
41+
key: ${{ runner.os }}-test-${{ hashFiles('pyproject.toml') }}
4242
restore-keys: |
43-
${{ runner.os }}-dev-
43+
${{ runner.os }}-test-
4444
4545
- name: Install dependencies
4646
run: |
4747
python -m pip install pip
48-
pip install -e .[dev]
48+
pip install -e .[test]
4949
- name: Run Integration Testing
5050
env:
5151
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}

.github/workflows/test-regression.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ jobs:
3939
uses: actions/cache@v4
4040
with:
4141
path: ~/.cache/pip
42-
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}
42+
key: ${{ runner.os }}-test-${{ hashFiles('pyproject.toml') }}
4343
restore-keys: |
44-
${{ runner.os }}-dev-
44+
${{ runner.os }}-test-
4545
4646
- name: Install dependencies
4747
run: |
4848
python -m pip install pip
49-
pip install -e .[dev]
49+
pip install -e .[test]
5050
- name: Run Regression Testing
5151
env:
5252
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}

.github/workflows/unit-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
uses: actions/cache@v4
3838
with:
3939
path: ~/.cache/pip
40-
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}
40+
key: ${{ runner.os }}-test-${{ hashFiles('setup.cfg') }}
4141
restore-keys: |
42-
${{ runner.os }}-dev-
42+
${{ runner.os }}-test-
4343
4444
- name: Install dependencies
4545
run: |
4646
python -m pip install pip
47-
pip install -e .[dev]
47+
pip install -e .[test]
4848
4949
- name: Unit testing with pytest
5050
env:

.pre-commit-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ repos:
2121
"--ignore=D10,D212,D203,D401"
2222
]
2323

24+
- repo: https://github.com/gitleaks/gitleaks
25+
rev: v8.18.2
26+
hooks:
27+
- id: gitleaks
28+
2429
- repo: https://github.com/PyCQA/pylint
25-
rev: v2.17.7
30+
rev: v3.2.7
2631
hooks:
2732
- id: pylint
2833
name: pylint

examples/auto_multi_receipts_extraction_example.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import os
2-
31
from mindee import Client, product
42
from mindee.extraction.multi_receipts_extractor.multi_receipts_extractor import (
53
extract_receipts,

0 commit comments

Comments
 (0)