Skip to content
Open
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
47 changes: 47 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow builds and publishes the latest docs to
# the `gh-pages` branch.
# For more details: https://github.com/marketplace/actions/deploy-to-github-pages
name: Publish docs

on:
release:
types: [created]
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
with:
# fetch all tags so `versioneer` can properly determine current version
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install pandoc
uses: pandoc/actions/setup@v1
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-ml.txt
pip install -r requirements-reports.txt
pip install -r requirements-docs.txt
pip install -e .

- name: Build
run: |
cd _docs/docs
python update_documentation.py
- name: Publish
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: _docs/docs/LATEST/html
52 changes: 52 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow publishes the package to pypi.
# For more details:
# https://docs.github.com/en/actions/guides/building-and-testing-python#publishing-to-package-registries
name: Publish to PyPi

on:
release:
types: [created]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# fetch all tags so `versioneer` can properly determine current version
with:
fetch-depth: 0
- name: Check if current commit is tagged
# fails and cancels release if the current commit is not tagged
run: |
git describe --exact-match --tags
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-ml.txt ]; then pip install -r requirements-ml.txt; fi
if [ -f requirements-reports.txt ]; then pip install -r requirements-reports.txt; fi
pip install setuptools wheel twine
- name: Build
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_REPOSITORY: pypi
run: |
python setup.py sdist bdist_wheel
- name: Test build
# fails and cancels release if the built package fails to import
run: |
pip install dist/*.whl
python -c 'import dataprofiler; print(dataprofiler.__version__)'
- name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_REPOSITORY: pypi
run: |
twine upload dist/*
38 changes: 0 additions & 38 deletions .github/workflows/publish-python-package.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ on:
pull_request:
branches:
- 'main'
- 'feature/**'
- 'dev'

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4.3.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -38,4 +36,4 @@ jobs:
pre-commit run --all-files
- name: Test with pytest
run: |
DATAPROFILER_SEED=0 pytest --forked --cov=dataprofiler --cov-fail-under=80
DATAPROFILER_SEED=0 pytest --cov=dataprofiler --cov-fail-under=80
67 changes: 37 additions & 30 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ repos:
# Black: format Python code
# https://github.com/psf/black/blob/master/.pre-commit-hooks.yaml
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.3.0
hooks:
- id: black
exclude: (versioneer.py|dataprofiler/_version.py|_docs/)
types: [file, python]
language_version: python3
# Isort: sort import statements
Expand All @@ -15,62 +16,67 @@ repos:
rev: 5.12.0
hooks:
- id: isort
exclude: _docs/
language_version: python3
# Flake8: complexity and style checking
# https://flake8.pycqa.org/en/latest/user/using-hooks.html
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
exclude: (^docs/|^dataprofiler/tests/|^.*/__init__.py)
exclude: (^docs/|^dataprofiler/tests/|^.*/__init__.py|_docs/)
language_version: python3
# General fixers: format files for white spaces and trailing new lines, warn on debug statements
# https://github.com/pre-commit/pre-commit-hooks#hooks-available
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: (^dataprofiler/tests/data/|^dataprofiler/tests/speed_tests/data/)
exclude: (^dataprofiler/tests/data/|^dataprofiler/tests/speed_tests/data/|_docs/)
- id: debug-statements
- id: end-of-file-fixer
exclude: (^dataprofiler/tests/data/)
exclude: (^dataprofiler/tests/data/|_docs/)
# Mypy: Optional static type checking
# https://github.com/pre-commit/mirrors-mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
rev: v1.11.2
hooks:
- id: mypy
exclude: (^dataprofiler/tests/|^resources/|^examples|venv*/)
# Let mypy own target selection and exclusions via setup.cfg.
args: [--config-file=setup.cfg, dataprofiler]
pass_filenames: false
language_version: python3
additional_dependencies: # Keep up-to-date with the respective requirement files
[
# requirements.txt
h5py>=2.10.0,
wheel>=0.33.1,
numpy>=1.22.0,
pandas>=1.1.2,
'numpy>=1.22.0,<3.0.0',
'pandas>=1.1.2,<3.0.0',
python-dateutil>=2.7.5,
pytz>=2020.1,
pyarrow>=1.0.1,
chardet>=3.0.4,
fastavro>=1.0.0.post1,
python-snappy>=0.5.4,
'pyarrow>=1.0.1,<24.0.0',
'chardet>=3.0.4,<7.0.0',
fastavro>=1.1.0,
python-snappy>=0.7.1,
charset-normalizer>=1.3.6,
psutil>=4.0.0,
scipy>=1.4.1,
requests>=2.28.1,
scipy>=1.10.0,
requests>=2.32.4,
networkx>=2.5.1,
typing-extensions>=3.10.0.2,
HLL>=2.0.3,
datasketches>=4.1.0,
boto3>=1.28.61,
packaging>=23.0,
boto3>=1.37.15,
urllib3>=2.5.0,

# requirements-dev.txt
check-manifest>=0.48,
black==22.3.0,
check-manifest>=0.50,
black>=24.3.0,
isort==5.12.0,
pre-commit==2.19.0,
pre-commit==4.3.0,
tox==3.25.1,
types-setuptools==67.7.0.1,
types-python-dateutil==2.8.19.12,
Expand All @@ -80,11 +86,9 @@ repos:

# requirements-ml.txt
scikit-learn>=0.23.2,
'keras>=2.4.3,<3.0.0',
'keras>3.4.0,<4.0.0',
rapidfuzz>=2.6.1,
"tensorflow>=2.6.4,<2.15.0; sys.platform != 'darwin'",
"tensorflow>=2.6.4,<2.15.0; sys_platform == 'darwin' and platform_machine != 'arm64'",
"tensorflow-macos>=2.6.4,<2.15.0; sys_platform == 'darwin' and platform_machine == 'arm64'",
"tensorflow>=2.16.0",
tqdm>=4.0.0,

# requirements-reports.txt
Expand All @@ -93,36 +97,39 @@ repos:

# requirements-test.txt
coverage>=5.0.1,
dask>=2.29.0,
fsspec>=0.3.3,
pytest>=6.0.1,
pytest-cov>=2.8.1,
pytest-xdist>=2.1.0,
pytest-forked>=1.3.0,
toolz>=0.10.0,
'memray>=1.7.0,<1.12.0',
'memray>=1.18.0',
]
# Check-manifest: ensures required non-Python files are included in MANIFEST.in
# https://github.com/mgedmin/check-manifest/blob/master/.pre-commit-hooks.yaml
- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
rev: "0.50"
hooks:
- id: check-manifest
additional_dependencies: ['h5py', 'wheel', 'future', 'numpy', 'pandas',
'python-dateutil', 'pytz', 'pyarrow', 'chardet', 'fastavro',
'python-snappy', 'charset-normalizer', 'psutil', 'scipy', 'requests',
'networkx','typing-extensions', 'HLL', 'datasketches', 'boto3']
additional_dependencies: ['h5py', 'wheel', 'future', 'numpy>=1.22.0,<3.0.0',
'pandas', 'python-dateutil', 'pytz', 'pyarrow<24.0.0', 'chardet',
'fastavro>=1.1.0', 'python-snappy', 'charset-normalizer', 'psutil',
'scipy>=1.10.0', 'requests>=2.32.4', 'networkx', 'typing-extensions',
'HLL', 'datasketches', 'packaging>=23.0', 'boto3>=1.37.15',
'urllib3>=2.5.0']
# Pyupgrade - standardize and modernize Python syntax for newer versions of the language
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
exclude: (versioneer.py|dataprofiler/_version.py| _docs/)
# Autoflake - cleanup unused variables and imports
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
- id: autoflake
exclude: _docs/
args:
- "--in-place"
- "--ignore-pass-statements"
3 changes: 3 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"settingsInheritedFrom": "capitalone/whitesource-config"
}
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Changelog

## 0.14.0 - 2026-09-08

### Breaking Changes

- Dropped support for Python 3.9. The minimum supported version is now Python
3.10 (`python_requires>=3.10`).
- Raised the `keras` requirement to `>3.4.0,<4.0.0` (previously `<=3.4.0`) and
migrated the bundled labeler models from the TensorFlow SavedModel format to
the single-file `.keras` format. Environments pinned to `keras<=3.4.0` are no
longer supported, and previously saved models must be re-saved.
- Moved the bundled labeler resources from the top-level `resources/` directory
into the package at `dataprofiler/resources/`. Code that referenced the old
top-level path must be updated; use
`dataprofiler.labelers.utils.find_resources_dir()` to resolve resource paths.

### Added

- Added compatibility support for NumPy 2.0 while constraining `numpy` to
`>=1.22.0,<3.0.0` to avoid future breakage from NumPy 3.
- Added compatibility support for Keras versions newer than 3.4.0 while
constraining `keras` to `>3.4.0,<4.0.0` to avoid future breakage from Keras 4.
- Added Python 3.12 and 3.13 to the test matrix.
- Added `find_resources_dir()` for resolving packaged resources via
`importlib.resources`.

### Changed

- Replaced the deprecated `pkg_resources` usage with `importlib.resources`, and
switched packaging from `data_files` to `package_data`.
- Constrained `chardet` to `<7.0.0` and `pandas` to `<3.0.0` to avoid breakage
from upcoming major releases.
- Constrained `pyarrow` to `<24.0.0`.
- Simplified the `tensorflow` requirement to `tensorflow>=2.16.0`, removing the
platform-specific `tensorflow-macos` marker.
- Updated the pre-commit configuration to align hook versions and hook
dependencies with the current project requirements.
- Enabled `mypy` checking across the `dataprofiler` package (excluding tests).
- Removed `--forked` from the `tox` pytest invocation and raised `memray` to
`>=1.18.0`.

### Security

- Resolved reported vulnerabilities by raising `boto3>=1.37.15`,
`requests>=2.32.4`, and adding an explicit `urllib3>=2.5.0` floor.
Loading