Skip to content

Commit 5f0b892

Browse files
authored
Merge pull request #46 from DataFog/main
ff
2 parents af9eb85 + 23a9e03 commit 5f0b892

File tree

9,051 files changed

+2384594
-315
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,051 files changed

+2384594
-315
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

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/dev-cicd.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: dev-cicd-setup-and-test
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
branches:
9+
- dev
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repo
16+
uses: actions/checkout@v4
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@v4
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/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@v4
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@v4
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

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/main-cicd.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: main-cicd-setup-and-test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repo
16+
uses: actions/checkout@v4
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@v4
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/publish-pypi.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PyPI Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version to release (e.g., 1.2.3)"
8+
required: true
9+
confirm_tests:
10+
description: "Confirm all tests have passed"
11+
type: boolean
12+
required: true
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
if: github.event.inputs.confirm_tests == 'true'
18+
permissions:
19+
contents: write
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.10"
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build twine
30+
- name: Build package
31+
run: python -m build
32+
- name: Create GitHub Release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.pypi }}
35+
run: |
36+
git config user.name github-actions
37+
git config user.email github-actions@github.com
38+
git tag v${{ github.event.inputs.version }}
39+
git push origin v${{ github.event.inputs.version }}
40+
gh release create v${{ github.event.inputs.version }} --generate-notes
41+
- name: Publish to PyPI
42+
env:
43+
TWINE_USERNAME: __token__
44+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
45+
run: twine upload dist/*

.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)