diff --git a/docs/authors.doctree b/docs/authors.doctree deleted file mode 100644 index 10415ba..0000000 Binary files a/docs/authors.doctree and /dev/null differ diff --git a/docs/changes.doctree b/docs/changes.doctree deleted file mode 100644 index abe3e8c..0000000 Binary files a/docs/changes.doctree and /dev/null differ diff --git a/docs/code_of_conduct.doctree b/docs/code_of_conduct.doctree deleted file mode 100644 index 9684295..0000000 Binary files a/docs/code_of_conduct.doctree and /dev/null differ diff --git a/docs/conf.py b/docs/conf.py index 88630d4..d142fb5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,10 +16,8 @@ # 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 -# sys.path.insert(0, os.path.abspath('.')) + +import qdarkstyle import os import sys @@ -35,15 +33,15 @@ sys.path.insert(0, os.path.abspath('..')) # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', - 'sphinx.ext.todo', - 'sphinx.ext.coverage', - 'sphinx.ext.mathjax', - 'sphinx.ext.ifconfig', - 'sphinx.ext.viewcode', - 'sphinx.ext.githubpages', - 'sphinx.ext.napoleon'] + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages', + 'sphinx.ext.napoleon'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -59,7 +57,7 @@ master_doc = 'index' # General information about the project. project = 'QDarkStyle' -copyright = '2018, Colin Duquesnoy' +copyright = '2019, Colin Duquesnoy' author = 'Colin Duquesnoy' # The version info for the project you're documenting, acts as replacement for @@ -67,7 +65,6 @@ author = 'Colin Duquesnoy' # built documents. # # The short X.Y version. -import qdarkstyle version = qdarkstyle.__version__ # The full version, including alpha/beta/rc tags. release = '' @@ -179,7 +176,5 @@ texinfo_documents = [ ] - - # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} diff --git a/docs/contributing.doctree b/docs/contributing.doctree deleted file mode 100644 index 1fac347..0000000 Binary files a/docs/contributing.doctree and /dev/null differ diff --git a/docs/index.doctree b/docs/index.doctree deleted file mode 100644 index fc8caab..0000000 Binary files a/docs/index.doctree and /dev/null differ diff --git a/docs/known_issues.doctree b/docs/known_issues.doctree deleted file mode 100644 index 6cf0911..0000000 Binary files a/docs/known_issues.doctree and /dev/null differ diff --git a/docs/license.doctree b/docs/license.doctree deleted file mode 100644 index ca089ab..0000000 Binary files a/docs/license.doctree and /dev/null differ diff --git a/docs/readme.doctree b/docs/readme.doctree deleted file mode 100644 index def2ea3..0000000 Binary files a/docs/readme.doctree and /dev/null differ diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 8213302..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -sphinx -sphinx_rtd_theme diff --git a/example/example.py b/example/example.py index 05b2465..ef804c5 100644 --- a/example/example.py +++ b/example/example.py @@ -83,7 +83,7 @@ def main(): args = parser.parse_args() # To avoid problems when testing without screen - if args.test: + if args.test or args.screenshots: os.environ['QT_QPA_PLATFORM'] = 'offscreen' # Set QT_API variable before importing QtPy @@ -264,6 +264,11 @@ def main(): # do not read when taking screenshots read_settings(window, args.reset) window.showMaximized() + window.showMaximized() + window.setWindowFlags(window.windowFlags() | + Qt.WindowMinimizeButtonHint | + Qt.WindowMaximizeButtonHint | + Qt.WindowCloseButtonHint) # Save screenshots for differents displays and quit if args.screenshots: diff --git a/req-doc.txt b/req-doc.txt new file mode 100644 index 0000000..c195b60 --- /dev/null +++ b/req-doc.txt @@ -0,0 +1,16 @@ +# See tox.ini file to know how to use them via command line + +# Main packages to make sure they are there +setuptools +pip +wheel +virtualenv +pipdeptree + +# To generate documentation +sphinx +sphinx_rtd_theme +sphinxcontrib-fulltoc + +# To generate screenshots +pyqt5 diff --git a/tox.ini b/tox.ini index cac8aaf..dec6818 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,9 @@ deps = pyside: pyside pyside2: pyside2 + # Dependencies for each environment + doc: -rreq-doc.txt + whitelist_externals = # non python dependencies qmake @@ -58,14 +61,14 @@ commands = pyside2: python example/example.py --qt_from=pyside2 --test pyside2: python example/example.py --qt_from=pyside2 --test --no_dark - doc: sphinx-apidoc --private --separate --force --module-first --ext-intersphinx -o "example" "../example" "ui" - doc: sphinx-apidoc --private --separate --force --module-first --ext-intersphinx -o "reference" "../qdarkstyle" - doc: sphinx-apidoc --private --separate --force --module-first --ext-intersphinx -o "scripts" "../scripts" + doc: sphinx-apidoc --private --separate --force --module-first -o "example" "../example" "../example/ui/*" + doc: sphinx-apidoc --private --separate --force --module-first -o "reference" "../qdarkstyle" + doc: sphinx-apidoc --private --separate --force --module-first -o "scripts" "../scripts" - doc: sphinx-build -b html -j auto -E -d "." "." "{toxworkdir}/../build/docs/html" - # doc: sphinx-build -b latex -j auto -E -d "{toxworkdir}/../build/docs/doctrees" "." "{toxworkdir}/../build/docs/latex" + doc: python "../example/example.py" --screenshot + doc: python "../example/example.py" --screenshot --no_dark - # doc: make --ignore-errors --keep-going --silent -C "{toxworkdir}/../build/docs/latex" all-pdf + doc: sphinx-build -b html -j auto -E -d "{toxworkdir}/../build/docs/doctrees" . "{toxworkdir}/../build/docs/html" pip list