Skip to content

Commit

Permalink
Fixes docs build, adds workflow to build docs.
Browse files Browse the repository at this point in the history
Improves auto-generated source files and adds more information.
  • Loading branch information
Daverball committed Aug 27, 2024
1 parent bbb930a commit 7bb79b3
Show file tree
Hide file tree
Showing 16 changed files with 4,807 additions and 1,598 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Docs

on:
workflow_dispatch: # allow to run manually
push:
branches: [master]

jobs:
pages:
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
pages: write
id-token: write

steps:
- id: deployment
uses: sphinx-notes/pages@v3
with:
python_version: '3.11'
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help
help:
Expand Down
File renamed without changes.
File renamed without changes
9 changes: 9 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Suitable API Documentation
==========================

.. automodule:: suitable.api
:members: install_strategy_plugins

.. autoclass:: suitable.api.Api
:members:
:inherited-members:
26 changes: 14 additions & 12 deletions docs/source/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
]
if sys.version_info >= (3, 11):
extensions += ['sphinxcontrib.autodoc_inherit_overload']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
#source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
Expand All @@ -49,25 +51,25 @@
master_doc = 'index'

# General information about the project.
project = u'Suitable'
copyright = u'2016, Denis Krienbühl'
author = u'Denis Krienbühl'
project = 'Suitable'
copyright = '2016, Denis Krienbühl'
author = 'Denis Krienbühl'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0.19.2'
version = '0.19.2'
# The full version, including alpha/beta/rc tags.
release = u'0.19.2'
release = '0.19.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand All @@ -77,7 +79,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
exclude_patterns = ['_build']

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down Expand Up @@ -211,7 +213,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Suitable.tex', u'Suitable Documentation',
(master_doc, 'Suitable.tex', 'Suitable Documentation',
u'Denis Krienbühl', 'manual'),
]

Expand Down Expand Up @@ -241,7 +243,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'suitable', u'Suitable Documentation',
(master_doc, 'suitable', 'Suitable Documentation',
[author], 1)
]

Expand All @@ -255,7 +257,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Suitable', u'Suitable Documentation',
(master_doc, 'Suitable', 'Suitable Documentation',
author, 'Suitable', 'One line description of project.',
'Miscellaneous'),
]
Expand All @@ -274,7 +276,7 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)}

# Document hidden methods as well.
autoclass_content = 'both'
File renamed without changes.
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sphinx
sphinx
sphinxcontrib.autodoc-inherit-overload
5 changes: 0 additions & 5 deletions docs/source/api.rst

This file was deleted.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ explicit_package_bases = true
strict = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"

[[tool.mypy.overrides]]
module = ["suitable._module_types"]
warn_return_any = false

[tool.tox]
legacy_tox_ini = """
[tox]
Expand Down
Loading

0 comments on commit 7bb79b3

Please sign in to comment.