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

Fix local docs table gen #1593

Closed
wants to merge 3 commits into from
Closed
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
21 changes: 14 additions & 7 deletions scripts/make_docs_locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
# python scripts/json_schema_to_md_doc.py
# python scripts/generate_dialect_comparison_docs.py

deactivate
python3 -m venv docs-venv
source docs-venv/bin/activate
pip install --upgrade pip
pip install -r scripts/docs-requirements.txt
if [[ "$VIRTUAL_ENV" != "$cwd/docs-venv" ]]; then
if [ -n "$VIRTUAL_ENV" ]; then
deactivate
else
:
fi
python3 -m venv docs-venv
source docs-venv/bin/activate
pip install --upgrade pip
pip install -r scripts/docs-requirements.txt
fi

# if you haven't run generate_dialect_comparison_docs.py, then install the splink dependencies and run
if [[ ! -f "docs/includes/generated_files/comparison_level_library_dialect_table.md" ]]
then
pip install poetry
poetry install
# add the latest Splink build to the deployment
source scripts/test_poetry_build.sh --current_venv
python3 scripts/generate_dialect_comparison_docs.py
python3 scripts/generate_dataset_docs.py
fi
Expand Down
27 changes: 20 additions & 7 deletions scripts/test_poetry_build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
#!/bin/bash

deactivate
# Delete the dist folder if it exists
rm -rf dist/
rm -rf venv
# If the user requests that the current virtual
# environment be used - "--current_venv" -
# install poetry (if not already installed) and the latest Splink build.
# Otherwise, deactivate and create a new venv.
if [ "$1" = "--current_venv" ]; then
# Installing poetry in the current virtual environment
pip3 install poetry
else
# Deactivate the current virtual environment if it is active
if command -v deactivate > /dev/null 2>&1; then
deactivate
fi
# Delete the dist folder if it exists
rm -rf dist/ venv/

# Setup python and build the package
python3 -m venv venv
source venv/bin/activate
# Setup python and build the package
python3 -m venv venv
source venv/bin/activate
fi

# Create the wheel for the poetry build
poetry build --format=wheel --verbose

# Find the `.whl` file
Expand Down
Loading