Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[codespell]
skip = .git/*
skip = .git/*,*.pdf
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes here will be overwritten by Copier

_commit: 0.1.53
_commit: 0.1.66
_src_path: [email protected]:neuromath/python-template.git
author_email: ''
author_name: Blue Brain Project, EPFL
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ jobs:
check-pr-title:
name: Check PR title
runs-on: ubuntu-latest
env:
PR_TITLE: ${{ github.event.pull_request.title }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
- run: npm install -g --force commitlint @commitlint/cli commitlint-plugin-cleanfeet
- run: npm install conventional-changelog-conventionalcommits
- run: touch .git/COMMIT_EDITMSG
- run: echo "${{ github.event.pull_request.title }}" | commitlint
- run: echo "$PR_TITLE" | commitlint
4 changes: 2 additions & 2 deletions .github/workflows/publish-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"
- name: Build a wheel and a source tarball
run: |
pip install setuptools>=42 build setuptools_scm[toml]>=3.4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
min_versions: ["min_versions", "latest_versions"]
exclude:
- min_versions: "min_versions"
include:
- python-version: "3.8"
- python-version: "3.9"
min_versions: "min_versions"

steps:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
pip install tox
tox run -e min_versions
- name: JUnit Report Action
uses: mikepenz/action-junit-report@v4
uses: mikepenz/action-junit-report@v5
if: always() # always run even if the previous step fails
with:
report_paths: 'reports/pytest-*.xml'
Expand Down
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -13,22 +11,22 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.5.0
rev: v9.18.0
hooks:
- id: commitlint
stages:
- commit-msg
additional_dependencies: ['conventional-changelog-conventionalcommits']
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.3.0
hooks:
- id: codespell
args: ["-x", ".codespellignorelines"]
Expand All @@ -38,6 +36,6 @@ repos:
- id: pydocstyle
additional_dependencies: ["tomli"]
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.1.1
hooks:
- id: flake8
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
disable=
arguments-differ,
invalid-name,
too-many-positional-arguments

[FORMAT]
# Regexp for a line that is allowed to be longer than the limit.
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.11"

sphinx:
configuration: docs/source/conf.py
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ When you wish to contribute to the code base, please consider the following guid
or

```shell
tox -e py38 -e lint -e docs -e check-packaging
tox run -e py39,lint,docs,check-packaging
```

* Commit your changes using a descriptive commit message.
Expand Down
1 change: 1 addition & 0 deletions data_validation_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Simple framework to create data validation workflows.
"""

import importlib.metadata

from data_validation_framework import result # noqa
Expand Down
1 change: 1 addition & 0 deletions data_validation_framework/report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Specific tasks."""

import copy
import json
import logging
Expand Down
1 change: 1 addition & 0 deletions data_validation_framework/result.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Util functions."""

import logging
import warnings
from copy import deepcopy
Expand Down
1 change: 1 addition & 0 deletions data_validation_framework/rst_tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Some tools to generate RST files."""

import re
import textwrap

Expand Down
1 change: 1 addition & 0 deletions data_validation_framework/target.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Specific targets."""

import warnings

from luigi_tools.target import OutputLocalTarget
Expand Down
11 changes: 8 additions & 3 deletions data_validation_framework/task.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Specific tasks."""

import logging
import sys
import time
Expand All @@ -19,7 +20,11 @@
from luigi_tools.parameter import OptionalBoolParameter
from luigi_tools.task import LogTargetMixin
from luigi_tools.task import RerunMixin
from numpy import VisibleDeprecationWarning

try:
from numpy import VisibleDeprecationWarning
except ImportError: # pragma: no cover
from numpy.exceptions import VisibleDeprecationWarning

from data_validation_framework.report import make_report
from data_validation_framework.result import ValidationResult
Expand All @@ -39,7 +44,7 @@ class ValidationError(Exception):


class TagResultOutputMixin:
"""Initialize target prefixes and optionally add a tag to the resut directory.
"""Initialize target prefixes and optionally add a tag to the result directory.

.. warning::

Expand Down Expand Up @@ -163,7 +168,7 @@ def inputs(self):
data_dir = OptionalStrParameter(
default="data",
description=(
":str: name of folder to store addittional files created by a task (the provided "
":str: name of folder to store additional files created by a task (the provided "
"validation function must take this as argument)."
),
)
Expand Down
3 changes: 2 additions & 1 deletion data_validation_framework/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Util functions."""

import contextlib
import logging
import multiprocessing
Expand Down Expand Up @@ -128,7 +129,7 @@ def apply_to_df(df, func, *args, nb_processes=None, redirect_stdout=None, **kwar
# Start the computation
results_list = pool.imap(
_apply_to_df_internal,
zip(chunks, repeat([func] + list(args)), repeat(kwargs)),
zip(chunks, repeat([func] + list(args)), repeat(kwargs)), # pylint: disable=E0606
)
pool.close()

Expand Down
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@

# -- Project information -----------------------------------------------------

project = "data-validation-framework"
project_name = "Data Validation Framework"
package_name = "data-validation-framework"

# The short X.Y version
version = metadata.version("data-validation-framework")
version = metadata.version(package_name)

# The full version, including alpha/beta/rc tags
release = version
Expand Down Expand Up @@ -61,10 +62,10 @@
# html_static_path = ['_static']

html_theme_options = {
"metadata_distribution": "data-validation-framework",
"metadata_distribution": package_name,
}

html_title = "Data Validation Framework"
html_title = project_name

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 100
target-version = [
"py38",
"py39",
"py310",
"py311",
"py312",
]

[tool.pydocstyle]
Expand Down
15 changes: 10 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for the data-validation-framework package."""

from pathlib import Path

from setuptools import find_namespace_packages
Expand All @@ -10,7 +11,7 @@
"numpy>=1.21",
"pandas>=1.3",
"rst2pdf>=0.99",
"sphinx>=4,<8",
"sphinx>=7.4",
"tqdm>=4.40",
]
doc_reqs = [
Expand All @@ -23,8 +24,8 @@
"diff_pdf_visually>=1.6.2",
"pause>=0.2",
"pytest>=7",
"pytest-cov>=3",
"pytest-html>=3.1",
"pytest-cov>=4.1",
"pytest-html>=3.2",
]

setup(
Expand All @@ -40,7 +41,11 @@
},
license="Apache License 2.0",
packages=find_namespace_packages(include=["data_validation_framework*"]),
python_requires=">=3.8",
python_requires=">=3.9",
use_scm_version=True,
setup_requires=[
"setuptools_scm",
],
install_requires=reqs,
extras_require={
"docs": doc_reqs,
Expand All @@ -54,10 +59,10 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests suite for the data-validation-framework package."""

import re
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configuration for the pytest test suite."""

# pylint: disable=missing-function-docstring
import os
from pathlib import Path
Expand Down
Binary file modified tests/data/test_report/report_latexpdf.pdf
Binary file not shown.
Binary file modified tests/data/test_report/report_rst2pdf.pdf
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/test_result.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the data_validation_framework.result module."""

import pandas as pd
import pytest

Expand Down Expand Up @@ -122,7 +123,6 @@ def test_constructor_ValidationResultSet(self):
new_df = result.ValidationResultSet(df)
assert new_df.equals(df)

@pytest.mark.filterwarnings("ignore::numpy.VisibleDeprecationWarning")
def test_column_order(self):
"""Check column order."""
df = result.ValidationResultSet(
Expand Down
1 change: 1 addition & 0 deletions tests/test_rst_tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the data_validation_framework.rst_tools module."""

# pylint: disable=missing-class-docstring
# pylint: disable=missing-function-docstring
# pylint: disable=redefined-outer-name
Expand Down
1 change: 1 addition & 0 deletions tests/test_target.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the data_validation_framework.target module."""

# pylint: disable=missing-function-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
Expand Down
1 change: 1 addition & 0 deletions tests/test_task.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the data_validation_framework.task module."""

# pylint: disable=missing-class-docstring
# pylint: disable=missing-function-docstring
# pylint: disable=redefined-outer-name
Expand Down
1 change: 1 addition & 0 deletions tests/test_util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the data_validation_framework.util module."""

# pylint: disable=missing-function-docstring
import os
import re
Expand Down
Loading