Skip to content

Commit a2e1ffb

Browse files
committed
Merge branch 'data-validation-py312-1.17-e1' into data-validation-py312-1.17-e
2 parents 0dca4cd + 56bffee commit a2e1ffb

156 files changed

Lines changed: 35046 additions & 31657 deletions

File tree

Some content is hidden

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

.bazelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Needed to work with ZetaSQL dependency.
2+
# Zetasql is removed.
3+
# This is a candidate for removal
24
build --cxxopt="-std=c++17"
35

46
# Needed to avoid zetasql proto error.
7+
# Zetasql is removed.
8+
# This is a candidate for removal
59
build --protocopt=--experimental_allow_proto3_optional
610

711
# icu@: In create_linking_context: in call to create_linking_context(),
812
# parameter 'user_link_flags' is deprecated and will be removed soon.
913
# It may be temporarily re-enabled by setting --incompatible_require_linker_input_cc_api=false
1014
build --incompatible_require_linker_input_cc_api=false
11-

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
6.5.0

.github/reusable-build/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Resusable steps to build data-validation
2+
3+
inputs:
4+
python-version:
5+
description: 'Python version'
6+
required: true
7+
upload-artifact:
8+
description: 'Should upload build artifact or not'
9+
default: false
10+
11+
runs:
12+
using: 'composite'
13+
steps:
14+
- name: Set up Python ${{ inputs.python-version }}
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: ${{ inputs.python-version }}
18+
19+
- name: Build the package for Python ${{ inputs.python-version }}
20+
shell: bash
21+
run: |
22+
version="${{ matrix.python-version }}"
23+
docker compose run -e PYTHON_VERSION=$(echo "$version" | sed 's/\.//') manylinux2010
24+
25+
- name: Upload wheel artifact for Python ${{ matrix.python-version }}
26+
if: ${{ inputs.upload-artifact == 'true' }}
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: data-validation-wheel-py${{ matrix.python-version }}
30+
path: dist/*.whl
31+
32+
- name: Check the wheel
33+
shell: bash
34+
run: |
35+
pip install twine
36+
twine check dist/*

.github/workflows/build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.9", "3.10", "3.11"]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Build data-validation
24+
id: build-data-validation
25+
uses: ./.github/reusable-build
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
upload-artifact: true
29+
30+
upload_to_pypi:
31+
name: Upload to PyPI
32+
runs-on: ubuntu-latest
33+
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch')
34+
needs: [build]
35+
environment:
36+
name: pypi
37+
url: https://pypi.org/p/tensorflow-data-validation/
38+
permissions:
39+
id-token: write
40+
steps:
41+
- name: Retrieve wheels
42+
uses: actions/download-artifact@v4.1.8
43+
with:
44+
merge-multiple: true
45+
path: wheels
46+
47+
- name: List the build artifacts
48+
run: |
49+
ls -lAs wheels/
50+
51+
- name: Upload to PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1.9
53+
with:
54+
packages_dir: wheels/

.github/workflows/ci-lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4.1.7
13+
with:
14+
# Ensure the full history is fetched
15+
# This is required to run pre-commit on a specific set of commits
16+
# TODO: Remove this when all the pre-commit issues are fixed
17+
fetch-depth: 0
18+
- uses: actions/setup-python@v5.1.1
19+
with:
20+
python-version: 3.13
21+
- uses: pre-commit/action@v3.0.1

.github/workflows/docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy docs
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
8+
permissions:
9+
contents: write
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
17+
- name: Configure Git Credentials
18+
run: |
19+
git config user.name github-actions[bot]
20+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21+
if: (github.event_name != 'pull_request')
22+
23+
- name: Set up Python 3.9
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.9'
27+
cache: 'pip'
28+
cache-dependency-path: |
29+
setup.py
30+
requirements-docs.txt
31+
32+
- name: Save time for cache for mkdocs
33+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
34+
35+
- name: Caching
36+
uses: actions/cache@v4
37+
with:
38+
key: mkdocs-material-${{ env.cache_id }}
39+
path: .cache
40+
restore-keys: |
41+
mkdocs-material-
42+
43+
- name: Install Dependencies
44+
run: pip install -r requirements-docs.txt
45+
46+
- name: Deploy to GitHub Pages
47+
run: mkdocs gh-deploy --force
48+
if: (github.event_name != 'pull_request')
49+
50+
- name: Build docs to check for errors
51+
run: mkdocs build
52+
if: (github.event_name == 'pull_request')

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.9", "3.10", "3.11"]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Build data-validation
24+
id: build-data-validation
25+
uses: ./.github/reusable-build
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install built wheel
30+
shell: bash
31+
run: |
32+
PYTHON_VERSION_TAG="cp$(echo ${{ matrix.python-version }} | sed 's/\.//')"
33+
WHEEL_FILE=$(ls dist/*${PYTHON_VERSION_TAG}*.whl)
34+
pip install "${WHEEL_FILE}[test]"
35+
36+
- name: Run Test
37+
run: |
38+
rm -rf bazel-*
39+
# run tests
40+
pytest -vv

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ dmypy.json
126126
.pyre/
127127

128128
# pb2.py files
129-
*_pb2.py
129+
*_pb2.py

.pre-commit-config.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# pre-commit is a tool to perform a predefined set of tasks manually and/or
2+
# automatically before git commits are made.
3+
#
4+
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
5+
#
6+
# Common tasks
7+
#
8+
# - Register git hooks: pre-commit install --install-hooks
9+
# - Run on all files: pre-commit run --all-files
10+
#
11+
# These pre-commit hooks are run as CI.
12+
#
13+
# NOTE: if it can be avoided, add configs/args in pyproject.toml or below instead of creating a new `.config.file`.
14+
# https://pre-commit.ci/#configuration
15+
ci:
16+
autoupdate_schedule: monthly
17+
autofix_commit_msg: |
18+
[pre-commit.ci] Apply automatic pre-commit fixes
19+
20+
repos:
21+
# general
22+
- repo: https://github.com/pre-commit/pre-commit-hooks
23+
rev: v4.6.0
24+
hooks:
25+
- id: end-of-file-fixer
26+
exclude: '\.svg$|\.patch$'
27+
- id: trailing-whitespace
28+
exclude: '\.svg$|\.patch$'
29+
- id: check-json
30+
- id: check-yaml
31+
args: [--allow-multiple-documents, --unsafe]
32+
- id: check-toml
33+
34+
- repo: https://github.com/astral-sh/ruff-pre-commit
35+
rev: v0.5.6
36+
hooks:
37+
- id: ruff
38+
args: ["--fix"]
39+
- id: ruff-format

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,3 @@ tag.
238238
* [TensorFlow Data Validation PyPI](https://pypi.org/project/tensorflow-data-validation/)
239239
* [TensorFlow Data Validation Paper](https://mlsys.org/Conferences/2019/doc/2019/167.pdf)
240240
* [TensorFlow Data Validation Slides](https://conf.slac.stanford.edu/xldb2018/sites/xldb2018.conf.slac.stanford.edu/files/Tues_09.45_NeoklisPolyzotis_Data%20Analysis%20and%20Validation%20(1).pdf)
241-

0 commit comments

Comments
 (0)