Skip to content

Commit

Permalink
docs: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
thorbjoernl committed Sep 3, 2024
1 parent df6e599 commit 980b49a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 39 deletions.
64 changes: 33 additions & 31 deletions src/aerovaldb/aerovaldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def get_glob_stats(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -193,7 +193,7 @@ async def get_heatmap(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -253,9 +253,9 @@ async def get_contour(
:param access_type: How the data is to be retrieved (See AccessType for details)
:param cache: Whether to use cache for this read.
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
if no data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -311,9 +311,9 @@ async def get_timeseries(
:param access_type: How the data is to be retrieved (See AccessType for details)
:param cache: Whether to use cache for this read.
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
if no data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -391,7 +391,7 @@ async def get_timeseries_weekly(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -443,7 +443,7 @@ async def get_experiments(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -492,7 +492,7 @@ async def get_config(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -531,7 +531,7 @@ async def get_menu(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -569,7 +569,7 @@ async def get_statistics(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -609,7 +609,7 @@ async def get_ranges(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -647,7 +647,7 @@ async def get_regions(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -685,7 +685,7 @@ async def get_models_style(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -737,7 +737,7 @@ async def get_map(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -824,7 +824,7 @@ async def get_scatter(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -888,7 +888,7 @@ async def get_profiles(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -948,7 +948,7 @@ async def get_heatmap_timeseries(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -1010,7 +1010,7 @@ async def get_forecast(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -1068,7 +1068,7 @@ async def get_gridded_map(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -1120,7 +1120,7 @@ async def get_report(
:param default: Default value that will be returned instead of raising FileNotFoundError
if not data was found (Will be returned as is and not converted to match access_type).
:returns The fetched data.
:returns : The fetched data.
"""
raise NotImplementedError

Expand Down Expand Up @@ -1158,9 +1158,11 @@ async def get_by_uri(
Note:
-----
URI is intended to be consistent between implementations. Using get_by_uri()
URI is intended to be consistent between implementations but not between
versions of aerovaldb. Using :meth:`aerovaldb.AerovalDB.get_by_uri`
to fetch an identifier which can then be written to another connector using
its respective put_by_uri() method.
its respective :meth:`aerovaldb.AerovalDB.put_by_uri` method is a supported
use case.
"""
raise NotImplementedError

Expand All @@ -1174,9 +1176,11 @@ async def put_by_uri(self, obj, uri: str):
Note:
-----
URI is intended to be consistent between implementations. Using get_by_uri()
URI is intended to be consistent between implementations but not between
versions of aerovaldb. Using :meth:`aerovaldb.AerovalDB.get_by_uri`
to fetch an identifier which can then be written to another connector using
its respective put_by_uri() method.
its respective :meth:`aerovaldb.AerovalDB.put_by_uri` method is a supported
use case.
"""
raise NotImplementedError

Expand All @@ -1185,7 +1189,7 @@ def lock(self):
between instances of aerovaldb. Intended to be used as a context
manager.
See also: https://aerovaldb.readthedocs.io/en/latest/locking.html
See also: `Locking <https://aerovaldb.readthedocs.io/en/latest/locking.html>`_
"""
raise NotImplementedError

Expand Down Expand Up @@ -1217,12 +1221,10 @@ def _normalize_access_type(

@async_and_sync
async def list_all(self, access_type: str | AccessType = AccessType.URI):
"""Iterator to list over the URI of each object
stored in the current aerovaldb connection, returning
the URI of each.
"""Returns a list of identifiers for each object stored in the database
:param access_type : What to return (This is implementation specific, but in general
each implementation should support URI).
:param access_type : What to return (This is implementation specific, but
in general each implementation should support URI, some may support FILE_PATH).
:raises : UnsupportedOperation
For non-supported acces types.
"""
Expand Down
20 changes: 12 additions & 8 deletions src/aerovaldb/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@ def open(resource, /, use_async: bool = False) -> AerovalDB:
"""open an AerovalDB directly, sending args and kwargs
directly to the `AervoalDB()` function
:param resource: the resource-name for the database. The resource can be
- 'entrypoint:path', with path being the location where the database should be generated
(eg. 'json_files:.')
- 'path', with path containing either an aerovaldb.cfg (Not yet implemented) configuration
or path being a json_files dabasase (for example, '.' is equivalent to 'json_files:.')
:param use_async : If true, aiofile will be used to read files, otherwise files will be read
synchronously.
:return: an implementation-object of AerovalDB openend to a location
:param resource: the resource-identifier for the database. The resource can be
- 'entrypoint:path', with entrypoint being the type of database connection
(eg. 'json_files' or 'sqlitedb') being the location where the database is
located (eg. 'json_files:.')
- 'path', a path to a json_files folder or sqlite file.
- ':memory:' an sqlite in-memory database. Contents are not persistently
stored!
:param use_async : If true, aiofile will be used to read files, otherwise
files will be read synchronously (Currently only used by json_files).
:return : an implementation-object of AerovalDB openend and initialized to a
location.
"""
if resource == ":memory:":
# Special case for sqlite in memory database.
Expand Down
3 changes: 3 additions & 0 deletions src/aerovaldb/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ class AccessType(Enum):
and returned.
JSON_STR: Result will be returned as an unparsed json string.
FILE_PATH: Result will be returned as the file path to the file
containing the data.
OBJ: The json will be parsed and returned as a python object.
URI: A string which is a unique identifier of this asset between
implementations of Aerovaldb. Can be used with `get_by_uuid()` and
`put_by_uuid()` to read or write respectively.
Expand Down

0 comments on commit 980b49a

Please sign in to comment.