Skip to content

Commit 59bb2c8

Browse files
Add documentation with MkDocs (#268)
* Rename docs directory * Add documentation dependencies * Add documentation dependencies to `setup.py` * Add javascripts * Add CSS stylesheets * Add TF logo * Add readme as landing page * Add basic mkdocs config * Use correct index page * Add images for index page * Add install and getting started pages to navigation * Add API docs * Add docs workflow * Remove deprecated code * Check links with lychee in docs workflow * Revert "Check links with lychee in docs workflow" This reverts commit 21b3486. * Add anomalies reference * Fix bad links in docs * Fix links that should be internal * Run pre-commit
1 parent 34c32af commit 59bb2c8

25 files changed

+640
-10
lines changed

.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')
File renamed without changes.
File renamed without changes.

docs/api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# TensorFlow Data Validation API Documentation
2+
3+
4+
::: tensorflow_data_validation

g3doc/custom_data_validation.md renamed to docs/custom_data_validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ freshness: { owner: 'kuochuntsai' reviewed: '2022-11-29' }
66

77
TFDV supports custom data validation using SQL. You can run custom data
88
validation using
9-
[validate_statistics](https://github.com/tensorflow/data-validation/blob/master/tensorflow_data_validation/api/validation_api.py;l=236;rcl=488721853)
9+
[validate_statistics](https://github.com/tensorflow/data-validation/blob/master/tensorflow_data_validation/api/validation_api.py#L236)
1010
or
11-
[custom_validate_statistics](https://github.com/tensorflow/data-validation/blob/master/tensorflow_data_validation/api/validation_api.py;l=535;rcl=488721853).
11+
[custom_validate_statistics](https://github.com/tensorflow/data-validation/blob/master/tensorflow_data_validation/api/validation_api.py#L535).
1212
Use `validate_statistics` to run standard, schema-based data validation along
1313
with custom validation. Use `custom_validate_statistics` to run only custom
1414
validation.
File renamed without changes.
File renamed without changes.

docs/images/feature_stats.png

108 KB
Loading
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)