-
Notifications
You must be signed in to change notification settings - Fork 8
Python/mkdocs init #257
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
Merged
Merged
Python/mkdocs init #257
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5648323
Initial commit for mkdocs
alexluck-sift 78f2307
iterating on usage of __all__
alexluck-sift 679be80
update features of site
alexluck-sift c9d52c1
clean up
alexluck-sift d02afe4
add custom griffe extension for inspection of the Sync implementations
alexluck-sift 78b179c
add custom griffe extension for inspection of the Sync implementations
alexluck-sift ff4a8bc
clean up client.py
alexluck-sift 9a7909d
add mike for versioning of the docs
alexluck-sift 64f332b
add mike auto building and deploy
alexluck-sift f610668
hide pr versions from dropdown
alexluck-sift 164e79a
hide pr versions from dropdown
alexluck-sift 9bdfeed
update python release doc logic
alexluck-sift d6bd928
clean up docs
alexluck-sift a378059
linting
alexluck-sift ada8fba
pin ruff version
alexluck-sift 00a3ca5
fix linting
alexluck-sift 0b5345a
sift styling WIP
alexluck-sift c36c1b8
updating styling to match fumadocs
alexluck-sift a61b6eb
theme update
alexluck-sift 9491dd0
banner clean up
alexluck-sift f410aeb
add favicon, stylesheet cleanup
alexluck-sift a85e726
banner cleanup
alexluck-sift b0a73c5
banner cleanup
alexluck-sift 7d81490
Update actions checkout to only one version
alexluck-sift 15cc847
update docs dependencies options
alexluck-sift File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| name: Build and Deploy Python Docs (Dev) | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, closed] | ||
| paths: | ||
| - 'python/docs/**' | ||
| - 'python/lib/**' | ||
| - 'python/mkdocs.yml' | ||
| - 'python/pyproject.toml' | ||
| workflow_dispatch: | ||
| inputs: | ||
| deploy_to_dev: | ||
| description: 'Deploy to dev alias using commit hash as version' | ||
| required: false | ||
| default: true | ||
| type: boolean | ||
|
|
||
| jobs: | ||
| build_docs: | ||
| if: github.event.action != 'closed' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| cd python | ||
| pip install -e .[docs,development] | ||
|
|
||
| - name: Extract version | ||
| id: version | ||
| run: | | ||
| # Use commit hash as version for dev deployments | ||
| VERSION=$(git rev-parse --short HEAD) | ||
|
|
||
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
| # Use PR number as alias for PR deployments | ||
| ALIAS="pr-${{ github.event.number }}" | ||
| else | ||
| # Use 'dev' for manual workflow dispatch | ||
| ALIAS="dev" | ||
| fi | ||
|
|
||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| echo "alias=$ALIAS" >> $GITHUB_OUTPUT | ||
| echo "Dev deployment - Version: $VERSION, Alias: $ALIAS" | ||
|
|
||
| - name: Fetch gh-pages branch | ||
| run: git fetch origin gh-pages --depth=1 | ||
|
|
||
| - name: Configure Git | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Deploy docs with mike | ||
| run: | | ||
| cd python | ||
| # Deploy dev/PR docs with hidden property to hide from version dropdown | ||
| mike deploy ${{ steps.version.outputs.alias }} --push --update-aliases --prop-set hidden=true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| cleanup_docs: | ||
| if: github.event.action == 'closed' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| cd python | ||
| pip install -e .[docs,development] | ||
|
|
||
| - name: Fetch gh-pages branch | ||
| run: git fetch origin gh-pages --depth=1 | ||
|
|
||
| - name: Configure Git | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Delete PR docs | ||
| run: | | ||
| cd python | ||
| PR_ALIAS="pr-${{ github.event.number }}" | ||
| echo "Deleting docs for: $PR_ALIAS" | ||
|
|
||
| # Check if the PR docs exist before trying to delete | ||
| if mike list | grep -q "$PR_ALIAS"; then | ||
| mike delete "$PR_ALIAS" --push | ||
| echo "Successfully deleted docs for $PR_ALIAS" | ||
| else | ||
| echo "No docs found for $PR_ALIAS, nothing to delete" | ||
| fi | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Sift Python Client Library | ||
| Welcome to the official Python client library for Sift! This library provides a high-level Python API on top of Sift's protocol buffers, designed to ergonomically interface with the Sift gRPC API and simplify the process of streaming data. | ||
|
|
||
| Sift provides official client libraries for select languages, designed to simplify the process of streaming data over gRPC. These client libraries utilize ingestion-config-based streaming to facilitate data transmission. | ||
|
|
||
| Check out the [repository](https://github.com/sift-stack/sift) for a list of all available client libraries. | ||
|
|
||
| ## Installation | ||
|
|
||
| To install the Sift Python library: | ||
|
|
||
| ```bash | ||
| pip install sift-stack-py | ||
| ``` | ||
|
|
||
| ## API Documentation | ||
|
|
||
| This documentation covers two Python APIs for interacting with Sift: | ||
|
|
||
| ### Sift Py API | ||
|
|
||
| The original low-level Python API that provides direct access to Sift's protocol buffer interfaces. | ||
|
|
||
| Browse the [**Sift Py API**][sift_py] section for complete reference documentation. | ||
|
|
||
| **Use this API if you need:** | ||
|
|
||
| - Direct protocol buffer access | ||
| - Fine-grained control over gRPC connections | ||
| - Legacy compatibility with existing code | ||
|
|
||
| ### Sift Client API (New) | ||
|
|
||
| !!! warning | ||
| The Sift Client is experimental and is subject to change. | ||
|
|
||
|
|
||
| The modern, high-level client library that provides all the ergonomic features missing from the original API. This new client offers intuitive Python interfaces, strong type safety, automatic connection management, and both synchronous and asynchronous support. | ||
|
|
||
| Explore the [**Sift Client API (New)**][sift_client] section for the complete API reference. | ||
|
|
||
| **Key improvements over Sift Py:** | ||
|
|
||
| - **Ergonomic Design** - Pythonic interfaces instead of raw protocol buffers | ||
| - **Type Safety** - Full type hints and Pydantic model validation | ||
| - **Dual APIs** - Both sync and async support for all operations | ||
| - **Auto Connection Management** - No manual gRPC connection handling | ||
| - **Rich Object Models** - Immutable types with convenient methods | ||
| - **Modern Patterns** - Context managers, iterators, and Python best practices | ||
|
|
||
|
|
||
| ## Getting help | ||
|
|
||
| - **API Reference** - Browse the complete API documentation in the navigation | ||
| - **Examples** - Check out code examples throughout the documentation | ||
ian-sift marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - **GitHub** - Visit our [repository](https://github.com/sift-stack/sift) for issues and contributions | ||
|
|
||
| ## What's next? | ||
|
|
||
| Ready to dive deeper? Explore the API documentation to learn about: | ||
|
|
||
| - **Sift Resources** - Creating, updating, and organizing your assets and other data | ||
| - **Data Streaming** - Efficient methods for ingesting data | ||
| - **Advanced Filtering** - Powerful query capabilities | ||
| - **Error Handling** - Best practices for robust applications | ||
| - **Performance Optimization** - Tips for high-throughput scenarios | ||
|
|
||
| Get started by exploring the API reference in the navigation menu! | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| {% extends "base.html" %} | ||
|
|
||
| {% block outdated %} | ||
| You're not viewing the latest version. | ||
| <a href="{{ '../' ~ base_url }}"> | ||
|
|
||
|
|
||
| <strong>Click here to go to latest.</strong> | ||
| </a> | ||
| {% endblock %} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <img id='logo_dark_mode' src='{{ config.theme.logo_dark_mode | url }}' alt='logo'> | ||
| <img id='logo_light_mode' src='{{ config.theme.logo_light_mode | url }}' alt='logo'> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.