From e05b6afd8b50d550299e16a68c8efb95f86505c2 Mon Sep 17 00:00:00 2001 From: Philipp Sommer Date: Wed, 6 Oct 2021 11:00:50 +0200 Subject: [PATCH 1/4] replace links to RTD --- .circleci/config.yml | 2 +- CHANGELOG.rst | 2 +- README.rst | 10 +++++----- docs/conf.py | 2 -- docs/getting_started.rst | 2 +- docs/index.rst | 6 +++--- docs/installing.rst | 7 +------ psyplot_gui/__init__.py | 8 +------- psyplot_gui/help_explorer.py | 2 +- psyplot_gui/sphinx_supp/conf.py | 15 ++++----------- setup.py | 13 +------------ 11 files changed, 19 insertions(+), 50 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3854716..f74b0b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - psyplot: psyplot/psyplot-ci-orb@1.5.23 + psyplot: psyplot/psyplot-ci-orb@1.5.24 mattermost-plugin-notify: nathanaelhoun/mattermost-plugin-notify@1.2.0 executors: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5411b19..1571fb8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,7 +11,7 @@ Changed - psyplot is now officially licensed under LGPL-3.0-only, see `#29 `__ - Documentation is now hosted with Github Pages at https://psyplot.github.io/psyplot-gui. - Redirects from the old documentation at https://psyplot-gui.readthedocs.io have been + Redirects from the old documentation at `https://psyplot-gui.readthedocs.io` have been configured. - We use CicleCI now for a standardized CI/CD pipeline to build and test the code and docs all at one place, see `#28 `__ diff --git a/README.rst b/README.rst index 7e5e815..9ad5ad5 100644 --- a/README.rst +++ b/README.rst @@ -16,9 +16,9 @@ Graphical User Interface for the psyplot package * - implementations - |supported-versions| |supported-implementations| -.. |docs| image:: http://readthedocs.org/projects/psyplot-gui/badge/?version=latest - :alt: Documentation Status - :target: http://psyplot-gui.readthedocs.io/en/latest/?badge=latest +.. |docs| image:: https://img.shields.io/github/deployments/psyplot/psyplot-gui/github-pages + :alt: Documentation + :target: http://psyplot.github.io/psyplot-gui/ .. |circleci| image:: https://circleci.com/gh/psyplot/psyplot-gui/tree/master.svg?style=svg :alt: CircleCI @@ -64,10 +64,10 @@ psyplot_ with a graphical user interface using PyQt_. See the homepage of the main project on examples on the possibilities with psyplot_. You can see the full documentation under -`readthedocs.org `__ +`psyplot.github.io/psyplot-gui/ `__ .. _PyQt: https://riverbankcomputing.com/software/pyqt/intro -.. _psyplot: http://psyplot.readthedocs.io/en/latest/ +.. _psyplot: http://psyplot.github.io/ Copyright diff --git a/docs/conf.py b/docs/conf.py index 487f03b..ecb759d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -118,8 +118,6 @@ html_theme = 'sphinx_rtd_theme' -# otherwise, readthedocs.org uses their theme by default, so no need to specify - # 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, # so a file named "default.css" will overwrite the builtin "default.css". diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 49f9904..4ad7d52 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -94,7 +94,7 @@ If you do not wish this behaviour, set the ``console.auto_set_mp`` and .. |ipython_console| image:: ipython_console.png -.. _IPython: http://ipython.readthedocs.io/en/stable/ +.. _IPython: https://ipython.readthedocs.io/en/stable/ .. _qtconsole: https://qtconsole.readthedocs.io/en/stable/ .. _Spyder: https://www.spyder-ide.org/ diff --git a/docs/index.rst b/docs/index.rst index 62588a8..1a785df 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -24,9 +24,9 @@ main project on examples on the possibilities with psyplot_. * - implementations - |supported-versions| |supported-implementations| - .. |docs| image:: http://readthedocs.org/projects/psyplot-gui/badge/?version=latest - :alt: Documentation Status - :target: http://psyplot-gui.readthedocs.io/en/latest/?badge=latest + .. |docs| image:: https://img.shields.io/github/deployments/psyplot/psyplot-gui/github-pages + :alt: Documentation + :target: http://psyplot.github.io/psyplot-gui/ .. |circleci| image:: https://circleci.com/gh/psyplot/psyplot-gui/tree/master.svg?style=svg :alt: CircleCI diff --git a/docs/installing.rst b/docs/installing.rst index 93f9d68..f127945 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -41,17 +41,12 @@ built upon multiple other packages, namely - fasteners_: Which provides an inprocess lock to communicate to the psyplot mainwindow - PyQt5_: Python bindings to the Qt_ software - -Optional dependencies -^^^^^^^^^^^^^^^^^^^^^ -We furthermore recommend to use - - sphinx_>=1.3.5: To use all features of the interactive documentation access .. _conda: https://docs.conda.io/en/latest/ .. _psyplot: https://psyplot.github.io/psyplot/installing.html .. _qtconsole: https://qtconsole.readthedocs.io/en/latest/ -.. _fasteners: http://fasteners.readthedocs.org/en/latest/index.html +.. _fasteners: https://fasteners.readthedocs.org/en/latest/index.html .. _sphinx: https://www.sphinx-doc.org/en/master/index.html .. _PyQt5: https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html .. _Qt: https://www.qt.io/ diff --git a/psyplot_gui/__init__.py b/psyplot_gui/__init__.py index 160016e..989c002 100644 --- a/psyplot_gui/__init__.py +++ b/psyplot_gui/__init__.py @@ -456,19 +456,13 @@ def get_parser(create=True): UNIT_TESTING = os.getenv('CI') -#: Disable the default for the ListGuiPluginsAction on RTD, because it looks -#: better in the docs -_on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - - class ListGuiPluginsAction(argparse.Action): def __init__(self, option_strings, dest=argparse.SUPPRESS, nargs=None, default=argparse.SUPPRESS, **kwargs): if nargs is not None: raise ValueError("nargs not allowed") - if not _on_rtd: - kwargs['default'] = default + kwargs['default'] = default super(ListGuiPluginsAction, self).__init__( option_strings, nargs=0, dest=dest, **kwargs) diff --git a/psyplot_gui/help_explorer.py b/psyplot_gui/help_explorer.py index 7b43589..103b046 100644 --- a/psyplot_gui/help_explorer.py +++ b/psyplot_gui/help_explorer.py @@ -165,7 +165,7 @@ class UrlBrowser(QFrame): doc_urls = OrderedDict([ ('startpage', 'https://startpage.com/'), - ('psyplot', 'http://psyplot.readthedocs.org/en/latest/'), + ('psyplot', 'http://psyplot.github.io/psyplot/'), ('pyplot', 'http://matplotlib.org/api/pyplot_api.html'), ('seaborn', 'http://stanford.edu/~mwaskom/software/seaborn/api.html'), ('cartopy', 'http://scitools.org.uk/cartopy/docs/latest/index.html'), diff --git a/psyplot_gui/sphinx_supp/conf.py b/psyplot_gui/sphinx_supp/conf.py index 0fc51ee..e6f676a 100755 --- a/psyplot_gui/sphinx_supp/conf.py +++ b/psyplot_gui/sphinx_supp/conf.py @@ -152,20 +152,13 @@ 'xarray': ('https://xarray.pydata.org/en/stable/', None), 'cartopy': ('https://scitools.org.uk/cartopy/docs/latest/', None), 'psyplot': ('https://psyplot.readthedocs.io/en/latest/', None), - 'psyplot_gui': ('https://psyplot.readthedocs.io/projects/psyplot-gui/en/' - 'latest/', None), - 'psy_maps': ('https://psyplot.readthedocs.io/projects/psy-maps/en/' - 'latest/', None), - 'psy_simple': ('https://psyplot.readthedocs.io/projects/psy-simple/en/' - 'latest/', None), + 'psyplot_gui': ('https://psyplot.github.io/psyplot-gui/', None), + 'psy_maps': ('https://psyplot.github.io/psy-maps/', None), + 'psy_simple': ('https://psyplot.github.io/psy-simple/', None), 'psy_reg': ('https://psyplot.readthedocs.io/projects/psy-reg/en/' 'latest/', None), + 'python': ('https://docs.python.org/3/', None), } -if six.PY3: - intersphinx_mapping['python'] = ('https://docs.python.org/3.6/', None) -else: - intersphinx_mapping['python'] = ('https://docs.python.org/2.7/', None) - replacements = { '`psyplot.rcParams`': '`~psyplot.config.rcsetup.rcParams`', diff --git a/setup.py b/setup.py index b59755e..07cb3cb 100644 --- a/setup.py +++ b/setup.py @@ -23,21 +23,10 @@ # You should have received a copy of the GNU LGPL-3.0 license # along with this program. If not, see . -import os import os.path as osp from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import sys - - -if os.getenv("READTHEDOCS") == "True": - # to make versioneer working, we need to unshallow this repo - # because RTD does a checkout with --depth 50 - import subprocess as spr - rootdir = osp.dirname(__file__) - spr.call(["git", "-C", rootdir, "fetch", "--unshallow", "origin"]) - - import versioneer @@ -105,7 +94,7 @@ def run_tests(self): osp.join('psyplot_gui', 'icons', '*.svg'), ]}, project_urls={ - 'Documentation': 'https://psyplot.readthedocs.io/projects/psyplot-gui', + 'Documentation': 'https://psyplot.github.io/psyplot-gui', 'Source': 'https://github.com/psyplot/psyplot-gui', 'Tracker': 'https://github.com/psyplot/psyplot-gui/issues', }, From ed61d295672a51e55eac810464094de25141f525 Mon Sep 17 00:00:00 2001 From: Philipp Sommer Date: Thu, 7 Oct 2021 08:35:29 +0200 Subject: [PATCH 2/4] [skip ci] minor --- psyplot_gui/sphinx_supp/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/psyplot_gui/sphinx_supp/conf.py b/psyplot_gui/sphinx_supp/conf.py index e6f676a..9121fb9 100755 --- a/psyplot_gui/sphinx_supp/conf.py +++ b/psyplot_gui/sphinx_supp/conf.py @@ -151,10 +151,11 @@ 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), 'xarray': ('https://xarray.pydata.org/en/stable/', None), 'cartopy': ('https://scitools.org.uk/cartopy/docs/latest/', None), - 'psyplot': ('https://psyplot.readthedocs.io/en/latest/', None), + 'psyplot': ('https://psyplot.github.io/psyplot/', None), 'psyplot_gui': ('https://psyplot.github.io/psyplot-gui/', None), 'psy_maps': ('https://psyplot.github.io/psy-maps/', None), 'psy_simple': ('https://psyplot.github.io/psy-simple/', None), + 'psy_view': ('https://psyplot.github.io/psy-view/', None), 'psy_reg': ('https://psyplot.readthedocs.io/projects/psy-reg/en/' 'latest/', None), 'python': ('https://docs.python.org/3/', None), From 2932be19ba6c715648787ba0844089d057987f5a Mon Sep 17 00:00:00 2001 From: Philipp Sommer Date: Thu, 7 Oct 2021 08:44:18 +0200 Subject: [PATCH 3/4] [skip ci] fix license and copyright --- psyplot_gui/__init__.py | 10 +++++++--- setup.py | 7 ++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/psyplot_gui/__init__.py b/psyplot_gui/__init__.py index 989c002..31908a1 100644 --- a/psyplot_gui/__init__.py +++ b/psyplot_gui/__init__.py @@ -57,12 +57,16 @@ from psyplot.compat.pycompat import get_default_value __author__ = "Philipp S. Sommer" -__copyright__ = "Copyright 2016 - 2020, Philipp S. Sommer" +__copyright__ = """ +Copyright (C) 2021 Helmholtz-Zentrum Hereon +Copyright (C) 2020-2021 Helmholtz-Zentrum Geesthacht +Copyright (C) 2016-2021 University of Lausanne +""" __credits__ = ["Philipp S. Sommer"] -__license__ = "GPL-2.0-only" +__license__ = "LGPL-3.0-only" __maintainer__ = "Philipp S. Sommer" -__email__ = "philipp.sommer@hzg.de" +__email__ = "psyplot@hereon.de" __status__ = "Production" diff --git a/setup.py b/setup.py index 07cb3cb..d1f10da 100644 --- a/setup.py +++ b/setup.py @@ -64,20 +64,21 @@ def run_tests(self): 'Topic :: Scientific/Engineering :: Visualization', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Scientific/Engineering', - 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', + 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', '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 S. Sommer', - author_email='philipp.sommer@hzg.de', - license="GPLv2", + author_email='psyplot@hereon.de', + license="LGPL-3.0-only", packages=find_packages(exclude=['docs', 'tests*', 'examples']), install_requires=[ 'psyplot>=1.3.0', From 3cb13353c74772f538cb9f6eccbdde11e8d10006 Mon Sep 17 00:00:00 2001 From: Philipp Sommer Date: Thu, 7 Oct 2021 17:17:54 +0200 Subject: [PATCH 4/4] change link to psy-reg --- psyplot_gui/sphinx_supp/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/psyplot_gui/sphinx_supp/conf.py b/psyplot_gui/sphinx_supp/conf.py index 9121fb9..fbab184 100755 --- a/psyplot_gui/sphinx_supp/conf.py +++ b/psyplot_gui/sphinx_supp/conf.py @@ -156,8 +156,7 @@ 'psy_maps': ('https://psyplot.github.io/psy-maps/', None), 'psy_simple': ('https://psyplot.github.io/psy-simple/', None), 'psy_view': ('https://psyplot.github.io/psy-view/', None), - 'psy_reg': ('https://psyplot.readthedocs.io/projects/psy-reg/en/' - 'latest/', None), + 'psy_reg': ('https://psyplot.github.io/psy-reg/', None), 'python': ('https://docs.python.org/3/', None), }