mirror of
https://github.com/ColinDuquesnoy/QDarkStyleSheet.git
synced 2026-08-29 16:40:31 +08:00
Fix tox, remove unecessary files, fix generation of screenshots in docs
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
+12
-17
@@ -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}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
+6
-1
@@ -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:
|
||||
|
||||
+16
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user