Skip to content

Commit

Permalink
Documentation: Serve docs via https://influxio.readthedocs.io/
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed May 7, 2024
1 parent ca40188 commit c966e2d
Show file tree
Hide file tree
Showing 12 changed files with 367 additions and 7 deletions.
29 changes: 29 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .readthedocs.yml
# Read the Docs configuration file

# Details
# - https://docs.readthedocs.io/en/stable/config-file/v2.html

# Required
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.11"

python:
install:
- method: pip
path: .
extra_requirements:
- docs

sphinx:
configuration: doc/conf.py
builder: html
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF
#formats:
# - pdf
6 changes: 3 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##################
influxio changelog
##################
#########
Changelog
#########


in progress
Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/_build
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
8 changes: 4 additions & 4 deletions doc/backlog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################
influxio backlog
################
#######
Backlog
#######


************
Expand All @@ -27,7 +27,7 @@ Iteration +2
************
- [o] Fix ``cratedb_toolkit.sqlalchemy.patch_inspector()`` re. reflection of ``?schema=`` URL parameter
- [o] Fix ``crate.client.sqlalchemy.dialect.DateTime`` re. ``TimezoneUnawareException``
- [o] Support InfluxDB 1.x
- [o] Support InfluxDB 1.x and 3.x
- [o] Add Docker Compose file for auxiliary services
- [o] Refactor general purpose code to ``pueblo`` package
- [o] Verify import and export of ILP and CSV files works well
Expand Down
1 change: 1 addition & 0 deletions doc/changes.rst
125 changes: 125 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "influxio"
copyright = "2018-2024, The Panodata Developers"
author = "The Panodata Developers"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"myst_parser",
"sphinx_copybutton",
"sphinx_design",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.ifconfig",
"sphinxcontrib.mermaid",
"sphinxext.opengraph",
]

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "furo"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.

html_title = "influxio"

html_theme_options = {
"sidebar_hide_name": False,
# https://github.com/pradyunsg/furo/blob/main/src/furo/assets/styles/variables/_colors.scss
# "light_logo": "influxio-logo-light.svg",
# "dark_logo": "influxio-logo-dark.svg",
"dark_css_variables": {
"color-brand-primary": "#436FCEFF",
"color-background-border": "#4743CE4F",
},
"light_css_variables": {
"color-brand-primary": "#436FCEFF",
"color-background-border": "#4743CE4F",
},
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}

html_show_sourcelink = True


# -- Intersphinx ----------------------------------------------------------

intersphinx_mapping = {
# "https://docs.python.org/": None,
}
linkcheck_ignore = []

# Disable caching remote inventories completely.
# http://www.sphinx-doc.org/en/stable/ext/intersphinx.html#confval-intersphinx_cache_limit
# intersphinx_cache_limit = 0


# -- Extension configuration -------------------------------------------------

sphinx_tabs_valid_builders = ["linkcheck"]
todo_include_todos = True

# Configure sphinx-copybutton
copybutton_remove_prompts = True
copybutton_line_continuation_character = "\\"
copybutton_prompt_text = r">>> |\.\.\. |\$ |sh\$ |PS> |cr> |mysql> |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
copybutton_prompt_is_regexp = True

# Configure sphinxext-opengraph
ogp_site_url = "https://influxio.readthedocs.io/"
ogp_enable_meta_description = True
# ogp_image = "http://example.org/image.png"
# ogp_description_length = 300


# -- Options for MyST -------------------------------------------------

myst_heading_anchors = 3
myst_enable_extensions = [
"attrs_block",
"attrs_inline",
"colon_fence",
"deflist",
"fieldlist",
"html_admonition",
"html_image",
"linkify",
"replacements",
"strikethrough",
"substitution",
"tasklist",
]
myst_substitutions = {}
3 changes: 3 additions & 0 deletions doc/development.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. _development:
.. _sandbox:

###########
Development
###########
Expand Down
116 changes: 116 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
(index)=
# influxio

[![CI][badge-tests]][project-tests]
[![Coverage Status][badge-coverage]][project-codecov]
[![Documentation][badge-documentation]][project-documentation]
[![License][badge-license]][project-license]
[![Downloads per month][badge-downloads-per-month]][project-downloads]

[![Supported Python versions][badge-python-versions]][project-pypi]
[![Status][badge-status]][project-pypi]
[![Package version][badge-package-version]][project-pypi]

» [Documentation]
| [Changelog]
| [PyPI]
| [Issues]
| [Source code]
| [License]


## About

Import and export data into/from InfluxDB, for humans and machines.


## Features

- **Capable:** Connect to the InfluxDB HTTP API, or read from an InfluxDB
TSM data directory directly.

- **Versatile:** Use it as a command-line program, pipeline element,
or as a library within your own applications.

- **Polyglot:** Support I/O operations between InfluxDB, any SQL database
supported by SQLAlchemy, file formats supported by pandas/Dask, and
the native InfluxDB line protocol (ILP), on both import and export
directions.


## Synopsis

```shell

# Export from API to database.
influxio copy \
"http://example:token@localhost:8086/testdrive/demo" \
"sqlite://export.sqlite?table=demo"

# Export from data directory to line protocol format.
influxio copy \
"file:///path/to/influxdb/engine?bucket-id=372d1908eab801a6&measurement=demo" \
"file://export.lp"
```


## Documentation

Please visit the [README](#readme) document to learn what you can do with
the `influxio` package. Effectively, it is all about the `influxio copy`
primitive, which accepts a range of variants on its `SOURCE` and `TARGET`
arguments, in URL formats.


## Development

Contributions are very much welcome. Please visit the [](#sandbox)
documentation to learn about how to spin up a sandbox environment on your
workstation, or create a [ticket][Issues] to report a bug or share an idea
about a possible feature.



```{toctree}
:maxdepth: 3
:caption: Documentation
:hidden:
README <readme>
```

```{toctree}
:maxdepth: 1
:caption: Workbench
:hidden:
changes
backlog
development
```



[Changelog]: https://github.com/daq-tools/influxio/blob/main/CHANGES.rst
[development documentation]: https://influxio.readthedocs.io/development.html
[Documentation]: https://influxio.readthedocs.io/
[Issues]: https://github.com/daq-tools/influxio/issues
[License]: https://github.com/daq-tools/influxio/blob/main/LICENSE
[PyPI]: https://pypi.org/project/influxio/
[Source code]: https://github.com/daq-tools/influxio
[influxio]: https://influxio.readthedocs.io/

[badge-coverage]: https://codecov.io/gh/daq-tools/influxio/branch/main/graph/badge.svg
[badge-documentation]: https://img.shields.io/readthedocs/influxio
[badge-downloads-per-month]: https://pepy.tech/badge/influxio/month
[badge-license]: https://img.shields.io/github/license/daq-tools/influxio.svg
[badge-package-version]: https://img.shields.io/pypi/v/influxio.svg
[badge-python-versions]: https://img.shields.io/pypi/pyversions/influxio.svg
[badge-status]: https://img.shields.io/pypi/status/influxio.svg
[badge-tests]: https://github.com/daq-tools/influxio/actions/workflows/tests.yml/badge.svg
[project-codecov]: https://codecov.io/gh/daq-tools/influxio
[project-documentation]: https://influxio.readthedocs.io/
[project-downloads]: https://pepy.tech/project/influxio/
[project-license]: https://github.com/daq-tools/influxio/blob/main/LICENSE
[project-pypi]: https://pypi.org/project/influxio
[project-tests]: https://github.com/daq-tools/influxio/actions/workflows/tests.yml
35 changes: 35 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
1 change: 1 addition & 0 deletions doc/readme.rst
Loading

0 comments on commit c966e2d

Please sign in to comment.