Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor so up to PEP8 standards. #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 16 additions & 43 deletions openfl-develop/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,24 @@
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0


# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
import os
import sys
from datetime import datetime

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
from datetime import datetime

sys.path.insert(0, os.path.abspath('../'))

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# import sphinx_rtd_theme # NOQA:E800
# import sphinxcontrib.napoleon # NOQA:E800

extensions = [
'sphinx_rtd_theme',
'sphinx.ext.autosectionlabel',
'sphinx.ext.napoleon',
'sphinx-prompt',
'sphinx_substitution_extensions',
'sphinx.ext.ifconfig',
'sphinxcontrib.kroki'
]

# -- Project information -----------------------------------------------------

# This will replace the |variables| within the rST documents automatically

PRODUCT_VERSION = 'Intel'
# PRODUCT_VERSION = "OFL" # NOQA:E800

# tags.add(PRODUCT_VERSION) # NOQA:E800

if PRODUCT_VERSION == 'Intel':

project = 'OpenFL'
copyright = f'{datetime.now().year}, Intel' # NOQA
copyright = f'{datetime.now().year}, Intel' # NOQA
author = 'Intel Corporation'
version = f'{datetime.now().year}.{datetime.now().month}'
release = version
Expand All @@ -64,11 +32,8 @@
.. |productZip| replace:: openfl.zip
.. |productDir| replace:: openfl
.. |productWheel| replace:: openfl

'''

else:

project = 'Open Federated Learning'
author = 'FeTS'
master_doc = 'index'
Expand All @@ -81,10 +46,21 @@
.. |productZip| replace:: OpenFederatedLearning.zip
.. |productDir| replace:: OpenFederatedLearning
.. |productWheel| replace:: openfl

.. _Makefile: https://github.com/IntelLabs/OpenFederatedLearning/blob/master/Makefile
'''

# -- General configuration ---------------------------------------------------

extensions = [
'sphinx_rtd_theme',
'sphinx.ext.autosectionlabel',
'sphinx.ext.napoleon',
'sphinx-prompt',
'sphinx_substitution_extensions',
'sphinx.ext.ifconfig',
'sphinxcontrib.kroki'
]

napoleon_google_docstring = True

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -97,9 +73,6 @@

# -- 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 = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down