Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the circle ci link check to include README.md #1014

Merged
merged 8 commits into from
Aug 31, 2023
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
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,15 @@ jobs:
resource_class: large
docker:
# https://circleci.com/docs/circleci-images#language-image-variants
- image: "cimg/python:<< parameters.v >>"
- image: "cimg/python:<< parameters.v >>-node"
steps:

- checkout

# Restore pip wheel
- restore_cache:
keys:
- v1-pip-wheel_cache-python<< parameters.v >>-{{ checksum "docs/requirements.txt" }}
- v1-pip-wheel_cache-python<< parameters.v >>-{{ checksum "docs/requirements.txt" }}-{{ checksum "package-lock.json" }}

- run:
name: Install EvaDB Doc dependencies
Expand All @@ -259,6 +259,7 @@ jobs:
source test_evadb_doc/bin/activate
pip install --upgrade pip
pip install -r docs/requirements.txt
npm install markdown-link-check

- run:
name: Test doc build and link validation
Expand All @@ -268,9 +269,10 @@ jobs:
bash script/test/test.sh -m "<< parameters.mode >>"

- save_cache:
key: v1-pip-wheel_cache-python<< parameters.v >>-{{ checksum "docs/requirements.txt" }}
key: v1-pip-wheel_cache-python<< parameters.v >>-{{ checksum "docs/requirements.txt" }}-{{ checksum "package-lock.json" }}
paths:
- test_evadb_doc
- node_modules

Postgres:
parameters:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ We are a lean team on a mission to bring AI inside database systems! All kinds o

## License
Copyright (c) [Georgia Tech Database Group](http://db.cc.gatech.edu/).
Licensed under an [Apache License](LICENSE).
Licensed under an [Apache License](LICENSE.txt).
13 changes: 9 additions & 4 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ parts:
title: Q&A from Videos [ChatGPT + HuggingFace]
- file: source/usecases/food-review.rst
title: Sentiment Analysis and Response [ChatGPT + PostgreSQL]
- file: source/usecases/13-privategpt.ipynb
title: PrivateGPT
- file: source/usecases/08-chatgpt.ipynb
title: ChatGPT-based Video Question Answering
- file: source/usecases/12-query-pdf.ipynb
title: Querying PDF Documents
- file: source/usecases/02-object-detection.ipynb
title: Object Detection
title: Analysing Traffic Flow with YOLO
- file: source/usecases/03-emotion-analysis.ipynb
title: Emotion Analysis
title: Examining Emotions of Movie
- file: source/usecases/07-object-segmentation-huggingface.ipynb
title: Image Segmentation [HuggingFace]

title: Image Segmentation with Hugging Face

- caption: User Reference
chapters:
Expand Down
8 changes: 6 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,13 @@

for i in os.listdir("../tutorials"):
if i in [
"13-privategpt.ipynb",
"08-chatgpt.ipynb",
"12-query-pdf.ipynb",
"02-object-detection.ipynb",
"03-emotion-analysis.ipynb",
"07-object-segmentation-huggingface.ipynb"
"03-emotion-analysis.ipynb",
"07-object-segmentation-huggingface.ipynb",
"chatgpt.png",
]:
shutil.copy(f"../tutorials/{i}", "./source/usecases/")

Expand Down
7 changes: 7 additions & 0 deletions script/test/link_check_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ignorePatterns": [
{
"pattern": "^https://twitter.com"
}
]
}
11 changes: 11 additions & 0 deletions script/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ check_doc_link() {
print_error_code $code "DOC LINK CHECK"
}

check_readme_link() {
if command -v npm > /dev/null && command -v npx >/dev/null && npm list --depth=0 | grep markdown-link-check; then
npx markdown-link-check -c ./script/test/link_check_config.json ./README.md
code=$?
print_error_code $code "README LINK CHECK"
else
echo "README LINK CHECK: --||-- SKIPPED (missing dependency: npm install markdown-link-check)"
fi
}

unit_test() {
PYTHONPATH="." pytest test/unit_tests/ --durations=20 --cov-report term-missing:skip-covered --cov-config=.coveragerc --cov-context=test --cov=evadb/ --capture=sys --tb=short -v -rsf --log-level=WARNING -m "not benchmark"
code=$?
Expand Down Expand Up @@ -142,6 +152,7 @@ then
# Run black, isort, linter
check_doc_build
check_doc_link
check_readme_link
fi

##################################################
Expand Down