Skip to content
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

Redo docs to acomodate factory refactor #247

Merged
merged 5 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions caveclient/frameworkclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def __new__(

Then:

- `client.annotation` is an `AnnotationClient` (see [client.annotation](../client_api/annotation.md))
- `client.auth` is an `AuthClient` (see [client.auth](../client_api/auth.md))
- `client.chunkedgraph` is a `ChunkedGraphClient` (see [client.chunkedgraph](../client_api/chunkedgraph.md))
- `client.info` is an `InfoServiceClient` (see [client.info](../client_api/info.md))
- `client.l2cache` is an `L2CacheClient` (see [client.l2cache](../client_api/l2cache.md))
- `client.materialize` is a `MaterializationClient` (see [client.materialize](../client_api/materialize.md))
- `client.skeleton` is a `SkeletonClient` (see [client.skeleton](../client_api/skeleton.md))
- `client.schema` is a `SchemaClient` (see [client.schema](../client_api/schema.md))
- `client.state` is a neuroglancer `JSONService` (see [client.state](../client_api/state.md))
- `client.annotation` is an `AnnotationClient` (see [client.annotation](../api/annotation.md))
- `client.auth` is an `AuthClient` (see [client.auth](../api/auth.md))
- `client.chunkedgraph` is a `ChunkedGraphClient` (see [client.chunkedgraph](../api/chunkedgraph.md))
- `client.info` is an `InfoServiceClient` (see [client.info](../api/info.md))
- `client.l2cache` is an `L2CacheClient` (see [client.l2cache](../api/l2cache.md))
- `client.materialize` is a `MaterializationClient` (see [client.materialize](../api/materialize.md))
- `client.skeleton` is a `SkeletonClient` (see [client.skeleton](../api/skeleton.md))
- `client.schema` is a `SchemaClient` (see [client.schema](../api/schema.md))
- `client.state` is a neuroglancer `JSONService` (see [client.state](../api/state.md))


All subclients are loaded lazily and share the same datastack name, server address, and auth tokens where used.
Expand Down Expand Up @@ -155,10 +155,10 @@ def __init__(

Then:

- `client.auth` is an `AuthClient` (see [client.auth](../client_api/auth.md))
- `client.info` is an `InfoServiceClient` (see [client.info](../client_api/info.md))
- `client.schema` is a `SchemaClient` (see [client.schema](../client_api/schema.md))
- `client.state` is a neuroglancer `JSONService` (see [client.state](../client_api/state.md))
- `client.auth` is an `AuthClient` (see [client.auth](../api/auth.md))
- `client.info` is an `InfoServiceClient` (see [client.info](../api/info.md))
- `client.schema` is a `SchemaClient` (see [client.schema](../api/schema.md))
- `client.state` is a neuroglancer `JSONService` (see [client.state](../api/state.md))

All subclients are loaded lazily and share the same datastack name, server address, and auth tokens (where used).

Expand Down Expand Up @@ -246,7 +246,7 @@ def server_address(self):
@property
def auth(self) -> AuthClient:
"""
A client for the auth service. See [client.auth](../client_api/auth.md) for more information.
A client for the auth service. See [client.auth](../api/auth.md) for more information.
"""
if self._auth is None:
self._auth = AuthClient(**self._auth_config)
Expand All @@ -255,7 +255,7 @@ def auth(self) -> AuthClient:
@property
def info(self) -> InfoServiceClient:
"""
A client for the info service. See [client.info](../client_api/info.md) for more information.
A client for the info service. See [client.info](../api/info.md) for more information.
"""
if self._info is None:
self._info = InfoServiceClient(
Expand All @@ -273,7 +273,7 @@ def info(self) -> InfoServiceClient:
@property
def state(self) -> JSONService:
"""
A client for the neuroglancer state service. See [client.state](../client_api/state.md)
A client for the neuroglancer state service. See [client.state](../api/state.md)
for more information.
"""
if self._state is None:
Expand All @@ -290,7 +290,7 @@ def state(self) -> JSONService:
@property
def schema(self) -> SchemaClient:
"""
A client for the EM Annotation Schemas service. See [client.schema](../client_api/schema.md)
A client for the EM Annotation Schemas service. See [client.schema](../api/schema.md)
for more information.
"""
if self._schema is None:
Expand Down Expand Up @@ -353,15 +353,15 @@ def __init__(

Then

- `client.annotation` is an `AnnotationClient` (see [client.annotation](../client_api/annotation.md))
- `client.auth` is an `AuthClient` (see [client.auth](../client_api/auth.md))
- `client.chunkedgraph` is a `ChunkedGraphClient` (see [client.chunkedgraph](../client_api/chunkedgraph.md))
- `client.info` is an `InfoServiceClient` (see [client.info](../client_api/info.md))
- `client.l2cache` is an `L2CacheClient` (see [client.l2cache](../client_api/l2cache.md))
- `client.materialize` is a `MaterializationClient` (see [client.materialize](../client_api/materialize.md))
- `client.skeleton` is a `SkeletonClient` (see [client.skeleton](../client_api/skeleton.md))
- `client.schema` is a `SchemaClient` (see [client.schema](../client_api/schema.md))
- `client.state` is a neuroglancer `JSONService` (see [client.state](../client_api/state.md))
- `client.annotation` is an `AnnotationClient` (see [client.annotation](../api/annotation.md))
- `client.auth` is an `AuthClient` (see [client.auth](../api/auth.md))
- `client.chunkedgraph` is a `ChunkedGraphClient` (see [client.chunkedgraph](../api/chunkedgraph.md))
- `client.info` is an `InfoServiceClient` (see [client.info](../api/info.md))
- `client.l2cache` is an `L2CacheClient` (see [client.l2cache](../api/l2cache.md))
- `client.materialize` is a `MaterializationClient` (see [client.materialize](../api/materialize.md))
- `client.skeleton` is a `SkeletonClient` (see [client.skeleton](../api/skeleton.md))
- `client.schema` is a `SchemaClient` (see [client.schema](../api/schema.md))
- `client.state` is a neuroglancer `JSONService` (see [client.state](../api/state.md))

All subclients are loaded lazily and share the same datastack name, server address, and auth tokens where used.

Expand Down Expand Up @@ -478,7 +478,7 @@ def datastack_name(self) -> str:
@property
def chunkedgraph(self) -> ChunkedGraphClient:
"""
A client for the chunkedgraph service. See [client.chunkedgraph](../client_api/chunkedgraph.md)
A client for the chunkedgraph service. See [client.chunkedgraph](../api/chunkedgraph.md)
for more information.
"""
if self._chunkedgraph is None:
Expand All @@ -499,7 +499,7 @@ def chunkedgraph(self) -> ChunkedGraphClient:
@property
def annotation(self) -> AnnotationClient:
"""
A client for the annotation service. See [client.annotation](../client_api/annotation.md)
A client for the annotation service. See [client.annotation](../api/annotation.md)
for more information.
"""
if self._annotation is None:
Expand All @@ -517,7 +517,7 @@ def annotation(self) -> AnnotationClient:
@property
def materialize(self) -> MaterializationClient:
"""
A client for the materialization service. See [client.materialize](../client_api/materialize.md)
A client for the materialization service. See [client.materialize](../api/materialize.md)
for more information.
"""
if self._materialize is None:
Expand All @@ -537,7 +537,7 @@ def materialize(self) -> MaterializationClient:
@property
def skeleton(self) -> SkeletonClient:
"""
A client for the skeleton service. See [client.skeleton](../client_api/skeleton.md)
A client for the skeleton service. See [client.skeleton](../api/skeleton.md)
for more information.
"""
if self._skeleton is None:
Expand All @@ -555,7 +555,7 @@ def skeleton(self) -> SkeletonClient:
@property
def state(self) -> JSONService:
"""
A client for the neuroglancer state service. See [client.state](../client_api/state.md)
A client for the neuroglancer state service. See [client.state](../api/state.md)
for more information.
"""
if self._state is None:
Expand All @@ -573,7 +573,7 @@ def state(self) -> JSONService:
@property
def l2cache(self) -> L2CacheClient:
"""
A client for the L2 cache service. See [client.l2cache](../client_api/l2cache.md)
A client for the L2 cache service. See [client.l2cache](../api/l2cache.md)
for more information.
"""
if self._l2cache is None:
Expand Down
23 changes: 13 additions & 10 deletions caveclient/skeletonservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,22 @@ def get_skeleton(
skeleton_version : int
The skeleton version to generate and retrieve. Options are documented in SkeletonService. Use 0 for latest.
output_format : string
The format to retrieve. Options are 'none', 'h5', 'swc', 'json', 'arrays', 'precomputed'
The format to retrieve. Options are:

- 'none': No return value (this can be used to generate a skeleton without retrieving it)
- 'precomputed': A cloudvolume.Skeleton object
- 'json': A dictionary
- 'jsoncompressed': A dictionary using compression for transmission (generally faster than 'json')
- 'arrays': A dictionary (literally a subset of the json response)
- 'arrayscompressed': A dictionary using compression for transmission (generally faster than 'arrays')
- 'swc': A pandas DataFrame
- 'h5': An BytesIO object containing bytes for an h5 file

Returns
-------
The return type will vary greatly depending on the output_format parameter. The options are:
- 'none': No return value (this can be used to generate a skeleton without retrieving it)
- 'precomputed': A cloudvolume.Skeleton object
- 'json': A dictionary
- 'jsoncompressed': A dictionary using compression for transmission (generally faster than 'json')
- 'arrays': A dictionary (literally a subset of the json response)
- 'arrayscompressed': A dictionary using compression for transmission (generally faster than 'arrays')
- 'swc': A pandas DataFrame
- 'h5': An BytesIO object containing bytes for an h5 file
:
Skeleton of the requested type. See `output_format` for details.

"""
if not self.fc.l2cache.has_cache():
raise NoL2CacheException("SkeletonClient requires an L2Cache.")
Expand Down
8 changes: 8 additions & 0 deletions docs/api/annotation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: client.annotation
---

::: caveclient.annotationengine.AnnotationClient
options:
heading_level: 2
show_bases: false
File renamed without changes.
9 changes: 9 additions & 0 deletions docs/api/chunkedgraph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: client.chunkedgraph
---

::: caveclient.chunkedgraph.ChunkedGraphClient
options:
heading_level: 2
show_bases: false
members_order: source
3 changes: 1 addition & 2 deletions docs/client_api/client.md → docs/api/client.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: CAVEclient
title: caveclient.CAVEclient
---

::: caveclient.frameworkclient.CAVEclientFull
options:
show_bases: false

File renamed without changes.
7 changes: 7 additions & 0 deletions docs/api/datastack_lookup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Datastack lookup
---

::: caveclient.datastack_lookup.reset_server_address_cache
options:
show_root_heading: true
9 changes: 4 additions & 5 deletions docs/client_api/index.md → docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ The most common method of interacting with the CAVE Framework is by instantiatin
client (`caveclient.CAVEclient`) and then using that client to interact with various
services. Under the hood, the CAVEclient is a collection of individual clients, which
can be accessed via properties. For example, to access the materialization client,
you can use `client.materialize`, which (up to the exact version) will actually return a
[caveclient.materializationengine.MaterializationClientV3][] object.
you can use `client.materialize`, which (up to the exact version) will actually return a `MaterializationClient` object.

These pages describe the functionality of each of the individual clients, assuming
that you are using the most up-to-date version of each. For more detailed information
on all versions of all clients available, visit the [extended API documentation](../extended_api/index.md).
These pages describe the functionality of each of the individual clients, but note that
some features may not be available if the server you are accessing is using older versions
of particular services.
8 changes: 8 additions & 0 deletions docs/api/info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: client.info
---

::: caveclient.infoservice.InfoServiceClient
options:
heading_level: 2
show_bases: false
8 changes: 8 additions & 0 deletions docs/api/l2cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: client.l2cache
---

::: caveclient.l2cache.L2CacheClient
options:
heading_level: 2
show_bases: false
8 changes: 8 additions & 0 deletions docs/api/materialize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: client.materialize
---

::: caveclient.materializationengine.MaterializationClient
options:
heading_level: 2
show_bases: false
2 changes: 1 addition & 1 deletion docs/client_api/schema.md → docs/api/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: client.schema
---

::: caveclient.emannotationschemas.SchemaClientLegacy
::: caveclient.emannotationschemas.SchemaClient
options:
heading_level: 2
show_bases: false
9 changes: 9 additions & 0 deletions docs/api/skeleton.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: client.skeleton
---

::: caveclient.skeletonservice.SkeletonClient
options:
heading_level: 2
show_bases: false
members: ['server_version', 'get_skeleton']
8 changes: 8 additions & 0 deletions docs/api/state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: client.state
---

::: caveclient.jsonservice.JSONService
options:
heading_level: 2
show_bases: false
Loading
Loading