Skip to content

Commit

Permalink
Merge pull request #20 from psyplot/no-intersphinx-on-win
Browse files Browse the repository at this point in the history
Disable intersphinx on windows by default
  • Loading branch information
Chilipp committed Sep 29, 2020
2 parents e0e3214 + 4a9577e commit 9c51791
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
@@ -1,11 +1,15 @@
v1.3.0
======
Presets and more variable info

Changed
-------
- psyplot-gui has been moved from https://github.com/Chilipp/psyplot-gui to https://github.com/psyplot/psyplot-gui,
see `#10 <https://github.com/psyplot/psyplot-gui/pull/10>`__
- variables in the dataset tree show now more content,
see `#16 <https://github.com/psyplot/psyplot-gui/pull/16>`__
- setting the rcparam ``help_explorer.use_intersphinx`` to None, will not use
intersphinx on windows, see `#20 <https://github.com/psyplot/psyplot-gui/pull/20>`__

Added
-----
Expand Down
2 changes: 1 addition & 1 deletion ci/conda-recipe/meta.yaml
Expand Up @@ -60,7 +60,7 @@ app:

about:
home: https://github.com/psyplot/psyplot-gui
license: GPL-2.0
license: GPL-2.0-only
license_family: GPL
license_file: LICENSE
summary: Graphical user interface for the psyplot package
Expand Down
3 changes: 2 additions & 1 deletion psyplot_gui/config/rcsetup.py
Expand Up @@ -187,7 +187,8 @@ def format_ep(ep):
'Use the intersphinx extension and link to the online documentations '
'of matplotlib, pyplot, psyplot, numpy, etc. when converting rst '
'docstrings. The inventories are loaded when the first object is '
'documented. If None, intersphinx is only used with PyQt5'],
'documented. If None, intersphinx is only used when '
'`help_explorer.online` is True and you are not using windows'],
'help_explorer.render_docs_parallel': [
True, validate_bool,
'Boolean whether the html docs are rendered in a separate process'],
Expand Down
34 changes: 16 additions & 18 deletions psyplot_gui/sphinx_supp/conf.py
Expand Up @@ -12,13 +12,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import sphinx
import sphinx_rtd_theme
import re
import six
from itertools import product
import psyplot_gui
from psyplot_gui.compat.qtcompat import with_qt5

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

Expand All @@ -31,9 +31,16 @@
'sphinx.ext.viewcode',
'psyplot.sphinxext.extended_napoleon',
]
use_intersphinx = (psyplot_gui.rcParams['help_explorer.online'] and
psyplot_gui.rcParams['help_explorer.use_intersphinx'])
if use_intersphinx or (use_intersphinx is None and with_qt5):

if psyplot_gui.rcParams['help_explorer.use_intersphinx'] is None:
if sys.platform.startswith("win"):
use_intersphinx = False
else:
use_intersphinx = psyplot_gui.rcParams['help_explorer.online']
else:
use_intersphinx = psyplot_gui.rcParams['help_explorer.use_intersphinx']

if use_intersphinx:
extensions.append('sphinx.ext.intersphinx')
del use_intersphinx

Expand Down Expand Up @@ -98,20 +105,11 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
if with_qt5:
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_options = {
'prev_next_buttons_location': None
}

else:
html_theme = 'alabaster'

# 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
# documentation.
html_theme_options = {'nosidebar': True}
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_options = {
'prev_next_buttons_location': None
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
12 changes: 10 additions & 2 deletions setup.py
Expand Up @@ -40,15 +40,18 @@ def run_tests(self):
'Topic :: Scientific/Engineering :: GIS',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Operating System :: OS Independent',
],
keywords=('visualization netcdf raster cartopy earth-sciences pyqt qt '
'ipython jupyter qtconsole'),
url='https://github.com/psyplot/psyplot-gui',
author='Philipp Sommer',
author_email='philipp.sommer@unil.ch',
author='Philipp S. Sommer',
author_email='philipp.sommer@hzg.de',
license="GPLv2",
packages=find_packages(exclude=['docs', 'tests*', 'examples']),
install_requires=[
Expand All @@ -65,6 +68,11 @@ def run_tests(self):
osp.join('psyplot_gui', 'icons', '*.png'),
osp.join('psyplot_gui', 'icons', '*.svg'),
]},
project_urls={
'Documentation': 'https://psyplot.readthedocs.io/projects/psyplot-gui',
'Source': 'https://github.com/psyplot/psyplot-gui',
'Tracker': 'https://github.com/psyplot/psyplot-gui/issues',
},
include_package_data=True,
tests_require=['pytest', 'psutil'],
cmdclass={'test': PyTest},
Expand Down

0 comments on commit 9c51791

Please sign in to comment.