From 8b76afb54f73311accef5dabf08279262fbdfacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jules=20Ch=C3=A9ron?= Date: Wed, 8 Mar 2023 21:23:57 +0100 Subject: [PATCH] fix: Fix sphinx documentation build and add support for readthedocs V2 - Upgrade Sphinx versions & sphinx_rtd_theme - Install optional dependencies for documentation build - Update .readthedocs.yml to V2 format - Use `html_css_files` to inject custom css in `conf.py` --- .readthedocs.yml | 24 +++++++++++++++++++----- CHANGELOG.md | 3 +++ README.rst | 10 +++++----- docs/conf.py | 13 +++++++------ docs/requirements.txt | 3 ++- 5 files changed, 36 insertions(+), 17 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index d4d9dfbe..176f629a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,7 +1,21 @@ +version: 2 + +formats: all + build: - image: latest + os: ubuntu-22.04 + tools: + python: "3.7" + +sphinx: + configuration: docs/conf.py + python: - version: 3.7 - pip_install: true - extra_requirements: - - docs + install: + - requirements: docs/requirements.txt + - method: pip + path: . + extra_requirements: + - async + - extra + - ciso \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e007b99..b342f80a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ This release introduces a support for new version of InfluxDB API definitions wi 1. [#583](https://github.com/influxdata/influxdb-client-python/pull/583): Async HTTP client doesn't always use `HTTP_PROXY`/`HTTPS_PROXY` environment variables. [async/await] 1. [#584](https://github.com/influxdata/influxdb-client-python/pull/584): Parsing empty query result value as `numpy.NaN` +### Documentation +1. [#566](https://github.com/influxdata/influxdb-client-python/pull/566): Fix Sphinx documentation build and add support `.readthedocs.yml` V2 configuration file + ## 1.36.1 [2023-02-23] ### Bug Fixes diff --git a/README.rst b/README.rst index 9f35598f..e5a77e99 100644 --- a/README.rst +++ b/README.rst @@ -125,7 +125,7 @@ If your application uses async/await in Python you can install with the ``async` $ pip install influxdb-client[async] -For more info se `How to use Asyncio`_. +For more info see `How to use Asyncio`. Setuptools ^^^^^^^^^^ @@ -208,7 +208,7 @@ The following options are supported: self.client = InfluxDBClient.from_config_file("config.ini") -.. code-block:: +.. code-block:: ini [influx2] url=http://localhost:8086 @@ -278,7 +278,7 @@ Example how to enable profilers using API: Example of a profiler output: -.. code-block:: +.. code-block:: text =============== Profiler: query @@ -374,7 +374,7 @@ Example how to use profilers with callback: Example output of this callback: -.. code-block:: +.. code-block:: text Custom processing of profiler result: {'result': '_profiler', 'table': 0, '_measurement': 'profiler/query', 'TotalDuration': 18843792, 'CompileDuration': 1078666, 'QueueDuration': 93375, 'PlanDuration': 0, 'RequeueDuration': 0, 'ExecuteDuration': 17371000, 'Concurrency': 0, 'MaxAllocated': 448, 'TotalAllocated': 0, 'RuntimeErrors': None, 'flux/query-plan': 'digraph {\r\n ReadRange2\r\n generated_yield\r\n\r\n ReadRange2 -> generated_yield\r\n}\r\n\r\n', 'influxdb/scanned-bytes': 0, 'influxdb/scanned-values': 0} Custom processing of profiler result: {'result': '_profiler', 'table': 1, '_measurement': 'profiler/operator', 'Type': '*influxdb.readFilterSource', 'Label': 'ReadRange2', 'Count': 1, 'MinDuration': 3274084, 'MaxDuration': 3274084, 'DurationSum': 3274084, 'MeanDuration': 3274084.0} @@ -773,7 +773,7 @@ The ``client`` is able to retrieve data in `Pandas DataFrame =5.0.0 +sphinx_rtd_theme==1.1.0 \ No newline at end of file