From 51924686c994f1e66508b2b4a3efdb04a139bc1f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 18:56:26 +0000 Subject: [PATCH] Deploy to GitHub pages --- .buildinfo | 4 + .nojekyll | 0 _modules/index.html | 107 ++ _modules/sxapi/base.html | 254 +++++ _modules/sxapi/cli/cli.html | 255 +++++ _modules/sxapi/cli/credentials.html | 198 ++++ .../sxapi/cli/subparser/get_sensor_data.html | 193 ++++ _modules/sxapi/cli/subparser/token.html | 299 ++++++ _modules/sxapi/publicV2/sensordata.html | 155 +++ _sources/api/modules.rst.txt | 7 + _sources/api/sxapi.cli.rst.txt | 37 + _sources/api/sxapi.cli.subparser.rst.txt | 23 + _sources/api/sxapi.publicV2.rst.txt | 15 + _sources/api/sxapi.rst.txt | 30 + _sources/authors.rst.txt | 2 + _sources/changelog.rst.txt | 2 + _sources/contributing.rst.txt | 1 + _sources/index.rst.txt | 61 ++ _sources/license.rst.txt | 7 + _sources/readme.rst.txt | 2 + _static/alabaster.css | 703 +++++++++++++ _static/basic.css | 925 ++++++++++++++++++ _static/custom.css | 1 + _static/doctools.js | 156 +++ _static/documentation_options.js | 13 + _static/file.png | Bin 0 -> 286 bytes _static/language_data.js | 199 ++++ _static/minus.png | Bin 0 -> 90 bytes _static/plus.png | Bin 0 -> 90 bytes _static/pygments.css | 75 ++ _static/searchtools.js | 574 +++++++++++ _static/sphinx_highlight.js | 154 +++ api/modules.html | 159 +++ api/sxapi.cli.html | 231 +++++ api/sxapi.cli.subparser.html | 213 ++++ api/sxapi.html | 247 +++++ api/sxapi.publicV2.html | 128 +++ authors.html | 116 +++ changelog.html | 120 +++ contributing.html | 367 +++++++ genindex.html | 383 ++++++++ index.html | 162 +++ license.html | 298 ++++++ objects.inv | Bin 0 -> 859 bytes py-modindex.html | 166 ++++ readme.html | 129 +++ search.html | 125 +++ searchindex.js | 1 + 48 files changed, 7297 insertions(+) create mode 100644 .buildinfo create mode 100644 .nojekyll create mode 100644 _modules/index.html create mode 100644 _modules/sxapi/base.html create mode 100644 _modules/sxapi/cli/cli.html create mode 100644 _modules/sxapi/cli/credentials.html create mode 100644 _modules/sxapi/cli/subparser/get_sensor_data.html create mode 100644 _modules/sxapi/cli/subparser/token.html create mode 100644 _modules/sxapi/publicV2/sensordata.html create mode 100644 _sources/api/modules.rst.txt create mode 100644 _sources/api/sxapi.cli.rst.txt create mode 100644 _sources/api/sxapi.cli.subparser.rst.txt create mode 100644 _sources/api/sxapi.publicV2.rst.txt create mode 100644 _sources/api/sxapi.rst.txt create mode 100644 _sources/authors.rst.txt create mode 100644 _sources/changelog.rst.txt create mode 100644 _sources/contributing.rst.txt create mode 100644 _sources/index.rst.txt create mode 100644 _sources/license.rst.txt create mode 100644 _sources/readme.rst.txt create mode 100644 _static/alabaster.css create mode 100644 _static/basic.css create mode 100644 _static/custom.css create mode 100644 _static/doctools.js create mode 100644 _static/documentation_options.js create mode 100644 _static/file.png create mode 100644 _static/language_data.js create mode 100644 _static/minus.png create mode 100644 _static/plus.png create mode 100644 _static/pygments.css create mode 100644 _static/searchtools.js create mode 100644 _static/sphinx_highlight.js create mode 100644 api/modules.html create mode 100644 api/sxapi.cli.html create mode 100644 api/sxapi.cli.subparser.html create mode 100644 api/sxapi.html create mode 100644 api/sxapi.publicV2.html create mode 100644 authors.html create mode 100644 changelog.html create mode 100644 contributing.html create mode 100644 genindex.html create mode 100644 index.html create mode 100644 license.html create mode 100644 objects.inv create mode 100644 py-modindex.html create mode 100644 readme.html create mode 100644 search.html create mode 100644 searchindex.js diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 0000000..9b1cc65 --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 7b6d15ea29cbfe9c00587b91cc29979b +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 0000000..cc2f2e0 --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,107 @@ + + + + + + + Overview: module code — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+ +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/_modules/sxapi/base.html b/_modules/sxapi/base.html new file mode 100644 index 0000000..d83b1a9 --- /dev/null +++ b/_modules/sxapi/base.html @@ -0,0 +1,254 @@ + + + + + + + sxapi.base — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for sxapi.base

+#!/usr/bin/python
+# coding: utf8
+
+from enum import Enum
+
+import requests
+
+PUBLIC_API_V2_BASE_URL = "https://api.smaxtec.com/api/v2"
+INTEGRATION_API_V2_BASE_URL = "https://api.smaxtec.com/integration/v2"
+
+
+
+[docs] +class ApiTypes(Enum): + PUBLIC = 1 + INTEGRATION = 2
+ + + +
+[docs] +class BaseAPI(object): + def __init__( + self, + base_url, + email=None, + password=None, + api_token=None, + api_type=None, + ): + """Initialize a new base low level API client instance.""" + self.api_base_url = base_url.rstrip("/") + self.email = email + self.password = password + self.api_token = api_token + self.api_type = api_type + self._session = None + +
+[docs] + def get_token(self): + if self.api_token is None: + self.session + return self.api_token
+ + + @property + def session(self): + """ + Geneates a new HTTP session on the fly and logs in if no session exists. + """ + if self._session is None: + self._session = requests.Session() + self._login() + return self._session + +
+[docs] + def to_url(self, path): + return f"{self.api_base_url}{path}"
+ + + def _login(self): + """ + Login to the api with api key or the given credentials. + """ + if self.api_token is not None: + self._session.headers.update({"Authorization": f"Bearer {self.api_token}"}) + else: + params = {"user": self.email, "password": self.password} + response = requests.Response + if self.api_type == ApiTypes.PUBLIC: + response = self._session.post( + self.to_url("/users/credentials"), params=params + ) + self.api_token = response.json().get("api_token", None) + elif self.api_type == ApiTypes.INTEGRATION: + response = self._session.post( + self.to_url("/users/session_token"), params=params + ) + self.api_token = response.json().get("token", None) + if self.api_token is None: + raise requests.HTTPError(response.status_code, response.reason) + self._session.headers.update({"Authorization": f"Bearer {self.api_token}"}) + +
+[docs] + def get(self, path, *args, **kwargs): + url = self.to_url(path) + r = self.session.get(url, *args, **kwargs) + return r.json()
+ + +
+[docs] + def post(self, path, *args, **kwargs): + url = self.to_url(path) + r = self.session.post(url, *args, allow_redirects=False, **kwargs) + return r.json()
+ + +
+[docs] + def put(self, path, *args, **kwargs): + url = self.to_url(path) + r = self.session.put(url, *args, allow_redirects=False, **kwargs) + return r.json()
+ + +
+[docs] + def delete(self, path, *args, **kwargs): + url = self.to_url(path) + r = self.session.delete(url, *args, **kwargs) + return r.json()
+
+ + + +
+[docs] +class PublicAPIV2(BaseAPI): + def __init__(self, base_url=None, email=None, password=None, api_token=None): + """Initialize a new public api client instance.""" + base_url = base_url or PUBLIC_API_V2_BASE_URL + api_type = ApiTypes.PUBLIC + super().__init__( + base_url, + email=email, + password=password, + api_token=api_token, + api_type=api_type, + )
+ + + +
+[docs] +class IntegrationAPIV2(BaseAPI): + def __init__(self, base_url=None, email=None, password=None, api_token=None): + """Initialize a new integration api client instance.""" + base_url = base_url or INTEGRATION_API_V2_BASE_URL + api_type = ApiTypes.INTEGRATION + super().__init__( + base_url, + email=email, + password=password, + api_token=api_token, + api_type=api_type, + )
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/_modules/sxapi/cli/cli.html b/_modules/sxapi/cli/cli.html new file mode 100644 index 0000000..f7c31e2 --- /dev/null +++ b/_modules/sxapi/cli/cli.html @@ -0,0 +1,255 @@ + + + + + + + sxapi.cli.cli — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for sxapi.cli.cli

+import argparse
+import os
+import sys
+
+from setuptools import setup
+
+from sxapi.base import (
+    IntegrationAPIV2,
+    PublicAPIV2,
+)
+from sxapi.cli import user_credentials
+from sxapi.cli.subparser.get_sensor_data import create_gsd_parser
+from sxapi.cli.subparser.token import create_token_parser
+
+
+
+[docs] +class Cli: + """CLI class for handling arguments and calling the API.""" + + def __init__(self): + self.public_api = None + self.integration_api = None + +
+[docs] + @staticmethod + def api_status(): + """ + Print online status of api/v2 and integration/v2 + """ + + # TODO: this part is just a hacky trick, this should be moved + # when its finalized where to locate them!!! + email = os.environ.get("SMAXTEC_USER") + password = os.environ.get("SMAXTEC_PASSWORD") + api_token = os.environ.get("SMAXTEC_TOKEN") + + public_api = PublicAPIV2(email=email, password=password, api_token=api_token) + integration_api = IntegrationAPIV2( + email=email, password=password, api_token=api_token + ) + # hacky part end + + pub_resp = public_api.get("/service/status") + int_resp = integration_api.get("/service/status") + + exit_code = 0 + + if not (pub_resp["result"] == "ok" and int_resp["result"] == "ok"): + exit_code = 1 + + print(f"PublicV2 status: {pub_resp['result']}") + print(f"IntegrationV2 status: {int_resp['result']}") + + exit(exit_code)
+ + +
+[docs] + @staticmethod + def version_info(): + """Print version info.""" + setup(use_scm_version={"version_scheme": "no-guess-dev"})
+ + +
+[docs] + @staticmethod + def parse_args(args): + """ + Parse arguments from the CLI and initializes subparsers. + """ + main_parser = argparse.ArgumentParser( + description=( + "Issue calls to the smaXtec system API to import and export data." + ) + ) + main_parser.add_argument( + "--version", + action="store_true", + default=False, + help="print version info and exit.", + ) + + main_parser.add_argument( + "--status", + action="store_true", + default=False, + help="prints status of api/V2 and integration/v2", + ) + + main_parser.add_argument( + "-t", + "--arg_token", + type=str, + help="Access Token", + ) + main_parser.add_argument( + "-k", + "--use_keyring", + action="store_true", + help="Use keyring as token source!", + ) + + # gsd_parser + subparsers = main_parser.add_subparsers(help="sub-command help") + create_gsd_parser(subparsers) + create_token_parser(subparsers) + + if not args: + main_parser.print_help() + return + return main_parser.parse_args(args)
+ + +
+[docs] + def run(self): + """Call sxapi functions based on passed arguments.""" + args = self.parse_args(sys.argv[1:]) + if not args: + return 0 + + if args.status: + self.api_status() + + if args.version: + self.version_info() + + if args.use_keyring and args.arg_token: + print("Choose either -k (keyring), -t (argument) or no flag (environment)!") + return + + if args.use_keyring: + user_credentials.token = user_credentials.get_token_keyring() + elif args.arg_token: + user_credentials.token = args.arg_token + + # run set_defaults for subparser + if hasattr(args, "func"): + args.func(args)
+
+ + + +
+[docs] +def cli_run(): + """Start CLI""" + Cli().run()
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/_modules/sxapi/cli/credentials.html b/_modules/sxapi/cli/credentials.html new file mode 100644 index 0000000..300af84 --- /dev/null +++ b/_modules/sxapi/cli/credentials.html @@ -0,0 +1,198 @@ + + + + + + + sxapi.cli.credentials — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for sxapi.cli.credentials

+import os
+
+import keyring
+
+
+
+[docs] +class UserCredentials: + """ + Credentials class used for initializing, storing, retrieving and deleting + credentials. + + This class should only be used in the cli_tests package. + """ + + def __init__(self): + """ + Basic User Credentials Constructor + + calls self._init_creds() to set available credentials on startup. + """ + + self.token_env_names = "SMAXTEC_TOKEN" + self.token = None + + self._init_creds() + +
+[docs] + def get_token_environment(self): + """ + Gets token named 'SMAXTEC_TOKEN' from the systems environment. + """ + + return os.environ.get("SMAXTEC_TOKEN", None)
+ + +
+[docs] + def set_token_keyring(self, token): + """ + Store the given token in keyring. + """ + keyring.set_password("sxapi", "SMAXTEC_TOKEN", token) + self.token = token
+ + +
+[docs] + def get_token_keyring(self): + """ + Gets the token stored in the keyring. + """ + return keyring.get_password("sxapi", "SMAXTEC_TOKEN")
+ + +
+[docs] + def clear_token_keyring(self): + """ + Deletes the token from the keyring. + """ + keyring.delete_password("sxapi", "SMAXTEC_TOKEN")
+ + + # general functions +
+[docs] + def check_credentials_set(self): + """ + Checks if token is already set. + """ + if self.token is not None: + return True + return False
+ + + def _init_creds(self): + """ + This function tries to get the token from the system environment and + stores it in self.token, on failure (no token found) it does the same + with the keyring. + + If both sources fail self.token remains None. + """ + env_token = self.get_token_environment() + if env_token is not None: + self.token = env_token + return + + keyring_token = self.get_token_keyring() + if keyring_token is not None: + self.token = keyring_token + return
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/_modules/sxapi/cli/subparser/get_sensor_data.html b/_modules/sxapi/cli/subparser/get_sensor_data.html new file mode 100644 index 0000000..dac5e3f --- /dev/null +++ b/_modules/sxapi/cli/subparser/get_sensor_data.html @@ -0,0 +1,193 @@ + + + + + + + sxapi.cli.subparser.get_sensor_data — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for sxapi.cli.subparser.get_sensor_data

+import json
+
+from sxapi.base import PublicAPIV2
+from sxapi.cli import user_credentials
+from sxapi.publicV2.sensordata import get_sensor_data_from_animal
+
+
+
+[docs] +def create_gsd_parser(subparsers): + """ + get_sensor_data subparser for cli_tests. + Responsible for performing api-call to get the sensor data for a given animal. + + The 'animals_id' is mandatory argument 'animal_id'. + It represents the animal you want to get data from. + + The following flag are only optional. + The --metrics/-m Flag defines the metrics you want to get from the animal sensor. + It expects at most two arguments 'temp', 'act' or both together. Where 'temp' means + getting the temperature metric and 'act' means the activity metric. + + + The --from_date Flag defines the start-date of window you want to get data from. + It expects exactly one argument, a datetime in the format 'YYYY-MM-DD' + (e.g. 2022.01.12). + + The --to_date Flag defines the end-date of window you want to get data from. + It expects exactly one argument, a datetime in the format 'YYYY-MM-DD' + (e.g. 2022.01.12). + """ + gsd_parser = subparsers.add_parser( + "get_sensor_data", + aliases=["gsd"], + help="Get sensor data from animal(by its ID)", + ) + gsd_parser.add_argument( + "animal_id", + help="Animal you want get data from", + ) + gsd_parser.add_argument( + "--metrics", + "-m", + nargs="*", + default=None, + help="metrics for sensordata", + ) + gsd_parser.add_argument( + "--from_date", + default=None, + nargs=1, + help="from_date format: YYYY-MM-DD", + ) + gsd_parser.add_argument( + "--to_date", + default=None, + nargs=1, + help="to_date format: YYYY-MM-DD", + ) + + gsd_parser.set_defaults(func=gsd_sub_function)
+ + + +
+[docs] +def gsd_sub_function(args): + """ + The get_sensor_data subparser default function. + This function gets called if you get_sensor_data subparser is used. + + Pares the given arguments and calls a function which + performs the desired api call. + """ + if not user_credentials.check_credentials_set(): + print("No credentials set. Use --help for more information.") + return + + api = PublicAPIV2(api_token=user_credentials.token) + + id = args.animal_id + metrics = args.metrics + from_date = args.from_date + to_date = args.to_date + resp = get_sensor_data_from_animal( + api=api, animal_id=id, metrics=metrics, from_date=from_date, to_date=to_date + ) + if resp is not None: + print(json.dumps(resp, indent=0))
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/_modules/sxapi/cli/subparser/token.html b/_modules/sxapi/cli/subparser/token.html new file mode 100644 index 0000000..64dab3b --- /dev/null +++ b/_modules/sxapi/cli/subparser/token.html @@ -0,0 +1,299 @@ + + + + + + + sxapi.cli.subparser.token — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for sxapi.cli.subparser.token

+import getpass
+
+import requests
+
+from sxapi.base import PublicAPIV2
+from sxapi.cli import user_credentials
+
+
+
+[docs] +def create_token_parser(subparsers): + """ + Token subparser for cli_tests. + Responsible for managing tokens/credentials. + + The --print_token/-p Flag prints the token, stored in keyring or in + environment, to stdout. It expects exactly only one argument -> 'e' + for printing the token stored in the environment, 'k' for printing + the token stored in keyring and 'ek' for printing both at the same time. + + The --set_keyring/-s flag stores the token (given as argument) in the keyring. + It expects exactly one argument -> the token you want to store. + + The --clear_keyring/-c Flag deletes the token from the keyring. + This flag doesn't expect any argument. + + The --new_token/-n Flag calls api to get new token and prints it to stdout. + It expects exactly two arguments -> smaxtec-username and smaxtec-password. + + It is not possible to use more than one of those flags at the same time + """ + token_parser = subparsers.add_parser( + "token", + help="Get/Set credentials aka 'SMAXTEC_TOKEN' from/to specified " + "storage location or create new one", + ) + + token_parser.add_argument( + "--print_token", + "-p", + nargs="?", + const="ek", + help="Print the current token stored in keyring/environment to stdout. " + "One argument required. Possible args 'e' environment | " + "'k' keyring | ek for printing both.", + ) + token_parser.add_argument( + "--set_keyring", + "-s", + nargs=1, + help="Store the given token in keyring! Requires one argument <token>", + ) + token_parser.add_argument( + "--new_token", + "-n", + nargs="+", + help="Reqeust new token. Requires one argument <username>, " + "second argument <password> is optional!", + ) + token_parser.add_argument( + "--clear_keyring", + "-c", + action="store_true", + default=False, + help="Remove the token from keyring!", + ) + + token_parser.set_defaults(func=token_sub_function)
+ + + +
+[docs] +def token_sub_function(args): + """ + The token subparser default function. + This function gets called if token subparser is used. + + Checks args and calls the specific helper function (see below) according to + the present flag. + """ + number_op = ( + bool(args.print_token) + + bool(args.set_keyring) + + bool(args.new_token) + + bool(args.clear_keyring) + ) + + if number_op > 1: + print( + "Invalid Combination! Please use just one out of these parameters " + "[--print_token, --set_keyring, --new_token, --clear_keyring]" + ) + return + + if args.print_token: + handle_print_token(args) + elif args.set_keyring: + handle_set_token(args) + elif args.clear_keyring: + handle_clear_token() + elif args.new_token: + handle_new_token(args)
+ + + +# Flag helper functions +
+[docs] +def handle_print_token(args): + """ + Logic behind the token subparser --print_token flag. + + Prints the token from the desired source (environment or keyring) to stdout. + """ + keyring = str(user_credentials.get_token_keyring()) + env = str(user_credentials.get_token_environment()) + + if args.print_token == "ek": + print(f"\nKeyring: {keyring}\n\nEnvironment: {env}") + return + elif len(args.print_token) > 2: + print("Invalid number of arguments. Use --help for usage information.") + return + + if "e" != args.print_token and "k" != args.print_token: + print( + "Invalid arguments. Only use 'e' for environment, 'k' for keyring " + "or 'ek' for both." + ) + return + + if "e" == args.print_token: + print(f"\nEnvironment Token: {env}\n") + elif "k" == args.print_token: + print(f"\nKeyring Token: {keyring}\n")
+ + + +
+[docs] +def handle_set_token(args): + """ + Logic behind the token subparser --set_keyring flag. + + Parses the args and stores the token in the keyring. + """ + token = args.set_keyring[0] + user_credentials.set_token_keyring(token=token) + print("Token is stored in keyring!")
+ + + +
+[docs] +def handle_clear_token(): + """ + Logic behind the token subparser --clear_keyring flag. + + Deletes the token from the keyring. + """ + user_credentials.clear_token_keyring() + print("Token was deleted from keyring!")
+ + + +
+[docs] +def handle_new_token(args): + """ + Logic behind the token subparser --new_token flag. + + Parses the args, creates an PublicAPIV2 instance to get new token and + print the new token to stdout. + """ + if len(args.new_token) == 2: + username = args.new_token[0] if "@" in args.new_token[0] else args.new_token[1] + pwd = args.new_token[1] if "@" not in args.new_token[1] else args.new_token[0] + + if len(args.new_token) == 1: + username = args.new_token[0] + pwd = getpass.getpass() + + if "@" not in username: + print("Username must be a email!") + return + + try: + token = str(PublicAPIV2(email=username, password=pwd).get_token()) + print("SMAXTEC_TOKEN=" + token) + except requests.HTTPError as e: + if "401" in str(e) or "422" in str(e): + print("Username or Password is wrong!") + except Exception as e: + print(e)
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/_modules/sxapi/publicV2/sensordata.html b/_modules/sxapi/publicV2/sensordata.html new file mode 100644 index 0000000..fb93c53 --- /dev/null +++ b/_modules/sxapi/publicV2/sensordata.html @@ -0,0 +1,155 @@ + + + + + + + sxapi.publicV2.sensordata — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for sxapi.publicV2.sensordata

+from datetime import (
+    datetime,
+    timedelta,
+)
+from urllib.parse import urlencode
+
+from ..base import PublicAPIV2
+
+
+
+[docs] +def get_sensor_data_from_animal(api, animal_id, *args, **kwargs): + """ + Performs a get call to PUBLIC_API_V2, to get the sensordata from the given animal_id + """ + if not isinstance(api, PublicAPIV2): + print("This function is only available to PublicAPIV2!") + return + + metrics = kwargs.get("metrics", None) + if not metrics: + metrics = ["temp", "act"] + from_date_string = kwargs.get("from_date") + to_date_string = kwargs.get("to_date") + + to_date = datetime.utcnow() + from_date = to_date - timedelta(days=2) + + if to_date_string: + try: + to_date = datetime.strptime(*to_date_string, "%Y-%m-%d") + except ValueError: + print("to_date has not the right format YYYY-MM-DD!") + return None + + if from_date_string: + try: + from_date = datetime.strptime(*from_date_string, "%Y-%m-%d") + except ValueError: + print("from_date has not the right format YYYY-MM-DD!") + return None + + param = { + "metrics": metrics, + "to_date": to_date, + "from_date": from_date, + } + url_path = f"/data/animals/{animal_id}.json?{urlencode(param, True)}" + resp = api.get(url_path) + + return resp
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/_sources/api/modules.rst.txt b/_sources/api/modules.rst.txt new file mode 100644 index 0000000..94b9329 --- /dev/null +++ b/_sources/api/modules.rst.txt @@ -0,0 +1,7 @@ +sxapi +===== + +.. toctree:: + :maxdepth: 4 + + sxapi diff --git a/_sources/api/sxapi.cli.rst.txt b/_sources/api/sxapi.cli.rst.txt new file mode 100644 index 0000000..400cb3b --- /dev/null +++ b/_sources/api/sxapi.cli.rst.txt @@ -0,0 +1,37 @@ +sxapi.cli package +================= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + sxapi.cli.subparser + +Submodules +---------- + +sxapi.cli.cli module +-------------------- + +.. automodule:: sxapi.cli.cli + :members: + :undoc-members: + :show-inheritance: + +sxapi.cli.credentials module +---------------------------- + +.. automodule:: sxapi.cli.credentials + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: sxapi.cli + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/api/sxapi.cli.subparser.rst.txt b/_sources/api/sxapi.cli.subparser.rst.txt new file mode 100644 index 0000000..ccda95d --- /dev/null +++ b/_sources/api/sxapi.cli.subparser.rst.txt @@ -0,0 +1,23 @@ +sxapi.cli.subparser namespace +============================= + +.. py:module:: sxapi.cli.subparser + +Submodules +---------- + +sxapi.cli.subparser.get\_sensor\_data module +-------------------------------------------- + +.. automodule:: sxapi.cli.subparser.get_sensor_data + :members: + :undoc-members: + :show-inheritance: + +sxapi.cli.subparser.token module +-------------------------------- + +.. automodule:: sxapi.cli.subparser.token + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/api/sxapi.publicV2.rst.txt b/_sources/api/sxapi.publicV2.rst.txt new file mode 100644 index 0000000..203d2a8 --- /dev/null +++ b/_sources/api/sxapi.publicV2.rst.txt @@ -0,0 +1,15 @@ +sxapi.publicV2 namespace +======================== + +.. py:module:: sxapi.publicV2 + +Submodules +---------- + +sxapi.publicV2.sensordata module +-------------------------------- + +.. automodule:: sxapi.publicV2.sensordata + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/api/sxapi.rst.txt b/_sources/api/sxapi.rst.txt new file mode 100644 index 0000000..f9d3690 --- /dev/null +++ b/_sources/api/sxapi.rst.txt @@ -0,0 +1,30 @@ +sxapi package +============= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + sxapi.cli + sxapi.publicV2 + +Submodules +---------- + +sxapi.base module +----------------- + +.. automodule:: sxapi.base + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: sxapi + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/authors.rst.txt b/_sources/authors.rst.txt new file mode 100644 index 0000000..cd8e091 --- /dev/null +++ b/_sources/authors.rst.txt @@ -0,0 +1,2 @@ +.. _authors: +.. include:: ../AUTHORS.rst diff --git a/_sources/changelog.rst.txt b/_sources/changelog.rst.txt new file mode 100644 index 0000000..871950d --- /dev/null +++ b/_sources/changelog.rst.txt @@ -0,0 +1,2 @@ +.. _changes: +.. include:: ../CHANGELOG.rst diff --git a/_sources/contributing.rst.txt b/_sources/contributing.rst.txt new file mode 100644 index 0000000..e582053 --- /dev/null +++ b/_sources/contributing.rst.txt @@ -0,0 +1 @@ +.. include:: ../CONTRIBUTING.rst diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt new file mode 100644 index 0000000..0524905 --- /dev/null +++ b/_sources/index.rst.txt @@ -0,0 +1,61 @@ +===== +sxapi +===== + +This is the documentation of **sxapi**. + +.. note:: + + This is the main page of your project's `Sphinx`_ documentation. + It is formatted in `reStructuredText`_. Add additional pages + by creating rst-files in ``docs`` and adding them to the `toctree`_ below. + Use then `references`_ in order to link them from this page, e.g. + :ref:`authors` and :ref:`changes`. + + It is also possible to refer to the documentation of other Python packages + with the `Python domain syntax`_. By default you can reference the + documentation of `Sphinx`_, `Python`_, `NumPy`_, `SciPy`_, `matplotlib`_, + `Pandas`_, `Scikit-Learn`_. You can add more by extending the + ``intersphinx_mapping`` in your Sphinx's ``conf.py``. + + The pretty useful extension `autodoc`_ is activated by default and lets + you include documentation from docstrings. Docstrings can be written in + `Google style`_ (recommended!), `NumPy style`_ and `classical style`_. + + +Contents +======== + +.. toctree:: + :maxdepth: 2 + + Overview + Contributions & Help + License + Authors + Changelog + Module Reference + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + +.. _toctree: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html +.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html +.. _references: https://www.sphinx-doc.org/en/stable/markup/inline.html +.. _Python domain syntax: https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-python-domain +.. _Sphinx: https://www.sphinx-doc.org/ +.. _Python: https://docs.python.org/ +.. _Numpy: https://numpy.org/doc/stable +.. _SciPy: https://docs.scipy.org/doc/scipy/reference/ +.. _matplotlib: https://matplotlib.org/contents.html# +.. _Pandas: https://pandas.pydata.org/pandas-docs/stable +.. _Scikit-Learn: https://scikit-learn.org/stable +.. _autodoc: https://www.sphinx-doc.org/en/master/ext/autodoc.html +.. _Google style: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings +.. _NumPy style: https://numpydoc.readthedocs.io/en/latest/format.html +.. _classical style: https://www.sphinx-doc.org/en/master/domains.html#info-field-lists diff --git a/_sources/license.rst.txt b/_sources/license.rst.txt new file mode 100644 index 0000000..e647e18 --- /dev/null +++ b/_sources/license.rst.txt @@ -0,0 +1,7 @@ +.. _license: + +======= +License +======= + +.. include:: ../LICENSE diff --git a/_sources/readme.rst.txt b/_sources/readme.rst.txt new file mode 100644 index 0000000..81995ef --- /dev/null +++ b/_sources/readme.rst.txt @@ -0,0 +1,2 @@ +.. _readme: +.. include:: ../README.rst diff --git a/_static/alabaster.css b/_static/alabaster.css new file mode 100644 index 0000000..f98defb --- /dev/null +++ b/_static/alabaster.css @@ -0,0 +1,703 @@ +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia, serif; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 1200px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 300px; +} + +div.sphinxsidebar { + width: 300px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 1200px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia, serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: Georgia, serif; + font-size: 1em; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia, serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia, serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin-left: 0; + margin-right: 0; + margin-top: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Make nested-list/multi-paragraph items look better in Releases changelog + * pages. Without this, docutils' magical list fuckery causes inconsistent + * formatting between different release sub-lists. + */ +div#changelog > div.section > ul > li > p:only-child { + margin-bottom: 0; +} + +/* Hide fugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } +} \ No newline at end of file diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 0000000..30fee9d --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/custom.css b/_static/custom.css new file mode 100644 index 0000000..2a924f1 --- /dev/null +++ b/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 0000000..d06a71d --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 0000000..6b34841 --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '0.0.post1.dev1+g088c1a1', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 0000000000000000000000000000000000000000..a858a410e4faa62ce324d814e4b816fff83a6fb3 GIT binary patch literal 286 zcmV+(0pb3MP)s`hMrGg#P~ix$^RISR_I47Y|r1 z_CyJOe}D1){SET-^Amu_i71Lt6eYfZjRyw@I6OQAIXXHDfiX^GbOlHe=Ae4>0m)d(f|Me07*qoM6N<$f}vM^LjV8( literal 0 HcmV?d00001 diff --git a/_static/language_data.js b/_static/language_data.js new file mode 100644 index 0000000..250f566 --- /dev/null +++ b/_static/language_data.js @@ -0,0 +1,199 @@ +/* + * language_data.js + * ~~~~~~~~~~~~~~~~ + * + * This script contains the language-specific data used by searchtools.js, + * namely the list of stopwords, stemmer, scorer and splitter. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; + + +/* Non-minified version is copied as a separate JS file, is available */ + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 0000000000000000000000000000000000000000..d96755fdaf8bb2214971e0db9c1fd3077d7c419d GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^+#t*WBp7;*Yy1LIik>cxAr*|t7R?Mi>2?kWtu=nj kDsEF_5m^0CR;1wuP-*O&G^0G}KYk!hp00i_>zopr08q^qX#fBK literal 0 HcmV?d00001 diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 0000000000000000000000000000000000000000..7107cec93a979b9a5f64843235a16651d563ce2d GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^+#t*WBp7;*Yy1LIik>cxAr*|t7R?Mi>2?kWtu>-2 m3q%Vub%g%s<8sJhVPMczOq}xhg9DJoz~JfX=d#Wzp$Pyb1r*Kz literal 0 HcmV?d00001 diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 0000000..0d49244 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333333 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #208050 } /* Literal.Number.Bin */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06287e } /* Name.Function.Magic */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 0000000..7918c3f --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,574 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + // array of [docname, title, anchor, descr, score, filename] + let results = []; + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // lookup as object + objectTerms.forEach((term) => + results.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + results = results.reverse(); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js new file mode 100644 index 0000000..8a96c69 --- /dev/null +++ b/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/api/modules.html b/api/modules.html new file mode 100644 index 0000000..7e8c745 --- /dev/null +++ b/api/modules.html @@ -0,0 +1,159 @@ + + + + + + + + sxapi — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/api/sxapi.cli.html b/api/sxapi.cli.html new file mode 100644 index 0000000..9ee55a3 --- /dev/null +++ b/api/sxapi.cli.html @@ -0,0 +1,231 @@ + + + + + + + + sxapi.cli package — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

sxapi.cli package

+
+

Subpackages

+ +
+
+

Submodules

+
+
+

sxapi.cli.cli module

+
+
+class sxapi.cli.cli.Cli[source]
+

Bases: object

+

CLI class for handling arguments and calling the API.

+
+
+static api_status()[source]
+

Print online status of api/v2 and integration/v2

+
+ +
+
+static parse_args(args)[source]
+

Parse arguments from the CLI and initializes subparsers.

+
+ +
+
+run()[source]
+

Call sxapi functions based on passed arguments.

+
+ +
+
+static version_info()[source]
+

Print version info.

+
+ +
+ +
+
+sxapi.cli.cli.cli_run()[source]
+

Start CLI

+
+ +
+
+

sxapi.cli.credentials module

+
+
+class sxapi.cli.credentials.UserCredentials[source]
+

Bases: object

+

Credentials class used for initializing, storing, retrieving and deleting +credentials.

+

This class should only be used in the cli_tests package.

+
+
+check_credentials_set()[source]
+

Checks if token is already set.

+
+ +
+
+clear_token_keyring()[source]
+

Deletes the token from the keyring.

+
+ +
+
+get_token_environment()[source]
+

Gets token named ‘SMAXTEC_TOKEN’ from the systems environment.

+
+ +
+
+get_token_keyring()[source]
+

Gets the token stored in the keyring.

+
+ +
+
+set_token_keyring(token)[source]
+

Store the given token in keyring.

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/api/sxapi.cli.subparser.html b/api/sxapi.cli.subparser.html new file mode 100644 index 0000000..d738cbc --- /dev/null +++ b/api/sxapi.cli.subparser.html @@ -0,0 +1,213 @@ + + + + + + + + sxapi.cli.subparser namespace — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

sxapi.cli.subparser namespace

+
+

Submodules

+
+
+

sxapi.cli.subparser.get_sensor_data module

+
+
+sxapi.cli.subparser.get_sensor_data.create_gsd_parser(subparsers)[source]
+

get_sensor_data subparser for cli_tests. +Responsible for performing api-call to get the sensor data for a given animal.

+

The ‘animals_id’ is mandatory argument ‘animal_id’. +It represents the animal you want to get data from.

+

The following flag are only optional. +The –metrics/-m Flag defines the metrics you want to get from the animal sensor. +It expects at most two arguments ‘temp’, ‘act’ or both together. Where ‘temp’ means +getting the temperature metric and ‘act’ means the activity metric.

+

The –from_date Flag defines the start-date of window you want to get data from. +It expects exactly one argument, a datetime in the format ‘YYYY-MM-DD’ +(e.g. 2022.01.12).

+

The –to_date Flag defines the end-date of window you want to get data from. +It expects exactly one argument, a datetime in the format ‘YYYY-MM-DD’ +(e.g. 2022.01.12).

+
+ +
+
+sxapi.cli.subparser.get_sensor_data.gsd_sub_function(args)[source]
+

The get_sensor_data subparser default function. +This function gets called if you get_sensor_data subparser is used.

+

Pares the given arguments and calls a function which +performs the desired api call.

+
+ +
+
+

sxapi.cli.subparser.token module

+
+
+sxapi.cli.subparser.token.create_token_parser(subparsers)[source]
+

Token subparser for cli_tests. +Responsible for managing tokens/credentials.

+

The –print_token/-p Flag prints the token, stored in keyring or in +environment, to stdout. It expects exactly only one argument -> ‘e’ +for printing the token stored in the environment, ‘k’ for printing +the token stored in keyring and ‘ek’ for printing both at the same time.

+

The –set_keyring/-s flag stores the token (given as argument) in the keyring. +It expects exactly one argument -> the token you want to store.

+

The –clear_keyring/-c Flag deletes the token from the keyring. +This flag doesn’t expect any argument.

+

The –new_token/-n Flag calls api to get new token and prints it to stdout. +It expects exactly two arguments -> smaxtec-username and smaxtec-password.

+

It is not possible to use more than one of those flags at the same time

+
+ +
+
+sxapi.cli.subparser.token.handle_clear_token()[source]
+

Logic behind the token subparser –clear_keyring flag.

+

Deletes the token from the keyring.

+
+ +
+
+sxapi.cli.subparser.token.handle_new_token(args)[source]
+

Logic behind the token subparser –new_token flag.

+

Parses the args, creates an PublicAPIV2 instance to get new token and +print the new token to stdout.

+
+ +
+
+sxapi.cli.subparser.token.handle_print_token(args)[source]
+

Logic behind the token subparser –print_token flag.

+

Prints the token from the desired source (environment or keyring) to stdout.

+
+ +
+
+sxapi.cli.subparser.token.handle_set_token(args)[source]
+

Logic behind the token subparser –set_keyring flag.

+

Parses the args and stores the token in the keyring.

+
+ +
+
+sxapi.cli.subparser.token.token_sub_function(args)[source]
+

The token subparser default function. +This function gets called if token subparser is used.

+

Checks args and calls the specific helper function (see below) according to +the present flag.

+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/api/sxapi.html b/api/sxapi.html new file mode 100644 index 0000000..b6cb3ba --- /dev/null +++ b/api/sxapi.html @@ -0,0 +1,247 @@ + + + + + + + + sxapi package — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

sxapi package

+
+

Subpackages

+ +
+
+

Submodules

+
+
+

sxapi.base module

+
+
+class sxapi.base.ApiTypes(value)[source]
+

Bases: Enum

+

An enumeration.

+
+
+INTEGRATION = 2
+
+ +
+
+PUBLIC = 1
+
+ +
+ +
+
+class sxapi.base.BaseAPI(base_url, email=None, password=None, api_token=None, api_type=None)[source]
+

Bases: object

+
+
+delete(path, *args, **kwargs)[source]
+
+ +
+
+get(path, *args, **kwargs)[source]
+
+ +
+
+get_token()[source]
+
+ +
+
+post(path, *args, **kwargs)[source]
+
+ +
+
+put(path, *args, **kwargs)[source]
+
+ +
+
+property session
+

Geneates a new HTTP session on the fly and logs in if no session exists.

+
+ +
+
+to_url(path)[source]
+
+ +
+ +
+
+class sxapi.base.IntegrationAPIV2(base_url=None, email=None, password=None, api_token=None)[source]
+

Bases: BaseAPI

+
+ +
+
+class sxapi.base.PublicAPIV2(base_url=None, email=None, password=None, api_token=None)[source]
+

Bases: BaseAPI

+
+ +
+
+

Module contents

+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/api/sxapi.publicV2.html b/api/sxapi.publicV2.html new file mode 100644 index 0000000..4ee645a --- /dev/null +++ b/api/sxapi.publicV2.html @@ -0,0 +1,128 @@ + + + + + + + + sxapi.publicV2 namespace — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

sxapi.publicV2 namespace

+
+

Submodules

+
+
+

sxapi.publicV2.sensordata module

+
+
+sxapi.publicV2.sensordata.get_sensor_data_from_animal(api, animal_id, *args, **kwargs)[source]
+

Performs a get call to PUBLIC_API_V2, to get the sensordata from the given animal_id

+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/authors.html b/authors.html new file mode 100644 index 0000000..ac6d180 --- /dev/null +++ b/authors.html @@ -0,0 +1,116 @@ + + + + + + + + Contributors — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Contributors

+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/changelog.html b/changelog.html new file mode 100644 index 0000000..ac821bf --- /dev/null +++ b/changelog.html @@ -0,0 +1,120 @@ + + + + + + + + Changelog — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Changelog

+
+

Version 1.0b1

+
    +
  • init

  • +
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/contributing.html b/contributing.html new file mode 100644 index 0000000..df811e7 --- /dev/null +++ b/contributing.html @@ -0,0 +1,367 @@ + + + + + + + + Contributing — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Contributing

+

Welcome to sxapi contributor’s guide.

+

This document focuses on getting any potential contributor familiarized +with the development processes, but other kinds of contributions are also +appreciated.

+

If you are new to using git or have never collaborated in a project previously, +please have a look at contribution-guide.org. Other resources are also +listed in the excellent guide created by FreeCodeCamp [1].

+

Please notice, all users and contributors are expected to be open, +considerate, reasonable, and respectful. When in doubt, Python Software +Foundation’s Code of Conduct is a good reference in terms of behavior +guidelines.

+
+

Issue Reports

+

If you experience bugs or general issues with sxapi, please have a look +on the issue tracker. If you don’t see anything useful there, please feel +free to fire an issue report.

+
+

Tip

+

Please don’t forget to include the closed issues in your search. +Sometimes a solution was already reported, and the problem is considered +solved.

+
+

New issue reports should include information about your programming environment +(e.g., operating system, Python version) and steps to reproduce the problem. +Please try also to simplify the reproduction steps to a very minimal example +that still illustrates the problem you are facing. By removing other factors, +you help us to identify the root cause of the issue.

+
+
+

Documentation Improvements

+

You can help improve sxapi docs by making them more readable and coherent, or +by adding missing information and correcting mistakes.

+

sxapi documentation uses Sphinx as its main documentation compiler, with reStructuredText as markup language. +This means that the docs are kept in the same repository as the project code, and +that any documentation update is done in the same way was a code contribution.

+
+

Tip

+

Please notice that the GitHub web interface provides a quick way of +propose changes in sxapi’s files. While this mechanism can +be tricky for normal code contributions, it works perfectly fine for +contributing to the docs, and can be quite handy.

+

If you are interested in trying this method out, please navigate to +the docs folder in the source repository, find which file you +would like to propose changes and click in the little pencil icon at the +top, to open GitHub’s code editor. Once you finish editing the file, +please write a message in the form at the bottom of the page describing +which changes have you made and what are the motivations behind them and +submit your proposal.

+
+

When working on documentation changes in your local machine, you can +compile them using tox:

+
tox -e docs
+
+
+

and use Python’s built-in web server for a preview in your web browser +(http://localhost:8000):

+
python3 -m http.server --directory 'docs/_build/html'
+
+
+
+
+

Code Contributions

+

You can find the API documentation for the smaxtec system on the API documentation page and the integration API documentation page.

+

This API is only available with a smaxtec user account after logging in. All calls must use an access token. +.. todo:: fix contact info. +If you need an account for the API you can contact smaXtec.

+
+

Submit an issue

+

Before you work on any non-trivial code contribution it’s best to first create +a report in the issue tracker to start a discussion on the subject. +This often provides additional considerations and avoids unnecessary work.

+
+
+

Create an environment

+

Before you start coding, we recommend creating an isolated virtual +environment to avoid any problems with your installed Python packages. +This can easily be done via either virtualenv:

+
virtualenv <PATH TO VENV>
+source <PATH TO VENV>/bin/activate
+
+
+
+
+

Clone the repository

+
    +
  1. Create an user account on GitHub if you do not already have one.

  2. +
  3. Fork the project repository: click on the Fork button near the top of the +page. This creates a copy of the code under your account on GitHub.

  4. +
  5. Clone this copy to your local disk:

    +
    git clone git@github.com:YourLogin/sxapi.git
    +cd sxapi
    +
    +
    +
  6. +
  7. You should run:

    +
    pip install -U pip setuptools -e .
    +
    +
    +

    to be able run putup --help.

    +
  8. +
  9. Install pre-commit:

    +
    pip install pre-commit
    +pre-commit install
    +
    +
    +

    sxapi comes with a lot of hooks configured to automatically help the +developer to check the code being written.

    +
  10. +
+
+
+

Implement your changes

+
    +
  1. Create a branch to hold your changes:

    +
    git checkout -b my-feature
    +
    +
    +

    and start making changes. Never work on the master branch!

    +
  2. +
  3. Start your work on this branch. Don’t forget to add docstrings to new +functions, modules and classes, especially if they are part of public APIs.

  4. +
  5. Add yourself to the list of contributors in AUTHORS.rst.

  6. +
  7. When you’re done editing, do:

    +
    git add <MODIFIED FILES>
    +git commit
    +
    +
    +

    to record your changes in git.

    +

    Please make sure to see the validation messages from pre-commit and fix +any eventual issues. +This should automatically use flake8/black to check/fix the code style +in a way that is compatible with the project.

    +
    +

    Important

    +

    Don’t forget to add unit tests and documentation in case your +contribution adds an additional feature and is not just a bugfix.

    +

    Moreover, writing a descriptive commit message is highly recommended. +In case of doubt, you can check the commit history with:

    +
    git log --graph --decorate --pretty=oneline --abbrev-commit --all
    +
    +
    +

    to look for recurring communication patterns.

    +
    +
  8. +
  9. Please check that your changes don’t break any unit tests with:

    +
    tox
    +
    +
    +

    (after having installed tox with pip install tox or pipx).

    +

    You can also use tox to run several other pre-configured tasks in the +repository. Try tox -av to see a list of the available checks.

    +
  10. +
+
+
+

Submit your contribution

+
    +
  1. If everything works fine, push your local branch to GitHub with:

    +
    git push -u origin my-feature
    +
    +
    +
  2. +
  3. Go to the web page of your fork and click “Create pull request” +to send your changes for review.

    +

    Find more detailed information creating a PR. You might also want to open +the PR as a draft first and mark it as ready for review after the feedbacks +from the continuous integration (CI) system or any required fixes.

    +
  4. +
+
+
+

Troubleshooting

+

The following tips can be used when facing problems to build or test the +package:

+
    +
  1. Make sure to fetch all the tags from the upstream repository. +The command git describe --abbrev=0 --tags should return the version you +are expecting. If you are trying to run CI scripts in a fork repository, +make sure to push all the tags. +You can also try to remove all the egg files or the complete egg folder, i.e., +.eggs, as well as the *.egg-info folders in the src folder or +potentially in the root of your project.

  2. +
  3. Sometimes tox misses out when new dependencies are added, especially to +setup.cfg and docs/requirements.txt. If you find any problems with +missing dependencies when running a command with tox, try to recreate the +tox environment using the -r flag. For example, instead of:

    +
    tox -e docs
    +
    +
    +

    Try running:

    +
    tox -r -e docs
    +
    +
    +
  4. +
  5. Make sure to have a reliable tox installation that uses the correct +Python version (e.g., 3.7+). When in doubt you can run:

    +
    tox --version
    +# OR
    +which tox
    +
    +
    +

    If you have trouble and are seeing weird errors upon running tox, you can +also try to create a dedicated virtual environment with a tox binary +freshly installed. For example:

    +
    virtualenv .venv
    +source .venv/bin/activate
    +.venv/bin/pip install tox
    +.venv/bin/tox -e all
    +
    +
    +
  6. +
  7. Pytest can drop you in an interactive session in the case an error occurs. +In order to do that you need to pass a --pdb option (for example by +running tox -- -k <NAME OF THE FALLING TEST> --pdb). +You can also setup breakpoints manually instead of using the --pdb option.

  8. +
+
+
+
+

Maintainer tasks

+
+

Releases

+

If you are part of the group of maintainers and have correct user permissions +on PyPI, the following steps can be used to release a new version for +sxapi:

+
    +
  1. Make sure all unit tests are successful.

  2. +
  3. Tag the current commit on the main branch with a release tag, e.g., v1.2.3.

  4. +
  5. Push the new tag to the upstream repository, e.g., git push upstream v1.2.3

  6. +
  7. Clean up the dist and build folders with tox -e clean +(or rm -rf dist build) +to avoid confusion with old builds and Sphinx docs.

  8. +
  9. Run tox -e build and check that the files in dist have +the correct version (no .dirty or git hash) according to the git tag. +Also check the sizes of the distributions, if they are too big (e.g., > +500KB), unwanted clutter may have been accidentally included.

  10. +
  11. Run tox -e publish -- --repository pypi and check that everything was +uploaded to PyPI correctly.

  12. +
+ +
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/genindex.html b/genindex.html new file mode 100644 index 0000000..531ff5e --- /dev/null +++ b/genindex.html @@ -0,0 +1,383 @@ + + + + + + + Index — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + +

Index

+ +
+ A + | B + | C + | D + | G + | H + | I + | M + | P + | R + | S + | T + | U + | V + +
+

A

+ + + +
+ +

B

+ + +
+ +

C

+ + + +
+ +

D

+ + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + + +
+ +

M

+ + +
+ +

P

+ + + +
+ +

R

+ + +
+ +

S

+ + + +
    +
  • + sxapi.cli.subparser + +
  • +
  • + sxapi.cli.subparser.get_sensor_data + +
  • +
  • + sxapi.cli.subparser.token + +
  • +
  • + sxapi.publicV2 + +
  • +
  • + sxapi.publicV2.sensordata + +
  • +
+ +

T

+ + + +
+ +

U

+ + +
+ +

V

+ + +
+ + + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..75955d9 --- /dev/null +++ b/index.html @@ -0,0 +1,162 @@ + + + + + + + + sxapi — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

sxapi

+

This is the documentation of sxapi.

+
+

Note

+

This is the main page of your project’s Sphinx documentation. +It is formatted in reStructuredText. Add additional pages +by creating rst-files in docs and adding them to the toctree below. +Use then references in order to link them from this page, e.g. +Contributors and Changelog.

+

It is also possible to refer to the documentation of other Python packages +with the Python domain syntax. By default you can reference the +documentation of Sphinx, Python, NumPy, SciPy, matplotlib, +Pandas, Scikit-Learn. You can add more by extending the +intersphinx_mapping in your Sphinx’s conf.py.

+

The pretty useful extension autodoc is activated by default and lets +you include documentation from docstrings. Docstrings can be written in +Google style (recommended!), NumPy style and classical style.

+
+
+

Contents

+ +
+
+

Indices and tables

+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/license.html b/license.html new file mode 100644 index 0000000..3f01bf8 --- /dev/null +++ b/license.html @@ -0,0 +1,298 @@ + + + + + + + + License — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

License

+
+
+
+
+

Apache License

+
+

Version 2.0, January 2004

+
+

http://www.apache.org/licenses/

+
+

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

+
    +
  1. Definitions.

    +

    “License” shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document.

    +

    “Licensor” shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License.

    +

    “Legal Entity” shall mean the union of the acting entity and all +other entities that control, are controlled by, or are under common +control with that entity. For the purposes of this definition, +“control” means (i) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or +otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity.

    +

    “You” (or “Your”) shall mean an individual or Legal Entity +exercising permissions granted by this License.

    +

    “Source” form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation +source, and configuration files.

    +

    “Object” form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types.

    +

    “Work” shall mean the work of authorship, whether in Source or +Object form, made available under the License, as indicated by a +copyright notice that is included in or attached to the work +(an example is provided in the Appendix below).

    +

    “Derivative Works” shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof.

    +

    “Contribution” shall mean any work of authorship, including +the original version of the Work and any modifications or additions +to that Work or Derivative Works thereof, that is intentionally +submitted to Licensor for inclusion in the Work by the copyright owner +or by an individual or Legal Entity authorized to submit on behalf of +the copyright owner. For the purposes of this definition, “submitted” +means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, +and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise +designated in writing by the copyright owner as “Not a Contribution.”

    +

    “Contributor” shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work.

    +
  2. +
  3. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form.

  4. +
  5. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable +by such Contributor that are necessarily infringed by their +Contribution(s) alone or by combination of their Contribution(s) +with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate +as of the date such litigation is filed.

  6. +
  7. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You +meet the following conditions:

    +
      +
    1. You must give any other recipients of the Work or +Derivative Works a copy of this License; and

    2. +
    3. You must cause any modified files to carry prominent notices +stating that You changed the files; and

    4. +
    5. You must retain, in the Source form of any Derivative Works +that You distribute, all copyright, patent, trademark, and +attribution notices from the Source form of the Work, +excluding those notices that do not pertain to any part of +the Derivative Works; and

    6. +
    7. If the Work includes a “NOTICE” text file as part of its +distribution, then any Derivative Works that You distribute must +include a readable copy of the attribution notices contained +within such NOTICE file, excluding those notices that do not +pertain to any part of the Derivative Works, in at least one +of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or +documentation, if provided along with the Derivative Works; or, +within a display generated by the Derivative Works, if and +wherever such third-party notices normally appear. The contents +of the NOTICE file are for informational purposes only and +do not modify the License. You may add Your own attribution +notices within Derivative Works that You distribute, alongside +or as an addendum to the NOTICE text from the Work, provided +that such additional attribution notices cannot be construed +as modifying the License.

    8. +
    +

    You may add Your own copyright statement to Your modifications and +may provide additional or different license terms and conditions +for use, reproduction, or distribution of Your modifications, or +for any such Derivative Works as a whole, provided Your use, +reproduction, and distribution of the Work otherwise complies with +the conditions stated in this License.

    +
  8. +
  9. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions.

  10. +
  11. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file.

  12. +
  13. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an “AS IS” BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License.

  14. +
  15. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages.

  16. +
  17. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability.

  18. +
+

END OF TERMS AND CONDITIONS

+

APPENDIX: How to apply the Apache License to your work.

+
+

To apply the Apache License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets “[]” +replaced with your own identifying information. (Don’t include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same “printed page” as the copyright notice for easier +identification within third-party archives.

+
+

Copyright [yyyy] [name of copyright owner]

+

Licensed under the Apache License, Version 2.0 (the “License”); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at

+
+
+

Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an “AS IS” BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.

+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/objects.inv b/objects.inv new file mode 100644 index 0000000000000000000000000000000000000000..c34d1d6cdffa772419f674a5a75067486c0fda70 GIT binary patch literal 859 zcmV-h1El;TAX9K?X>NERX>N99Zgg*Qc_4OWa&u{KZXhxWBOp+6Z)#;@bUGk&cwum9 z3L_v^WpZ_Ab7^j8AbMG)-`Ml83BK_>4f5k% zrs6_C@Hw#0pU_#uy~)G}vM)ad%LQ4t9N}U@c%P@w#~jcxBf$}aFJ0mQBV0c{fBXLH z{(1fL$+5XHI^7lq#w%=I9v;`L%g7J*>wdEyzuuA%#vs5@hQRDqJert*nZ{y99Y9Xt z<_f2T%!?^31jJOGmYHjngEq&}T%%Z_#RWmv(mmdr&)4x~+!R}pM&n757#bhz z8JGy?xq=t2i2MKAYHBYhw9gC;Hw6x)@*RH8H3H*0naJ0LoJM>F?Rtl$a;Gj=upd^2 z-W4)(O)-k9AqHtuE^u0<8h-eKpjU0Z@zopF38Otk2j(Fd4xS=Ysu~Ay*ki)Lra79q03l7LW&uU{L>2-RbW z?#Q>%EUrOxZH~5FvdhMZ?{-SWOQ}q^0`_`|vwD?J l7O)`GIoQ(2l$r4mW%|(GD$%~JLpDPFCjZ8b)jv|pztDhgoNxdD literal 0 HcmV?d00001 diff --git a/py-modindex.html b/py-modindex.html new file mode 100644 index 0000000..a55fd72 --- /dev/null +++ b/py-modindex.html @@ -0,0 +1,166 @@ + + + + + + + Python Module Index — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + +

Python Module Index

+ +
+ s +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ s
+ sxapi +
    + sxapi.base +
    + sxapi.cli +
    + sxapi.cli.cli +
    + sxapi.cli.credentials +
    + sxapi.cli.subparser +
    + sxapi.cli.subparser.get_sensor_data +
    + sxapi.cli.subparser.token +
    + sxapi.publicV2 +
    + sxapi.publicV2.sensordata +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/readme.html b/readme.html new file mode 100644 index 0000000..4a5a5ee --- /dev/null +++ b/readme.html @@ -0,0 +1,129 @@ + + + + + + + + sxapi — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + PyPI-Server +Monthly Downloads +Twitter +
+

+
+
+

sxapi

+
+

a new API to interact with the smaXtec system.

+
+

sxapi lets you import and export data through an easy to understand python API and a command line interface.

+
+

Note

+

This project has been set up using PyScaffold 4.1. For details and usage +information on PyScaffold see https://pyscaffold.org/.

+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/search.html b/search.html new file mode 100644 index 0000000..29252df --- /dev/null +++ b/search.html @@ -0,0 +1,125 @@ + + + + + + + Search — sxapi 0.0.post1.dev1+g088c1a1 documentation + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Search

+ + + + +

+ Searching for multiple words only shows matches that contain + all words. +

+ + +
+ + + +
+ + + +
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 0000000..5b6aaf6 --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["api/modules", "api/sxapi", "api/sxapi.cli", "api/sxapi.cli.subparser", "api/sxapi.publicV2", "authors", "changelog", "contributing", "index", "license", "readme"], "filenames": ["api/modules.rst", "api/sxapi.rst", "api/sxapi.cli.rst", "api/sxapi.cli.subparser.rst", "api/sxapi.publicV2.rst", "authors.rst", "changelog.rst", "contributing.rst", "index.rst", "license.rst", "readme.rst"], "titles": ["sxapi", "sxapi package", "sxapi.cli package", "sxapi.cli.subparser namespace", "sxapi.publicV2 namespace", "Contributors", "Changelog", "Contributing", "sxapi", "License", "sxapi"], "terms": {"packag": [0, 7, 8], "subpackag": 0, "cli": [0, 1], "submodul": 0, "modul": [0, 7, 8], "credenti": [0, 1, 3], "content": [0, 9], "publicv2": [0, 1], "namespac": [0, 1, 2], "sensordata": [0, 1], "base": [0, 2, 7, 9], "apityp": [0, 1], "integr": [0, 1, 2, 7], "public": [0, 1, 7], "baseapi": [0, 1], "delet": [0, 1, 2, 3], "get": [0, 1, 2, 3, 4, 7], "get_token": [0, 1], "post": [0, 1], "put": [0, 1], "session": [0, 1, 7], "to_url": [0, 1], "integrationapiv2": [0, 1], "publicapiv2": [0, 1, 3], "subpars": [1, 2], "get_sensor_data": [1, 2], "token": [1, 2, 7], "api_statu": [1, 2], "parse_arg": [1, 2], "run": [1, 2, 7], "version_info": [1, 2], "cli_run": [1, 2], "usercredenti": [1, 2], "check_credentials_set": [1, 2], "clear_token_keyr": [1, 2], "get_token_environ": [1, 2], "get_token_keyr": [1, 2], "set_token_keyr": [1, 2], "get_sensor_data_from_anim": [1, 4], "class": [1, 2, 7, 9], "valu": 1, "sourc": [1, 2, 3, 4, 7, 9], "enum": 1, "an": [1, 3, 9, 10], "enumer": 1, "2": [1, 7, 9], "1": [1, 7, 8, 9, 10], "base_url": 1, "email": 1, "none": 1, "password": [1, 3], "api_token": 1, "api_typ": 1, "object": [1, 2, 9], "path": [1, 7], "arg": [1, 2, 3, 4], "kwarg": [1, 4], "properti": 1, "geneat": 1, "new": [1, 3, 7, 10], "http": [1, 7, 9, 10], "fly": 1, "log": [1, 7], "exist": 1, "create_gsd_pars": [2, 3], "gsd_sub_funct": [2, 3], "create_token_pars": [2, 3], "handle_clear_token": [2, 3], "handle_new_token": [2, 3], "handle_print_token": [2, 3], "handle_set_token": [2, 3], "token_sub_funct": [2, 3], "handl": 2, "argument": [2, 3], "call": [2, 3, 4, 7], "api": [2, 3, 4, 7, 10], "static": 2, "print": [2, 3, 9], "onlin": 2, "statu": 2, "v2": 2, "pars": [2, 3], "from": [2, 3, 4, 7, 8, 9], "initi": 2, "function": [2, 3, 7], "pass": [2, 7], "version": [2, 7, 8, 9], "info": [2, 7], "start": [2, 3, 7], "us": [2, 3, 7, 8, 9, 10], "store": [2, 3], "retriev": 2, "thi": [2, 3, 7, 8, 9, 10], "should": [2, 7, 9], "onli": [2, 3, 7, 9], "cli_test": [2, 3], "check": [2, 3, 7], "i": [2, 3, 7, 8, 9], "alreadi": [2, 7], "set": [2, 10], "keyr": [2, 3], "name": [2, 7, 9], "smaxtec_token": 2, "system": [2, 7, 9, 10], "environ": [2, 3], "given": [2, 3, 4], "respons": [3, 9], "perform": [3, 4, 9], "sensor": 3, "data": [3, 10], "anim": 3, "The": [3, 7, 8, 9], "animals_id": 3, "mandatori": 3, "animal_id": [3, 4], "It": [3, 8], "repres": [3, 9], "you": [3, 7, 8, 9, 10], "want": [3, 7], "follow": [3, 7, 9], "flag": [3, 7], "ar": [3, 7, 9], "option": [3, 7], "metric": 3, "m": [3, 7], "defin": [3, 9], "expect": [3, 7], "most": 3, "two": 3, "temp": 3, "act": [3, 9], "both": 3, "togeth": 3, "where": [3, 9], "mean": [3, 7, 9], "temperatur": 3, "activ": [3, 7, 8], "from_dat": 3, "date": [3, 9], "window": 3, "exactli": 3, "one": [3, 7, 9], "datetim": 3, "format": [3, 8, 9], "yyyi": [3, 9], "mm": 3, "dd": 3, "e": [3, 7, 8], "g": [3, 7, 8], "2022": 3, "01": 3, "12": 3, "to_dat": 3, "end": [3, 9], "default": [3, 8], "pare": 3, "which": [3, 7, 9], "desir": 3, "manag": [3, 9], "print_token": 3, "p": 3, "stdout": 3, "k": [3, 7], "ek": 3, "same": [3, 7, 9], "time": 3, "set_keyr": 3, "": [3, 7, 8, 9], "clear_keyr": 3, "c": 3, "doesn": 3, "t": [3, 7, 9], "ani": [3, 7, 9], "new_token": 3, "n": 3, "smaxtec": [3, 5, 7, 10], "usernam": 3, "possibl": [3, 8, 9], "more": [3, 7, 8, 9], "than": 3, "those": [3, 9], "logic": 3, "behind": [3, 7], "creat": [3, 8], "instanc": 3, "specif": [3, 9], "helper": 3, "see": [3, 7, 9, 10], "below": [3, 8, 9], "accord": [3, 7], "present": 3, "public_api_v2": 4, "florian": 5, "klien": 5, "com": [5, 7], "philipp": 5, "kulich": 5, "marco": 5, "julian": 5, "moser": 5, "hyper_chrom": 5, "gmx": 5, "init": 6, "welcom": 7, "sxapi": 7, "contributor": [7, 8, 9], "guid": 7, "focus": 7, "potenti": 7, "familiar": 7, "develop": 7, "process": 7, "other": [7, 8, 9], "kind": [7, 9], "also": [7, 8, 9], "appreci": 7, "If": [7, 9], "git": 7, "have": [7, 9], "never": 7, "collabor": 7, "project": [7, 8, 10], "previous": 7, "pleas": 7, "look": 7, "org": [7, 9, 10], "resourc": 7, "list": [7, 9], "excel": 7, "freecodecamp": 7, "notic": [7, 9], "all": [7, 9], "user": 7, "open": 7, "consider": 7, "reason": [7, 9], "respect": 7, "when": 7, "doubt": 7, "python": [7, 8, 10], "softwar": [7, 9], "foundat": 7, "conduct": 7, "good": 7, "refer": [7, 8], "term": [7, 9], "behavior": 7, "guidelin": 7, "experi": 7, "bug": 7, "gener": [7, 9], "tracker": 7, "don": [7, 9], "anyth": 7, "feel": 7, "free": [7, 9], "fire": 7, "forget": 7, "includ": [7, 8, 9], "close": 7, "search": [7, 8], "sometim": 7, "solut": 7, "wa": [7, 9], "problem": 7, "consid": 7, "solv": 7, "inform": [7, 9, 10], "about": 7, "program": 7, "oper": 7, "step": 7, "reproduc": [7, 9], "try": 7, "simplifi": 7, "reproduct": [7, 9], "veri": 7, "minim": 7, "exampl": [7, 9], "still": 7, "illustr": 7, "face": 7, "By": [7, 8], "remov": 7, "factor": 7, "help": [7, 8], "u": 7, "identifi": [7, 9], "root": 7, "caus": [7, 9], "can": [7, 8], "doc": [7, 8], "make": [7, 9], "them": [7, 8], "readabl": [7, 9], "coher": 7, "ad": [7, 8], "miss": 7, "correct": 7, "mistak": 7, "sphinx": [7, 8], "its": [7, 9], "main": [7, 8], "compil": [7, 9], "restructuredtext": [7, 8], "markup": 7, "languag": [7, 9], "kept": 7, "updat": 7, "done": 7, "wai": 7, "github": 7, "web": 7, "interfac": [7, 9, 10], "provid": [7, 9], "quick": 7, "propos": 7, "file": [7, 8, 9], "while": [7, 9], "mechan": [7, 9], "tricki": 7, "normal": [7, 9], "work": [7, 9], "perfectli": 7, "fine": 7, "quit": 7, "handi": 7, "interest": 7, "method": 7, "out": [7, 9], "navig": 7, "folder": 7, "find": 7, "would": 7, "like": 7, "click": 7, "littl": 7, "pencil": 7, "icon": 7, "top": 7, "editor": 7, "onc": 7, "finish": 7, "edit": 7, "write": [7, 9], "messag": 7, "form": [7, 9], "bottom": 7, "page": [7, 8, 9], "describ": [7, 9], "made": [7, 9], "what": 7, "motiv": 7, "local": 7, "machin": 7, "tox": 7, "built": 7, "server": 7, "preview": 7, "browser": 7, "localhost": 7, "8000": 7, "python3": 7, "directori": 7, "_build": 7, "html": 7, "avail": [7, 9], "account": 7, "after": 7, "must": [7, 9], "access": 7, "fix": 7, "contact": 7, "need": 7, "befor": 7, "non": [7, 9], "trivial": 7, "best": 7, "first": 7, "discuss": [7, 9], "subject": [7, 9], "often": 7, "addit": [7, 8, 9], "avoid": 7, "unnecessari": 7, "we": [7, 9], "recommend": [7, 8, 9], "isol": 7, "virtual": 7, "instal": 7, "easili": 7, "via": 7, "either": [7, 9], "virtualenv": 7, "TO": 7, "venv": 7, "bin": 7, "do": [7, 9], "fork": 7, "button": 7, "copi": [7, 9], "under": [7, 9], "disk": 7, "yourlogin": 7, "cd": 7, "pip": 7, "setuptool": 7, "abl": 7, "putup": 7, "pre": 7, "commit": 7, "come": 7, "lot": 7, "hook": 7, "configur": [7, 9], "automat": 7, "being": 7, "written": [7, 8, 9], "branch": 7, "hold": [7, 9], "checkout": 7, "b": 7, "my": 7, "featur": 7, "master": 7, "add": [7, 8, 9], "docstr": [7, 8], "especi": 7, "thei": 7, "part": [7, 9], "yourself": 7, "author": [7, 8, 9], "rst": [7, 8], "re": 7, "modifi": [7, 9], "record": 7, "sure": 7, "valid": 7, "eventu": 7, "flake8": 7, "black": 7, "style": [7, 8], "compat": 7, "unit": 7, "test": 7, "case": 7, "just": 7, "bugfix": 7, "moreov": 7, "descript": [7, 9], "highli": 7, "In": [7, 9], "histori": 7, "graph": 7, "decor": 7, "pretti": [7, 8], "onelin": 7, "abbrev": 7, "recur": 7, "commun": [7, 9], "pattern": 7, "break": 7, "pipx": 7, "sever": 7, "av": 7, "everyth": 7, "push": 7, "origin": [7, 9], "go": 7, "pull": 7, "request": 7, "send": 7, "review": 7, "detail": [7, 10], "pr": 7, "might": 7, "draft": 7, "mark": [7, 9], "readi": 7, "feedback": 7, "continu": 7, "ci": 7, "requir": [7, 9], "tip": 7, "build": 7, "fetch": 7, "tag": 7, "upstream": 7, "command": [7, 10], "0": [7, 9], "return": 7, "script": 7, "egg": 7, "complet": 7, "well": 7, "src": 7, "depend": 7, "setup": 7, "cfg": 7, "txt": 7, "recreat": 7, "r": 7, "For": [7, 9, 10], "instead": 7, "reliabl": 7, "3": 7, "7": 7, "OR": [7, 9], "troubl": 7, "weird": 7, "error": 7, "upon": 7, "dedic": 7, "binari": 7, "freshli": 7, "pytest": 7, "drop": 7, "interact": [7, 10], "occur": 7, "order": [7, 8], "pdb": 7, "OF": [7, 9], "THE": 7, "fall": 7, "breakpoint": 7, "manual": 7, "group": 7, "permiss": [7, 9], "pypi": 7, "success": 7, "current": 7, "v1": 7, "clean": 7, "up": [7, 10], "dist": 7, "rm": 7, "rf": 7, "confus": 7, "old": 7, "dirti": 7, "hash": 7, "size": 7, "distribut": [7, 9], "too": 7, "big": 7, "500kb": 7, "unwant": 7, "clutter": 7, "mai": [7, 9], "been": [7, 9, 10], "accident": 7, "publish": 7, "upload": 7, "correctli": 7, "even": [7, 9], "though": 7, "focu": 7, "idea": 7, "collect": 7, "appli": [7, 9], "sort": 7, "privat": 7, "compani": 7, "proprietari": 7, "definit": [7, 9], "document": [8, 9], "your": [8, 9], "toctre": 8, "link": [8, 9], "changelog": 8, "domain": 8, "syntax": [8, 9], "numpi": 8, "scipi": 8, "matplotlib": 8, "panda": 8, "scikit": 8, "learn": 8, "extend": 8, "intersphinx_map": 8, "conf": 8, "py": 8, "extens": 8, "autodoc": 8, "let": [8, 10], "googl": 8, "classic": 8, "overview": 8, "note": 8, "contribut": [8, 9], "issu": [8, 9], "report": 8, "improv": [8, 9], "code": [8, 9], "maintain": 8, "task": 8, "licens": 8, "0b1": 8, "index": 8, "apach": 9, "januari": 9, "2004": 9, "www": 9, "AND": 9, "condit": 9, "FOR": 9, "shall": 9, "section": 9, "through": [9, 10], "9": 9, "licensor": 9, "copyright": 9, "owner": 9, "entiti": 9, "grant": 9, "legal": 9, "union": 9, "control": 9, "common": 9, "purpos": 9, "power": 9, "direct": 9, "indirect": 9, "whether": 9, "contract": 9, "otherwis": 9, "ii": 9, "ownership": 9, "fifti": 9, "percent": 9, "50": 9, "outstand": 9, "share": 9, "iii": 9, "benefici": 9, "individu": 9, "exercis": 9, "prefer": 9, "modif": 9, "limit": 9, "result": 9, "transform": 9, "translat": 9, "convers": 9, "media": 9, "type": 9, "authorship": 9, "indic": 9, "attach": 9, "appendix": 9, "deriv": 9, "editori": 9, "revis": 9, "annot": 9, "elabor": 9, "whole": 9, "remain": 9, "separ": 9, "mere": 9, "bind": 9, "thereof": 9, "intention": 9, "submit": 9, "inclus": 9, "behalf": 9, "electron": 9, "verbal": 9, "sent": 9, "mail": 9, "track": 9, "exclud": 9, "conspicu": 9, "design": 9, "Not": 9, "whom": 9, "ha": [9, 10], "receiv": 9, "subsequ": 9, "incorpor": 9, "within": 9, "each": 9, "herebi": 9, "perpetu": 9, "worldwid": 9, "exclus": 9, "charg": 9, "royalti": 9, "irrevoc": 9, "prepar": 9, "publicli": 9, "displai": 9, "sublicens": 9, "patent": 9, "except": 9, "state": 9, "offer": 9, "sell": 9, "import": [9, 10], "transfer": 9, "claim": 9, "necessarili": 9, "infring": 9, "alon": 9, "combin": 9, "institut": 9, "litig": 9, "against": 9, "cross": 9, "counterclaim": 9, "lawsuit": 9, "alleg": 9, "constitut": 9, "contributori": 9, "termin": 9, "redistribut": 9, "medium": 9, "without": 9, "meet": 9, "give": 9, "recipi": 9, "carri": 9, "promin": 9, "chang": 9, "retain": 9, "trademark": 9, "attribut": 9, "pertain": 9, "text": 9, "contain": 9, "least": 9, "place": 9, "along": 9, "wherev": 9, "third": 9, "parti": 9, "appear": 9, "own": 9, "alongsid": 9, "addendum": 9, "cannot": 9, "constru": 9, "statement": 9, "differ": 9, "compli": 9, "submiss": 9, "unless": 9, "explicitli": 9, "notwithstand": 9, "abov": 9, "noth": 9, "herein": 9, "supersed": 9, "agreement": 9, "execut": 9, "regard": 9, "doe": 9, "trade": 9, "servic": 9, "product": 9, "customari": 9, "disclaim": 9, "warranti": 9, "applic": 9, "law": 9, "agre": 9, "AS": 9, "basi": 9, "express": 9, "impli": 9, "titl": 9, "merchant": 9, "fit": 9, "A": 9, "particular": 9, "sole": 9, "determin": 9, "appropri": 9, "assum": 9, "risk": 9, "associ": 9, "liabil": 9, "event": 9, "theori": 9, "tort": 9, "neglig": 9, "deliber": 9, "grossli": 9, "liabl": 9, "damag": 9, "special": 9, "incident": 9, "consequenti": 9, "charact": 9, "aris": 9, "inabl": 9, "loss": 9, "goodwil": 9, "stoppag": 9, "comput": 9, "failur": 9, "malfunct": 9, "commerci": 9, "advis": 9, "accept": 9, "choos": 9, "fee": 9, "support": 9, "indemn": 9, "oblig": 9, "right": 9, "consist": 9, "howev": 9, "indemnifi": 9, "defend": 9, "harmless": 9, "incur": 9, "assert": 9, "how": 9, "To": 9, "boilerpl": 9, "field": 9, "enclos": 9, "bracket": 9, "replac": 9, "comment": 9, "easier": 9, "identif": 9, "archiv": 9, "complianc": 9, "obtain": 9, "govern": 9, "export": 10, "easi": 10, "understand": 10, "line": 10, "pyscaffold": 10, "4": 10, "usag": 10}, "objects": {"": [[1, 0, 0, "-", "sxapi"]], "sxapi": [[1, 0, 0, "-", "base"], [2, 0, 0, "-", "cli"], [4, 0, 0, "-", "publicV2"]], "sxapi.base": [[1, 1, 1, "", "ApiTypes"], [1, 1, 1, "", "BaseAPI"], [1, 1, 1, "", "IntegrationAPIV2"], [1, 1, 1, "", "PublicAPIV2"]], "sxapi.base.ApiTypes": [[1, 2, 1, "", "INTEGRATION"], [1, 2, 1, "", "PUBLIC"]], "sxapi.base.BaseAPI": [[1, 3, 1, "", "delete"], [1, 3, 1, "", "get"], [1, 3, 1, "", "get_token"], [1, 3, 1, "", "post"], [1, 3, 1, "", "put"], [1, 4, 1, "", "session"], [1, 3, 1, "", "to_url"]], "sxapi.cli": [[2, 0, 0, "-", "cli"], [2, 0, 0, "-", "credentials"], [3, 0, 0, "-", "subparser"]], "sxapi.cli.cli": [[2, 1, 1, "", "Cli"], [2, 5, 1, "", "cli_run"]], "sxapi.cli.cli.Cli": [[2, 3, 1, "", "api_status"], [2, 3, 1, "", "parse_args"], [2, 3, 1, "", "run"], [2, 3, 1, "", "version_info"]], "sxapi.cli.credentials": [[2, 1, 1, "", "UserCredentials"]], "sxapi.cli.credentials.UserCredentials": [[2, 3, 1, "", "check_credentials_set"], [2, 3, 1, "", "clear_token_keyring"], [2, 3, 1, "", "get_token_environment"], [2, 3, 1, "", "get_token_keyring"], [2, 3, 1, "", "set_token_keyring"]], "sxapi.cli.subparser": [[3, 0, 0, "-", "get_sensor_data"], [3, 0, 0, "-", "token"]], "sxapi.cli.subparser.get_sensor_data": [[3, 5, 1, "", "create_gsd_parser"], [3, 5, 1, "", "gsd_sub_function"]], "sxapi.cli.subparser.token": [[3, 5, 1, "", "create_token_parser"], [3, 5, 1, "", "handle_clear_token"], [3, 5, 1, "", "handle_new_token"], [3, 5, 1, "", "handle_print_token"], [3, 5, 1, "", "handle_set_token"], [3, 5, 1, "", "token_sub_function"]], "sxapi.publicV2": [[4, 0, 0, "-", "sensordata"]], "sxapi.publicV2.sensordata": [[4, 5, 1, "", "get_sensor_data_from_animal"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:property", "5": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "property", "Python property"], "5": ["py", "function", "Python function"]}, "titleterms": {"sxapi": [0, 1, 2, 3, 4, 8, 10], "packag": [1, 2], "subpackag": [1, 2], "submodul": [1, 2, 3, 4], "base": 1, "modul": [1, 2, 3, 4], "content": [1, 2, 8], "cli": [2, 3], "credenti": 2, "subpars": 3, "namespac": [3, 4], "get_sensor_data": 3, "token": 3, "publicv2": 4, "sensordata": 4, "contributor": 5, "changelog": 6, "version": 6, "1": 6, "0b1": 6, "contribut": 7, "issu": 7, "report": 7, "document": 7, "improv": 7, "code": 7, "submit": 7, "an": 7, "creat": 7, "environ": 7, "clone": 7, "repositori": 7, "implement": 7, "your": 7, "chang": 7, "troubleshoot": 7, "maintain": 7, "task": 7, "releas": 7, "todo": 7, "indic": 8, "tabl": 8, "licens": 9, "note": 10}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"sxapi": [[0, "sxapi"], [8, "sxapi"], [10, "sxapi"]], "sxapi package": [[1, "sxapi-package"]], "Subpackages": [[1, "subpackages"], [2, "subpackages"]], "Submodules": [[1, "submodules"], [2, "submodules"], [3, "submodules"], [4, "submodules"]], "sxapi.base module": [[1, "module-sxapi.base"]], "Module contents": [[1, "module-sxapi"], [2, "module-sxapi.cli"]], "sxapi.cli package": [[2, "sxapi-cli-package"]], "sxapi.cli.cli module": [[2, "module-sxapi.cli.cli"]], "sxapi.cli.credentials module": [[2, "module-sxapi.cli.credentials"]], "sxapi.cli.subparser namespace": [[3, "module-sxapi.cli.subparser"]], "sxapi.cli.subparser.get_sensor_data module": [[3, "module-sxapi.cli.subparser.get_sensor_data"]], "sxapi.cli.subparser.token module": [[3, "module-sxapi.cli.subparser.token"]], "sxapi.publicV2 namespace": [[4, "module-sxapi.publicV2"]], "sxapi.publicV2.sensordata module": [[4, "module-sxapi.publicV2.sensordata"]], "Contributors": [[5, "contributors"]], "Changelog": [[6, "changelog"]], "Version 1.0b1": [[6, "version-1-0b1"]], "Contributing": [[7, "contributing"]], "Issue Reports": [[7, "issue-reports"]], "Documentation Improvements": [[7, "documentation-improvements"]], "Code Contributions": [[7, "code-contributions"]], "Submit an issue": [[7, "submit-an-issue"]], "Create an environment": [[7, "create-an-environment"]], "Clone the repository": [[7, "clone-the-repository"]], "Implement your changes": [[7, "implement-your-changes"]], "Submit your contribution": [[7, "submit-your-contribution"]], "Troubleshooting": [[7, "troubleshooting"]], "Maintainer tasks": [[7, "maintainer-tasks"]], "Releases": [[7, "releases"]], "Todo": [[7, "id2"]], "Contents": [[8, "contents"]], "Indices and tables": [[8, "indices-and-tables"]], "License": [[9, "license"]], "Note": [[10, "note"]]}, "indexentries": {"apitypes (class in sxapi.base)": [[1, "sxapi.base.ApiTypes"]], "baseapi (class in sxapi.base)": [[1, "sxapi.base.BaseAPI"]], "integration (sxapi.base.apitypes attribute)": [[1, "sxapi.base.ApiTypes.INTEGRATION"]], "integrationapiv2 (class in sxapi.base)": [[1, "sxapi.base.IntegrationAPIV2"]], "public (sxapi.base.apitypes attribute)": [[1, "sxapi.base.ApiTypes.PUBLIC"]], "publicapiv2 (class in sxapi.base)": [[1, "sxapi.base.PublicAPIV2"]], "delete() (sxapi.base.baseapi method)": [[1, "sxapi.base.BaseAPI.delete"]], "get() (sxapi.base.baseapi method)": [[1, "sxapi.base.BaseAPI.get"]], "get_token() (sxapi.base.baseapi method)": [[1, "sxapi.base.BaseAPI.get_token"]], "module": [[1, "module-sxapi"], [1, "module-sxapi.base"], [2, "module-sxapi.cli"], [2, "module-sxapi.cli.cli"], [2, "module-sxapi.cli.credentials"], [3, "module-sxapi.cli.subparser"], [3, "module-sxapi.cli.subparser.get_sensor_data"], [3, "module-sxapi.cli.subparser.token"], [4, "module-sxapi.publicV2"], [4, "module-sxapi.publicV2.sensordata"]], "post() (sxapi.base.baseapi method)": [[1, "sxapi.base.BaseAPI.post"]], "put() (sxapi.base.baseapi method)": [[1, "sxapi.base.BaseAPI.put"]], "session (sxapi.base.baseapi property)": [[1, "sxapi.base.BaseAPI.session"]], "sxapi": [[1, "module-sxapi"]], "sxapi.base": [[1, "module-sxapi.base"]], "to_url() (sxapi.base.baseapi method)": [[1, "sxapi.base.BaseAPI.to_url"]], "cli (class in sxapi.cli.cli)": [[2, "sxapi.cli.cli.Cli"]], "usercredentials (class in sxapi.cli.credentials)": [[2, "sxapi.cli.credentials.UserCredentials"]], "api_status() (sxapi.cli.cli.cli static method)": [[2, "sxapi.cli.cli.Cli.api_status"]], "check_credentials_set() (sxapi.cli.credentials.usercredentials method)": [[2, "sxapi.cli.credentials.UserCredentials.check_credentials_set"]], "clear_token_keyring() (sxapi.cli.credentials.usercredentials method)": [[2, "sxapi.cli.credentials.UserCredentials.clear_token_keyring"]], "cli_run() (in module sxapi.cli.cli)": [[2, "sxapi.cli.cli.cli_run"]], "get_token_environment() (sxapi.cli.credentials.usercredentials method)": [[2, "sxapi.cli.credentials.UserCredentials.get_token_environment"]], "get_token_keyring() (sxapi.cli.credentials.usercredentials method)": [[2, "sxapi.cli.credentials.UserCredentials.get_token_keyring"]], "parse_args() (sxapi.cli.cli.cli static method)": [[2, "sxapi.cli.cli.Cli.parse_args"]], "run() (sxapi.cli.cli.cli method)": [[2, "sxapi.cli.cli.Cli.run"]], "set_token_keyring() (sxapi.cli.credentials.usercredentials method)": [[2, "sxapi.cli.credentials.UserCredentials.set_token_keyring"]], "sxapi.cli": [[2, "module-sxapi.cli"]], "sxapi.cli.cli": [[2, "module-sxapi.cli.cli"]], "sxapi.cli.credentials": [[2, "module-sxapi.cli.credentials"]], "version_info() (sxapi.cli.cli.cli static method)": [[2, "sxapi.cli.cli.Cli.version_info"]], "create_gsd_parser() (in module sxapi.cli.subparser.get_sensor_data)": [[3, "sxapi.cli.subparser.get_sensor_data.create_gsd_parser"]], "create_token_parser() (in module sxapi.cli.subparser.token)": [[3, "sxapi.cli.subparser.token.create_token_parser"]], "gsd_sub_function() (in module sxapi.cli.subparser.get_sensor_data)": [[3, "sxapi.cli.subparser.get_sensor_data.gsd_sub_function"]], "handle_clear_token() (in module sxapi.cli.subparser.token)": [[3, "sxapi.cli.subparser.token.handle_clear_token"]], "handle_new_token() (in module sxapi.cli.subparser.token)": [[3, "sxapi.cli.subparser.token.handle_new_token"]], "handle_print_token() (in module sxapi.cli.subparser.token)": [[3, "sxapi.cli.subparser.token.handle_print_token"]], "handle_set_token() (in module sxapi.cli.subparser.token)": [[3, "sxapi.cli.subparser.token.handle_set_token"]], "sxapi.cli.subparser": [[3, "module-sxapi.cli.subparser"]], "sxapi.cli.subparser.get_sensor_data": [[3, "module-sxapi.cli.subparser.get_sensor_data"]], "sxapi.cli.subparser.token": [[3, "module-sxapi.cli.subparser.token"]], "token_sub_function() (in module sxapi.cli.subparser.token)": [[3, "sxapi.cli.subparser.token.token_sub_function"]], "get_sensor_data_from_animal() (in module sxapi.publicv2.sensordata)": [[4, "sxapi.publicV2.sensordata.get_sensor_data_from_animal"]], "sxapi.publicv2": [[4, "module-sxapi.publicV2"]], "sxapi.publicv2.sensordata": [[4, "module-sxapi.publicV2.sensordata"]]}}) \ No newline at end of file