Skip to content

Commit

Permalink
Remove python pdoc documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh1nku committed Jul 26, 2024
1 parent 72a7112 commit 016534a
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 85 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,3 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Build Python documentation
working-directory: ./wrappers/python
run: |
pip install -r requirements-dev.txt
./generate_documentation.py
mkdir ../../docs/docs_built/python
mv docs/* ../../docs/docs_built/python
7 changes: 0 additions & 7 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Build Python documentation
working-directory: ./wrappers/python
run: |
pip install -r requirements-dev.txt
./generate_documentation.py
mkdir ../../docs/docs_built/python
mv docs/* ../../docs/docs_built/python
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Solrstice is a SolrCloud aware client library written in rust.
It also provides a wrapper to python.

Use the [Rust documentation](https://docs.rs/solrstice) or
the [Python documentation](https://sh1nku.github.io/solrstice/python) for more information.
the [Python documentation](https://pypi.org/project/solrstice/) for more information.

## Features

Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If the `blocking` feature is not provided, only async will work.
```bash
pip install solrstice
```
* [Python docs](https://sh1nku.github.io/solrstice/python)
* [Python docs](https://pypi.org/project/solrstice/)

## Getting started

Expand Down
1 change: 0 additions & 1 deletion wrappers/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Solrstice is a solr client library written in rust. With this wrapper you can use it in python.

Both asyncio and blocking clients are provided. All apis have type hints.
Documentation can be found at [sh1nku.github.io/solrstice/python](https://sh1nku.github.io/solrstice/python)

## Features

Expand Down
31 changes: 0 additions & 31 deletions wrappers/python/generate_documentation.py

This file was deleted.

32 changes: 22 additions & 10 deletions wrappers/python/solrstice/alias.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from typing import Dict, List
from typing import TYPE_CHECKING, Dict, List

from solrstice import SolrServerContext
if TYPE_CHECKING:
from solrstice import SolrServerContext

async def create_alias(
context: SolrServerContext, name: str, collections: List[str]
context: "SolrServerContext", name: str, collections: List[str]
) -> None:
"""
Create an alias for a collection on the Solr server
Expand All @@ -14,7 +15,7 @@ async def create_alias(
"""

def create_alias_blocking(
context: SolrServerContext, name: str, collections: List[str]
context: "SolrServerContext", name: str, collections: List[str]
) -> None:
"""
Create an alias for a collection on the Solr server
Expand All @@ -24,23 +25,23 @@ def create_alias_blocking(
:param collections: The collections to alias
"""

async def get_aliases(context: SolrServerContext) -> Dict[str, List[str]]:
async def get_aliases(context: "SolrServerContext") -> Dict[str, List[str]]:
"""
Get all aliases on the Solr server
:param context: The Solr server context
:return: A dictionary of aliases to collections
"""

def get_aliases_blocking(context: SolrServerContext) -> Dict[str, List[str]]:
def get_aliases_blocking(context: "SolrServerContext") -> Dict[str, List[str]]:
"""
Get all aliases on the Solr server
:param context: The Solr server context
:return: A dictionary of aliases to collections
"""

async def alias_exists(context: SolrServerContext, name: str) -> bool:
async def alias_exists(context: "SolrServerContext", name: str) -> bool:
"""
Check if an alias exists on the Solr server
Expand All @@ -49,7 +50,7 @@ async def alias_exists(context: SolrServerContext, name: str) -> bool:
:return: True if the alias exists, False otherwise
"""

def alias_exists_blocking(context: SolrServerContext, name: str) -> bool:
def alias_exists_blocking(context: "SolrServerContext", name: str) -> bool:
"""
Check if an alias exists on the Solr server
Expand All @@ -58,18 +59,29 @@ def alias_exists_blocking(context: SolrServerContext, name: str) -> bool:
:return: True if the alias exists, False otherwise
"""

async def delete_alias(context: SolrServerContext, name: str) -> None:
async def delete_alias(context: "SolrServerContext", name: str) -> None:
"""
Delete an alias from the Solr server
:param context: The Solr server context
:param name: The name of the alias to delete
"""

def delete_alias_blocking(context: SolrServerContext, name: str) -> None:
def delete_alias_blocking(context: "SolrServerContext", name: str) -> None:
"""
Delete an alias from the Solr server
:param context: The Solr server context
:param name: The name of the alias to delete
"""

__all__ = [
"create_alias",
"create_alias_blocking",
"get_aliases",
"get_aliases_blocking",
"alias_exists",
"alias_exists_blocking",
"delete_alias",
"delete_alias_blocking",
]
32 changes: 22 additions & 10 deletions wrappers/python/solrstice/collection.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from typing import List, Optional
from typing import TYPE_CHECKING, List, Optional

from solrstice import SolrServerContext
if TYPE_CHECKING:
from solrstice import SolrServerContext

async def create_collection(
context: SolrServerContext,
context: "SolrServerContext",
name: str,
config: str,
shards: Optional[int] = 1,
Expand All @@ -20,7 +21,7 @@ async def create_collection(
"""

def create_collection_blocking(
context: SolrServerContext,
context: "SolrServerContext",
name: str,
config: str,
shards: Optional[int] = 1,
Expand All @@ -36,23 +37,23 @@ def create_collection_blocking(
:param replication_factor: The replication factor to use.
"""

async def get_collections(context: SolrServerContext) -> List[str]:
async def get_collections(context: "SolrServerContext") -> List[str]:
"""
Get the list of collections on the Solr server.
:param context: The Solr server context.
:return: The list of collections on the Solr server.
"""

def get_collections_blocking(context: SolrServerContext) -> List[str]:
def get_collections_blocking(context: "SolrServerContext") -> List[str]:
"""
Get the list of collections on the Solr server.
:param context: The Solr server context.
:return: The list of collections on the Solr server.
"""

async def collection_exists(context: SolrServerContext, name: str) -> bool:
async def collection_exists(context: "SolrServerContext", name: str) -> bool:
"""
Check if a collection exists on the Solr server.
Expand All @@ -61,7 +62,7 @@ async def collection_exists(context: SolrServerContext, name: str) -> bool:
:return: True if the collection exists, False otherwise.
"""

def collection_exists_blocking(context: SolrServerContext, name: str) -> bool:
def collection_exists_blocking(context: "SolrServerContext", name: str) -> bool:
"""
Check if a collection exists on the Solr server.
Expand All @@ -70,18 +71,29 @@ def collection_exists_blocking(context: SolrServerContext, name: str) -> bool:
:return: True if the collection exists, False otherwise.
"""

async def delete_collection(context: SolrServerContext, name: str) -> None:
async def delete_collection(context: "SolrServerContext", name: str) -> None:
"""
Delete a config from the Solr server.
:param context: The Solr server context.
:param name: The name of the collection to delete.
"""

def delete_collection_blocking(context: SolrServerContext, name: str) -> None:
def delete_collection_blocking(context: "SolrServerContext", name: str) -> None:
"""
Delete a config from the Solr server.
:param context: The Solr server context.
:param name: The name of the collection to delete.
"""

__all__ = [
"create_collection",
"create_collection_blocking",
"get_collections",
"get_collections_blocking",
"collection_exists",
"collection_exists_blocking",
"delete_collection",
"delete_collection_blocking",
]
31 changes: 21 additions & 10 deletions wrappers/python/solrstice/config.pyi
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from os import PathLike
from typing import TYPE_CHECKING, List, Union

from solrstice import SolrServerContext

if TYPE_CHECKING:
from solrstice import SolrServerContext

Somepath = Union[PathLike[str], str]
else:
Somepath = Union[PathLike, str]

async def upload_config(
context: SolrServerContext, config_name: str, config_path: Somepath
context: "SolrServerContext", config_name: str, config_path: Somepath
) -> None:
"""Uploads a Solr config to a Solr instance
Expand All @@ -20,7 +20,7 @@ async def upload_config(
pass

def upload_config_blocking(
context: SolrServerContext, config_name: str, config_path: Somepath
context: "SolrServerContext", config_name: str, config_path: Somepath
) -> None:
"""Uploads a Solr config to a Solr instance
Expand All @@ -30,48 +30,59 @@ def upload_config_blocking(
"""
pass

async def delete_config(context: SolrServerContext, config_name: str) -> None:
async def delete_config(context: "SolrServerContext", config_name: str) -> None:
"""Deletes a Solr config from a Solr instance
:param context: SolrServerRequest context
:param config_name: Name of the config
"""
pass

def delete_config_blocking(context: SolrServerContext, config_name: str) -> None:
def delete_config_blocking(context: "SolrServerContext", config_name: str) -> None:
"""Deletes a Solr config from a Solr instance
:param context: SolrServerRequest context
:param config_name: Name of the config
"""
pass

async def config_exists(context: SolrServerContext, config_name: str) -> bool:
async def config_exists(context: "SolrServerContext", config_name: str) -> bool:
"""Checks if a Solr config exists on a Solr instance
:param context: SolrServerRequest context
:param config_name: Name of the config
"""
pass

def config_exists_blocking(context: SolrServerContext, config_name: str) -> bool:
def config_exists_blocking(context: "SolrServerContext", config_name: str) -> bool:
"""Checks if a Solr config exists on a Solr instance
:param context: SolrServerRequest context
:param config_name: Name of the config
"""
pass

async def get_configs(context: SolrServerContext) -> List[str]:
async def get_configs(context: "SolrServerContext") -> List[str]:
"""Gets a list of Solr configs on a Solr instance
:param context: SolrServerRequest context
"""
pass

def get_configs_blocking(context: SolrServerContext) -> List[str]:
def get_configs_blocking(context: "SolrServerContext") -> List[str]:
"""Gets a list of Solr configs on a Solr instance
:param context: SolrServerRequest builder
"""
pass

__all__ = [
"upload_config",
"upload_config_blocking",
"delete_config",
"delete_config_blocking",
"config_exists",
"config_exists_blocking",
"get_configs",
"get_configs_blocking",
]
Loading

0 comments on commit 016534a

Please sign in to comment.