Skip to content

Commit ce18eec

Browse files
authored
Merge pull request #33 from DataFog/feature/v3.2.1
2 parents af9eb85 + 5c455af commit ce18eec

File tree

9,049 files changed

+2384422
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,049 files changed

+2384422
-202
lines changed

.flake8

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore = E203, E266, E501, W503
3-
max-line-length = 80
2+
ignore = E203, E266, E501, W503, B006, B007, B008, F401, C416, B950, B904
3+
max-line-length = 88
44
max-complexity = 18
5-
select = B,C,E,F,W,T4,B9
5+
select = B,C,E,F,W,T4,B9

.github/workflows/dev-cicd-tests.yml renamed to .github/workflows/dev-cicd.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: dev-cicd-tests
1+
name: dev-cicd-setup-and-test
22

33
on:
44
push:
@@ -17,23 +17,44 @@ jobs:
1717
- name: Run pre-commit
1818
uses: pre-commit/action@v3.0.1
1919

20-
build:
20+
build-and-test:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24-
python-version: ["3.10", "3.11"]
24+
python-version: ["3.10"]
2525
steps:
2626
- uses: actions/setup-python@v4
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
- uses: actions/checkout@v3
30-
- name: Test with tox
30+
31+
- name: Install Tesseract OCR
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y software-properties-common
35+
sudo add-apt-repository -y ppa:alex-p/tesseract-ocr-devel
36+
sudo apt-get update
37+
sudo apt-get install -y tesseract-ocr
38+
sudo apt-get install -y libtesseract-dev
39+
tesseract --version
40+
dpkg -l | grep tesseract
41+
42+
- name: Verify Tesseract Installation
43+
run: |
44+
which tesseract
45+
tesseract --list-langs
46+
47+
- name: Update PATH
48+
run: echo "export PATH=$PATH:/usr/bin" >> $GITHUB_ENV
49+
50+
- name: Install dependencies and run tests
3151
run: |
3252
pip install tox
3353
tox -- --cov datafog --cov-report xml --cov-report term
54+
3455
- name: Submit to codecov
3556
uses: codecov/codecov-action@v3
36-
if: ${{ matrix.python-version == '3.11' }}
57+
if: ${{ matrix.python-version == '3.10' }}
3758

3859
- name: Upload coverage reports to Codecov
3960
uses: codecov/codecov-action@v4.0.1

.github/workflows/feature-cicd.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: feature-cicd-setup-and-test
2+
3+
on:
4+
push:
5+
branches:
6+
- feature/*
7+
pull_request:
8+
branches:
9+
- feature/*
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repo
16+
uses: actions/checkout@v3
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.10"
21+
- name: Install pre-commit
22+
run: pip install pre-commit
23+
- name: Run pre-commit
24+
run: pre-commit run --all-files
25+
26+
build:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
python-version: ["3.10"]
31+
steps:
32+
- name: Check out repo
33+
uses: actions/checkout@v3
34+
- name: Set up Python
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
- name: Install Tesseract OCR
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y software-properties-common
42+
sudo add-apt-repository -y ppa:alex-p/tesseract-ocr-devel
43+
sudo apt-get update
44+
sudo apt-get install -y tesseract-ocr libtesseract-dev
45+
tesseract --version
46+
dpkg -l | grep tesseract
47+
- name: Verify Tesseract Installation
48+
run: |
49+
which tesseract
50+
tesseract --list-langs
51+
- name: Install Dependencies
52+
run: |
53+
pip install -U pip
54+
pip install -e .
55+
pip install tox just pre-commit
56+
- name: Run Tests with tox
57+
run: tox -- --cov datafog --cov-report xml --cov-report term --codeblocks
58+
- name: Submit to Codecov
59+
uses: codecov/codecov-action@v3
60+
with:
61+
token: ${{ secrets.CODECOV_TOKEN }}
62+
files: ./coverage.xml
63+
flags: unittests
64+
name: codecov-umbrella

.github/workflows/main-cicd-tests.yml renamed to .github/workflows/main-cicd.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,40 @@ jobs:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24-
python-version: ["3.10", "3.11"]
24+
python-version: ["3.10"]
2525
steps:
2626
- uses: actions/setup-python@v4
2727
with:
2828
python-version: ${{ matrix.python-version }}
29+
2930
- uses: actions/checkout@v3
30-
- name: Test with tox
31+
- name: Install Tesseract OCR
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y software-properties-common
35+
sudo add-apt-repository -y ppa:alex-p/tesseract-ocr-devel
36+
sudo apt-get update
37+
sudo apt-get install -y tesseract-ocr
38+
sudo apt-get install -y libtesseract-dev
39+
tesseract --version
40+
dpkg -l | grep tesseract
41+
42+
- name: Verify Tesseract Installation
43+
run: |
44+
which tesseract
45+
tesseract --list-langs
46+
47+
- name: Update PATH
48+
run: echo "export PATH=$PATH:/usr/bin" >> $GITHUB_ENV
49+
50+
- name: Install dependencies and run tests
3151
run: |
3252
pip install tox
3353
tox -- --cov datafog --cov-report xml --cov-report term
54+
3455
- name: Submit to codecov
3556
uses: codecov/codecov-action@v3
36-
if: ${{ matrix.python-version == '3.11' }}
57+
if: ${{ matrix.python-version == '3.10' }}
3758

3859
- name: Upload coverage reports to Codecov
3960
uses: codecov/codecov-action@v4.0.1

.gitignore

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,24 @@ build/
99
*.egg-info/
1010
.pytest_cache/
1111
.tox/
12-
/src/datafog/__pycache__/
13-
/src/datafog/pii_tools/__pycache__/
14-
/tests/__pycache__/
15-
/tests/scratch.py
12+
src/datafog/__pycache__/
13+
src/datafog/pii_tools/__pycache__/
14+
tests/__pycache__/
15+
tests/scratch.py
16+
tests/.datafog_env/
1617
node_modules/
1718
datafog_debug.log
1819
sotu_2023.txt
1920
.DS_Store
20-
/venv/
21+
venv/
2122
datafog-python/datafog/processing/image_processing/__pycache__/
2223
datafog-python/datafog/processing/text_processing/__pycache__/
2324
datafog-python/datafog/services/__pycache__/
2425
datafog-python/datafog/processing/__pycache__/
2526
datafog-python/datafog/__pycache__/
26-
27+
.env
28+
coverage.xml
29+
htmlcov/
30+
.venv/
31+
node_modules/
32+
.DS_Store

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@ repos:
44
hooks:
55
- id: isort
66
args: [--profile=black]
7+
exclude: .venv
78

89
- repo: https://github.com/psf/black
910
rev: 24.2.0
1011
hooks:
1112
- id: black
1213
language_version: python3
14+
exclude: .venv
1315

1416
- repo: https://github.com/pycqa/flake8
1517
rev: 7.0.0
1618
hooks:
1719
- id: flake8
20+
args: [--max-line-length=88] # Match Black's line length
21+
additional_dependencies: [flake8-bugbear, flake8-comprehensions]
22+
exclude: .venv
1823

1924
- repo: https://github.com/pre-commit/mirrors-prettier
2025
rev: v4.0.0-alpha.8
2126
hooks:
2227
- id: prettier
28+
exclude: .venv

0 commit comments

Comments
 (0)