Skip to content

Commit 6fb5e80

Browse files
chauhankaranraj4n4nd
authored andcommitted
Fix doc errors and inaccuracies. Fixes #275
1 parent 35b3ef7 commit 6fb5e80

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
# -- Options for intersphinx extension ---------------------------------------
201201

202202
# Example configuration for intersphinx: refer to the Python standard library.
203-
intersphinx_mapping = {"https://docs.python.org/": None}
203+
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
204204

205205
# -- Options for todo extension ----------------------------------------------
206206

prometheus_api_client/metric_range_df.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class MetricRangeDataFrame(DataFrame):
4242
.. code-block:: python
4343
4444
prom = PrometheusConnect()
45-
metric_data = prom.get_current_metric_value(metric_name='up', label_config=my_label_config)
45+
metric_data = prom.get_metric_range_data(metric_name='up', label_config=my_label_config)
4646
metric_df = MetricRangeDataFrame(metric_data)
4747
metric_df.head()
4848
'''

prometheus_api_client/prometheus_connect.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class PrometheusConnect:
3838
requests library auth parameter for further explanation.
3939
:param proxy: (Optional) Proxies dictionary to enable connection through proxy.
4040
Example: {"http_proxy": "<ip_address/hostname:port>", "https_proxy": "<ip_address/hostname:port>"}
41-
:param session (Optional) Custom requests.Session to enable complex HTTP configuration
41+
:param session: (Optional) Custom requests.Session to enable complex HTTP configuration
4242
:param timeout: (Optional) A timeout (in seconds) applied to all requests
4343
:param method: (Optional) (str) HTTP Method (GET or POST) to use for Query APIs that allow POST
4444
(/query, /query_range and /labels). Use POST for large and complex queries. Default is GET.
@@ -444,8 +444,8 @@ def custom_query(self, query: str, params: dict = None, timeout: int = None):
444444
This method takes as input a string which will be sent as a query to
445445
the specified Prometheus Host. This query is a PromQL query.
446446
447-
:param query: (str) This is a PromQL query, a few examples can be found
448-
at https://prometheus.io/docs/prometheus/latest/querying/examples/
447+
:param query: (str) This is a PromQL query, a few examples can be found at
448+
`PromQL query examples <https://prometheus.io/docs/prometheus/latest/querying/examples/>`_
449449
:param params: (dict) Optional dictionary containing GET parameters to be
450450
sent along with the API request, such as "time"
451451
:param timeout: (Optional) A timeout (in seconds) applied to the request
@@ -487,8 +487,8 @@ def custom_query_range(
487487
This method takes as input a string which will be sent as a query to
488488
the specified Prometheus Host. This query is a PromQL query.
489489
490-
:param query: (str) This is a PromQL query, a few examples can be found
491-
at https://prometheus.io/docs/prometheus/latest/querying/examples/
490+
:param query: (str) This is a PromQL query, a few examples can be found at
491+
`PromQL query examples <https://prometheus.io/docs/prometheus/latest/querying/examples/>`_
492492
:param start_time: (datetime) A datetime object that specifies the query range start time.
493493
:param end_time: (datetime) A datetime object that specifies the query range end time.
494494
:param step: (str) Query resolution step width in duration format or float number of seconds
@@ -545,8 +545,8 @@ def get_metric_aggregation(
545545
The received query is passed to the custom_query_range method which returns
546546
the result of the query and the values are extracted from the result.
547547
548-
:param query: (str) This is a PromQL query, a few examples can be found
549-
at https://prometheus.io/docs/prometheus/latest/querying/examples/
548+
:param query: (str) This is a PromQL query, a few examples can be found at
549+
`PromQL query examples <https://prometheus.io/docs/prometheus/latest/querying/examples/>`_
550550
:param operations: (list) A list of operations to perform on the values.
551551
Operations are specified in string type.
552552
:param start_time: (datetime) A datetime object that specifies the query range start time.

0 commit comments

Comments
 (0)