- 
                Notifications
    You must be signed in to change notification settings 
- Fork 108
Implement docs with sphinx #508
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
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            8 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      37e0eb3
              
                Implement docs with sphinx
              
              
                jhamon 19705ea
              
                Consolidate sphinx and docs directories
              
              
                jhamon 1596bc6
              
                Remove pdoc/
              
              
                jhamon 722e314
              
                Put back python version to 3.9
              
              
                jhamon 1d34f64
              
                Docs build shenanigans
              
              
                jhamon 6451596
              
                More shenaningans
              
              
                jhamon a695e39
              
                Edit docstrings
              
              
                jhamon 897ae60
              
                Fix workflow for dependency changes
              
              
                jhamon 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
    
  
  
    
              This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      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 | 
|---|---|---|
|  | @@ -14,7 +14,7 @@ jobs: | |
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|  | ||
| - name: Generate pdoc documentation | ||
| - name: Generate sphinx documentation | ||
| uses: ./.github/actions/build-docs | ||
| with: | ||
| python-version: 3.11 | ||
|  | @@ -24,7 +24,7 @@ jobs: | |
| env: | ||
| SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | ||
| with: | ||
| source-directory: pdoc | ||
| source-directory: docsbuild | ||
| destination-github-username: pinecone-io | ||
| destination-repository-name: sdk-docs | ||
| user-email: [email protected] | ||
|  | ||
  
    
      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 | 
|---|---|---|
|  | @@ -30,6 +30,7 @@ jobs: | |
| if: ${{ always() }} | ||
| needs: | ||
| - dependency-tests | ||
| - create-project | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since I removed pdoc, this workflow got triggered and I noticed this mistake in my recent "create a project for every test run" PR. | ||
| uses: './.github/workflows/project-cleanup.yaml' | ||
| secrets: inherit | ||
| with: | ||
|  | ||
  
    
      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,33 @@ | ||
| body, | ||
| div.body h1, | ||
| div.body h2, | ||
| div.body h3, | ||
| div.body h4, | ||
| div.body h5, | ||
| div.body h6, | ||
| div.admonition p.admonition-title { | ||
| font-family: "Inter", "Helvetica Neue", "Helvetica", "Arial", sans-serif; | ||
| } | ||
|  | ||
| .blurb { | ||
| font-size: 16px; | ||
| } | ||
|  | ||
| p.admonition-title:after { | ||
| content: ""; | ||
| } | ||
|  | ||
| div.code-block-caption { | ||
| background-color: #EEE; | ||
| border-bottom: 1px solid #CCC; | ||
| font-size: 17px; | ||
| padding: 10px; | ||
| } | ||
|  | ||
| dt:target { | ||
| background-color: #E8E8E8; | ||
| } | ||
|  | ||
| .highlight { | ||
| background-color: #F8F8F8; | ||
| } | 
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
  
    
      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,107 @@ | ||
| =============== | ||
| PineconeAsyncio | ||
| =============== | ||
|  | ||
| .. autoclass:: pinecone::PineconeAsyncio | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.__init__ | ||
|  | ||
| DB Control Plane | ||
| ================ | ||
|  | ||
| Indexes | ||
| ------- | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.create_index | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.create_index_for_model | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.create_index_from_backup | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.list_indexes | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.describe_index | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.configure_index | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.delete_index | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.has_index | ||
|  | ||
| Backups | ||
| ------- | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.create_backup | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.list_backups | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.describe_backup | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.delete_backup | ||
|  | ||
| Collections | ||
| ----------- | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.create_collection | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.list_collections | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.describe_collection | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.delete_collection | ||
|  | ||
| Restore Jobs | ||
| ------------ | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.list_restore_jobs | ||
|  | ||
| .. automethod:: pinecone::PineconeAsyncio.describe_restore_job | ||
|  | ||
| DB Data Plane | ||
| ============= | ||
|  | ||
| .. autoclass:: pinecone.db_data::IndexAsyncio | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.__init__ | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.describe_index_stats | ||
|  | ||
| Vectors | ||
| ------- | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.upsert | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.query | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.query_namespaces | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.delete | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.fetch | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.list | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.list_paginated | ||
|  | ||
| Records | ||
| ------- | ||
|  | ||
| If you have created an index using integrated inference, you can use the following methods to | ||
| search and retrieve records. | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.search | ||
|  | ||
| .. automethod:: pinecone.db_data::IndexAsyncio.search_records | ||
|  | ||
|  | ||
|  | ||
| Inference | ||
| ========= | ||
|  | ||
| .. automethod:: pinecone.inference::Inference.embed | ||
|  | ||
| .. automethod:: pinecone.inference::Inference.rerank | ||
|  | ||
| .. automethod:: pinecone.inference::Inference.list_models | ||
|  | ||
| .. automethod:: pinecone.inference::Inference.get_model | 
  
    
      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,42 @@ | ||
| import pinecone | ||
|  | ||
| project = "Pinecone Python SDK" | ||
| author = "Pinecone Systems, Inc." | ||
| version = pinecone.__version__ | ||
| copyright = "%Y, Pinecone Systems, Inc." | ||
|  | ||
| html_baseurl = "https://sdk.pinecone.io/python" | ||
| html_static_path = ["_static"] | ||
| html_favicon = "favicon-32x32.png" | ||
|  | ||
| extensions = [ | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.viewcode", | ||
| "sphinx.ext.todo", | ||
| "sphinx.ext.napoleon", | ||
| "sphinx.ext.coverage", | ||
| "sphinx.ext.autodoc.typehints", | ||
| "myst_parser", | ||
| ] | ||
|  | ||
| # -- HTML Configuration ------------------------------------------------- | ||
|  | ||
| html_theme = "alabaster" | ||
| html_theme_options = { | ||
| "logo": "pinecone-logo.svg", | ||
| "description": "Pinecone Python SDK", | ||
| "github_user": "pinecone-io", | ||
| "github_repo": "pinecone-python-client", | ||
| "github_button": True, | ||
| "fixed_sidebar": True, | ||
| "page_width": "1140px", | ||
| "sidebar_width": "300px", | ||
| "show_related": False, | ||
| "show_powered_by": False, | ||
| "extra_nav_links": { | ||
| "Github Source": "https://github.com/pinecone-io/pinecone-python-client", | ||
| "Pinecone Home": "https://pinecone.io", | ||
| "Pinecone Docs": "https://docs.pinecone.io", | ||
| "Pinecone Console": "https://app.pinecone.io", | ||
| }, | ||
| } | 
  
    
      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
    
  
  
    
              
  
    
      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 | 
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Using your Pinecone index | ||
| # Vectors | ||
|  | ||
| ## Describe index statistics | ||
|  | ||
|  | ||
  
    
      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
    
  
  
    
              
              File renamed without changes
          
    
      
      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.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a minor atrocity, but for now it's the best way to work around sphinx's relatively narrow python version support. Poetry won't let me install it normally (and add it as a dev dependency in
pyproject.toml) because our library has a wider range of python version support thansphinx.