Add index.subsample() to resize an index without re-encoding #44
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'src/**/*.py' | |
| - 'docs/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| pull-requests: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| check-docs: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| # Make this job informational only - don't block PR | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install Poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python3 - | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| poetry install --with docs | |
| - name: Check documentation sync | |
| run: | | |
| cd ${{ github.workspace }} | |
| # Generate the documentation | |
| poetry run python docs/generate_docs.py | |
| # Check if any files were modified (docs are out of sync) | |
| if [ -n "$(git status --porcelain docs/source/)" ]; then | |
| echo "::warning::Documentation is out of sync with the codebase!" | |
| echo "::warning::Please run 'python docs/generate_docs.py' and commit the updated documentation files." | |
| exit 1 | |
| fi | |
| echo "Documentation is in sync with the codebase." | |
| - name: Notify about out-of-sync docs | |
| if: failure() | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '⚠️ **Documentation is out of sync with the code!**\n\nPlease run `python docs/generate_docs.py` and commit the updated documentation files.' | |
| }) | |