Skip to content

Commit

Permalink
Small doc fixes (#248)
Browse files Browse the repository at this point in the history
* more small fixes

* formatting
  • Loading branch information
bdpedigo authored Oct 14, 2024
1 parent 4aedafd commit bf00581
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 78 deletions.
65 changes: 32 additions & 33 deletions caveclient/annotationengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,7 @@


class AnnotationClient(ClientBase):
"""
Client for interacting with the annotation engine.
Parameters
----------
server_address : str
server_address to use to connect to (i.e. https://minniev1.microns-daf.com)
aligned_volume_name : str
Name of the aligned volume to use.
auth_client : AuthClient or None, optional
Authentication client to use to connect to server. If None, do not use
authentication.
api_version : str or int (default: latest)
What version of the api to use, 0: Legacy client (i.e www.dynamicannotationframework.com)
2: new api version, (i.e. minniev1.microns-daf.com)
'latest': default to the most recent (current 2)
verify : str (default : True)
Whether to verify https
max_retries : Int or None, optional
Set the number of retries per request, by default None. If None, defaults to
requests package default.
pool_block : Bool or None, optional
If True, restricts pool of threads to max size, by default None. If None,
defaults to requests package default.
pool_maxsize : Int or None, optional
Sets the max number of threads in the pool, by default None. If None, defaults
to requests package default.
over_client:
Client to overwrite configuration with.
schema_client:
Client to use to get schema information. If None, uses the `over_client`'s
schema client.
"""
"""Client for interacting with the annotation engine."""

def __init__(
self,
Expand All @@ -60,6 +28,37 @@ def __init__(
over_client=None,
schema_client=None,
):
"""
Parameters
----------
server_address : str
server_address to use to connect to (i.e. https://minniev1.microns-daf.com)
aligned_volume_name : str
Name of the aligned volume to use.
auth_client : AuthClient or None, optional
Authentication client to use to connect to server. If None, do not use
authentication.
api_version : str or int (default: latest)
What version of the api to use, 0: Legacy client (i.e www.dynamicannotationframework.com)
2: new api version, (i.e. minniev1.microns-daf.com)
'latest': default to the most recent (current 2)
verify : str (default : True)
Whether to verify https
max_retries : Int or None, optional
Set the number of retries per request, by default None. If None, defaults to
requests package default.
pool_block : Bool or None, optional
If True, restricts pool of threads to max size, by default None. If None,
defaults to requests package default.
pool_maxsize : Int or None, optional
Sets the max number of threads in the pool, by default None. If None, defaults
to requests package default.
over_client:
Client to overwrite configuration with.
schema_client:
Client to use to get schema information. If None, uses the `over_client`'s
schema client.
"""
if auth_client is None:
auth_client = AuthClient()
auth_header = auth_client.request_header
Expand Down
4 changes: 3 additions & 1 deletion caveclient/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def server_token_filename(server_address):


class AuthClient(object):
"""Client to find and use auth tokens to access the other services."""

def __init__(
self,
token_file=None,
Expand All @@ -61,7 +63,7 @@ def __init__(
server_address=default_global_server_address,
local_server=None,
):
"""Client to find and use auth tokens to access the dynamic annotation framework services.
"""
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion caveclient/chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def root_id_int_list_check(


class ChunkedGraphClient(ClientBase):
"""ChunkedGraph Client for the v1 API"""
"""Client for interacting with the chunkedgraph."""

def __init__(
self,
Expand Down
2 changes: 2 additions & 0 deletions caveclient/emannotationschemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@


class SchemaClient(ClientBase):
"""Client for interacting with the schema service."""

def __init__(
self,
server_address=None,
Expand Down
2 changes: 2 additions & 0 deletions caveclient/infoservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@


class InfoServiceClient(ClientBaseWithDatastack):
"""Client for interacting with the info service."""

def __init__(
self,
server_address=None,
Expand Down
34 changes: 17 additions & 17 deletions caveclient/jsonservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,7 @@ def neuroglancer_json_encoder(obj):


class JSONService(ClientBase):
"""Client to interface with the JSON state service.
Parameters
----------
server_address : str, optional
URL to the JSON state server.
If None, set to the default global server address.
By default None.
auth_client : An Auth client, optional
An auth client with a token for the same global server, by default None
api_version : int or 'latest', optional
Which endpoint API version to use or 'latest'. By default, 'latest' tries to ask
the server for which versions are available, if such functionality exists, or if not
it defaults to the latest version for which there is a client. By default 'latest'
ngl_url : str or None, optional
Default neuroglancer deployment URL. Only used for V1 and later.
"""
"""Client to interface with the JSON state service."""

def __init__(
self,
Expand All @@ -69,6 +53,22 @@ def __init__(
pool_block=None,
over_client=None,
):
"""
Parameters
----------
server_address : str, optional
URL to the JSON state server.
If None, set to the default global server address.
By default None.
auth_client : An Auth client, optional
An auth client with a token for the same global server, by default None
api_version : int or 'latest', optional
Which endpoint API version to use or 'latest'. By default, 'latest' tries to ask
the server for which versions are available, if such functionality exists, or if not
it defaults to the latest version for which there is a client. By default 'latest'
ngl_url : str or None, optional
Default neuroglancer deployment URL. Only used for V1 and later.
"""
if server_address is None:
server_address = default_global_server_address

Expand Down
2 changes: 2 additions & 0 deletions caveclient/l2cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@


class L2CacheClient(ClientBase):
"""Client for interacting with the level2 cache service."""

def __init__(
self,
server_address=None,
Expand Down
48 changes: 24 additions & 24 deletions caveclient/materializationengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,30 +152,7 @@ def _tables_metadata_key(matclient, *args, **kwargs):


class MaterializationClient(ClientBase):
"""Client for interacting with the materialization engine
Parameters
----------
server_address : str
server_address to use to connect to (i.e. https://minniev1.microns-daf.com)
datastack_name : str
Name of the datastack.
auth_client : AuthClient or None, optional
Authentication client to use to connect to server. If None, do not use authentication.
api_version : str or int (default: latest)
What version of the api to use, 0: Legacy client (i.e www.dynamicannotationframework.com)
2: new api version, (i.e. minniev1.microns-daf.com)
'latest': default to the most recent (current 2)
cg_client: caveclient.chunkedgraph.ChunkedGraphClient
chunkedgraph client for live materializations
synapse_table: str
default synapse table for queries
version : default version to query
if None will default to latest version
desired_resolution : Iterable[float] or None, optional
If given, should be a list or array of the desired resolution you want queries returned in
useful for materialization queries.
"""
"""Client for interacting with the materialization engine."""

def __init__(
self,
Expand All @@ -193,6 +170,29 @@ def __init__(
desired_resolution=None,
over_client=None,
):
"""
Parameters
----------
server_address : str
server_address to use to connect to (i.e. https://minniev1.microns-daf.com)
datastack_name : str
Name of the datastack.
auth_client : AuthClient or None, optional
Authentication client to use to connect to server. If None, do not use authentication.
api_version : str or int (default: latest)
What version of the api to use, 0: Legacy client (i.e www.dynamicannotationframework.com)
2: new api version, (i.e. minniev1.microns-daf.com)
'latest': default to the most recent (current 2)
cg_client: caveclient.chunkedgraph.ChunkedGraphClient
chunkedgraph client for live materializations
synapse_table: str
default synapse table for queries
version : default version to query
if None will default to latest version
desired_resolution : Iterable[float] or None, optional
If given, should be a list or array of the desired resolution you want queries returned in
useful for materialization queries.
"""
if auth_client is None:
auth_client = AuthClient()

Expand Down
2 changes: 2 additions & 0 deletions caveclient/skeletonservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def __init__(self, value=""):


class SkeletonClient(ClientBase):
"""Client for interacting with the skeleton service."""

def __init__(
self,
server_address: str,
Expand Down
5 changes: 5 additions & 0 deletions docs/api/annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ title: client.annotation
options:
heading_level: 2
show_bases: false
filters: ["!__init__"]
docstring_options:
ignore_init_summary: false
merge_init_into_class: false
<!-- show_docstring_parameters: false -->
1 change: 1 addition & 0 deletions docs/api/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ title: caveclient.CAVEclient
::: caveclient.frameworkclient.CAVEclientFull
options:
show_bases: false
merge_init_into_class: true
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ plugins:
docstring_section_style: table # list, table, spacy
docstring_options:
ignore_init_summary: false
merge_init_into_class: true
merge_init_into_class: false
allow_section_blank_line: false
show_root_heading: false
show_root_toc_entry: false
Expand All @@ -127,7 +127,7 @@ plugins:
heading_level: 2
inherited_members: true
# members: none
filters: ["!^_[^_]", "!.*(raise_for_status).*"]
filters: ["!^_[^_]", "!.*(raise_for_status).*", "!__init__"]
- macros
- autorefs
# - section-index
Expand Down

0 comments on commit bf00581

Please sign in to comment.