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

Added PDoc workflow to publish github pages documentation #412

Merged
merged 24 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c0f8545
Added PDoc workflow
jonmclean Aug 2, 2023
ca0b81a
Added documentation to the push-test workflow
jonmclean Aug 2, 2023
1be0545
Added diskannpy to the env for pdoc to use
jonmclean Aug 2, 2023
5b6ca5d
Initial commit of doc publish workflow
Aug 2, 2023
a15b1bc
Tried heredoc to get python version
Aug 2, 2023
9dcfd1e
Tried another way of getting the version
Aug 2, 2023
807bdc9
Tried another way of getting the version
Aug 2, 2023
ddf909d
Moved to docs/python path
Aug 2, 2023
1692ca5
Removing the test harness
Aug 2, 2023
03c7629
Add dependencies per wheel
jonmclean Aug 3, 2023
0b769b1
Moved dependency tree to the 'push' file so it runs on push
jonmclean Aug 3, 2023
d03a291
Added label name to the dependency file
jonmclean Aug 3, 2023
a4ccfc0
Trying maxtrix.os to get the os and version
jonmclean Aug 3, 2023
2b508b7
Moved doc generation from push-test to python-release. Will add 'dev…
jonmclean Aug 3, 2023
72f2339
Publish latest/version docs only on release. Publish docs for every …
jonmclean Aug 3, 2023
7763e9b
Install the local-file version of the library
jonmclean Aug 3, 2023
7cb8506
Disable branch check so I can test the install
jonmclean Aug 3, 2023
68bee78
Use python build to build a wheel for use in documentation
jonmclean Aug 3, 2023
3a6efc0
Tried changing to python instead of python3
jonmclean Aug 3, 2023
cb1230f
Added checkout depth in order to get boost
jonmclean Aug 3, 2023
d900c1d
Use the python build action to create wheel for documentation
jonmclean Aug 3, 2023
7e4ac44
Revert "Use the python build action to create wheel for documentation"
jonmclean Aug 3, 2023
e51a0f5
Added linux environment setup
jonmclean Aug 3, 2023
04f0468
Made only publish dev when on main and added comments
jonmclean Aug 3, 2023
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
78 changes: 78 additions & 0 deletions .github/workflows/build-python-pdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: DiskANN Build PDoc Documentation
on: [workflow_call]
daxpryce marked this conversation as resolved.
Show resolved Hide resolved
jobs:
build-reference-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
jonmclean marked this conversation as resolved.
Show resolved Hide resolved
- name: Install python build
run: python -m pip install build
shell: bash
# Install required dependencies
- name: Prepare Linux environment
run: |
sudo scripts/dev/install-dev-deps-ubuntu.bash
shell: bash
# We need to build the wheel in order to run pdoc. pdoc does not seem to work if you just point it at
# our source directory.
- name: Building Python Wheel for documentation generation
run: python -m build --wheel --outdir documentation_dist
shell: bash
- name: "Run Reference Documentation Generation"
run: |
pip install pdoc pipdeptree
pip install documentation_dist/*.whl
echo "documentation" > dependencies_documentation.txt
pipdeptree >> dependencies_documentation.txt
daxpryce marked this conversation as resolved.
Show resolved Hide resolved
pdoc -o docs/python/html diskannpy
- name: Create version environment variable
run: |
echo "DISKANN_VERSION=$(python <<EOF
from importlib.metadata import version
v = version('diskannpy')
print(v)
EOF
)" >> $GITHUB_ENV
jonmclean marked this conversation as resolved.
Show resolved Hide resolved
- name: Archive documentation version artifact
uses: actions/upload-artifact@v2
with:
name: dependencies
path: |
dependencies_documentation.txt
daxpryce marked this conversation as resolved.
Show resolved Hide resolved
- name: Archive documentation artifacts
uses: actions/upload-artifact@v2
with:
name: documentation-site
path: |
docs/python/html
# Publish to /dev if we are on the "main" branch
- name: Publish reference docs for latest development version (main branch)
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/python/html
destination_dir: docs/python/dev
# Publish to /<version> if we are on the "main" branch and releasing
- name: Publish reference docs by version (main branch)
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'release' && github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/python/html
destination_dir: docs/python/${{ env.DISKANN_VERSION }}
# Publish to /latest if we are on the "main" branch and releasing
- name: Publish latest reference docs (main branch)
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'release' && github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/python/html
destination_dir: docs/python/latest
16 changes: 16 additions & 0 deletions .github/workflows/push-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ jobs:
fail-fast: true
name: DiskANN Common Build Checks
uses: ./.github/workflows/common.yml
build-documentation:
strategy:
fail-fast: true
name: DiskANN Build Documentation
uses: ./.github/workflows/build-python-pdoc.yml
build:
strategy:
fail-fast: false
Expand All @@ -28,6 +33,17 @@ jobs:
with:
fetch-depth: 1
submodules: true
- name: Build dispannpy dependency tree
run: |
pip install diskannpy pipdeptree
echo "dependencies" > dependencies_${{ matrix.os }}.txt
pipdeptree >> dependencies_${{ matrix.os }}.txt
- name: Archive dispannpy dependencies artifact
uses: actions/upload-artifact@v3
with:
name: dependencies
path: |
dependencies_${{ matrix.os }}.txt
- name: DiskANN Build CLI Applications
uses: ./.github/actions/build
# python:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ jobs:
python-release-wheels:
name: Python
uses: ./.github/workflows/build-python.yml
build-documentation:
strategy:
fail-fast: true
name: DiskANN Build Documentation
uses: ./.github/workflows/build-python-pdoc.yml
release:
runs-on: ubuntu-latest
needs: python-release-wheels
Expand Down
Loading