diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..f44c84ca --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,18 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: miniconda3-4.7 + +conda: + environment: docs/environment.yml + +python: + install: + - method: pip + path: . + +sphinx: + configuration: docs/source/conf.py + fail_on_warning: true diff --git a/docs/environment.yml b/docs/environment.yml new file mode 100644 index 00000000..328477cf --- /dev/null +++ b/docs/environment.yml @@ -0,0 +1,9 @@ +name: s3fs +channels: + - defaults +dependencies: + - python= 3.9 + - botocore + - docutils<0.18 + - numpydoc + - sphinx_rtd_theme diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 58e9ba3b..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -numpydoc -botocore -sphinx -sphinx-rtd-theme -docutils<0.18 diff --git a/docs/source/conf.py b/docs/source/conf.py index b7ea58bf..8a712fe7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os # If extensions (or modules to document with autodoc) are in another directory, @@ -113,20 +112,13 @@ todo_include_todos = False extlinks = { - "pr": ("https://github.com/fsspec/s3fs/pull/%s", "PR #"), + "pr": ("https://github.com/fsspec/s3fs/pull/%s", "PR #%s"), } # -- Options for HTML output ---------------------------------------------- -# Taken from docs.readthedocs.io: -# on_rtd is whether we are on readthedocs.io -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_theme = 'sphinx_rtd_theme' # 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 @@ -278,6 +270,7 @@ #man_show_urls = False + # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples