From e1a8ff4391c9f8c43bbbbbdc57f3b54c3338f544 Mon Sep 17 00:00:00 2001 From: snuffkin Date: Thu, 14 Dec 2023 11:05:42 +0900 Subject: [PATCH] update document --- .../quri_parts/riqu/quri_parts.riqu.backend.html | 12 ++++++++++++ .../riqu/quri_parts.riqu.backend.sampling.html | 12 ++++++++++++ quri_parts/riqu/backend/sampling.py | 15 +++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/docs_html/quri_parts/riqu/quri_parts.riqu.backend.html b/docs_html/quri_parts/riqu/quri_parts.riqu.backend.html index 321698a..17e8a19 100644 --- a/docs_html/quri_parts/riqu/quri_parts.riqu.backend.html +++ b/docs_html/quri_parts/riqu/quri_parts.riqu.backend.html @@ -273,6 +273,18 @@
[default]
 url=<base URL>
 api_token=<API token>
+
+[sectionA]
+url=<base URL>
+api_token=<API token>
+
+[sectioB]
+url=<base URL>
+api_token=<API token>
+
+
+

If sectionA settings are to be used, initialize RiquSamplingBackend as follows

+
backend = RiquSamplingBackend(RiquConfig.from_file("sectionA"))
 
diff --git a/docs_html/quri_parts/riqu/quri_parts.riqu.backend.sampling.html b/docs_html/quri_parts/riqu/quri_parts.riqu.backend.sampling.html index e0bc0e9..06f69b3 100644 --- a/docs_html/quri_parts/riqu/quri_parts.riqu.backend.sampling.html +++ b/docs_html/quri_parts/riqu/quri_parts.riqu.backend.sampling.html @@ -542,6 +542,18 @@
[default]
 url=<base URL>
 api_token=<API token>
+
+[sectionA]
+url=<base URL>
+api_token=<API token>
+
+[sectioB]
+url=<base URL>
+api_token=<API token>
+
+
+

If sectionA settings are to be used, initialize RiquSamplingBackend as follows

+
backend = RiquSamplingBackend(RiquConfig.from_file("sectionA"))
 
diff --git a/quri_parts/riqu/backend/sampling.py b/quri_parts/riqu/backend/sampling.py index af1df7a..b6d6079 100644 --- a/quri_parts/riqu/backend/sampling.py +++ b/quri_parts/riqu/backend/sampling.py @@ -406,6 +406,21 @@ def from_file(section: str = "default", path: str = "~/.riqu") -> "RiquConfig": [default] url= api_token= + + [sectionA] + url= + api_token= + + [sectioB] + url= + api_token= + + If ``sectionA`` settings are to be used, initialize ``RiquSamplingBackend`` as follows + + .. code-block:: + + backend = RiquSamplingBackend(RiquConfig.from_file("sectionA")) + """ path = os.path.expandvars(path) path = os.path.expanduser(path)