diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1fd243008..fbfcf9c61 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,5 +5,8 @@ build: tools: python: "mambaforge-4.10" +sphinx: + configuration: docs/conf.py + conda: environment: docs/environment.yml diff --git a/CHANGES.rst b/CHANGES.rst index 5e1f2506b..e4bcda2ba 100755 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,14 @@ Changelog ========= +Version 8.3.1 +~~~~~~~~~~~~~ + +Bug fix release: + +All changes: +https://github.com/Open-MSS/MSS/milestone/99?closed=1 + Version 8.3.0 ~~~~~~~~~~~~~ diff --git a/docs/conf.py b/docs/conf.py index 3204f3761..edaea685c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -119,7 +119,7 @@ def get_tutorial_images(): # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ['sphinx_rtd_theme'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -217,23 +217,19 @@ def get_tutorial_images(): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'sphinx_rtd_theme' +html_theme = 'sphinx_rtd_theme' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] html_style = 'css/mss.css' else: + htmls_static_path = ['_static'] + html_css_files = ['mss.css'] html_context = { 'display_github': False, # Add 'Edit on Bitbucket' link instead of 'View page source' 'last_updated': True, 'commit': False, - 'css_files': [ - 'https://media.readthedocs.org/css/sphinx_rtd_theme.css', - 'https://media.readthedocs.org/css/readthedocs-doc-embed.css', - '_static/css/mss.css', - ], } # Theme options are theme-specific and customize the look and feel of a theme diff --git a/docs/publications.rst b/docs/publications.rst index 68aa927be..c563a6d88 100644 --- a/docs/publications.rst +++ b/docs/publications.rst @@ -24,9 +24,11 @@ Acknowledgement Please add the following acknowledgement and cite to your publications: + The authors gratefully acknowledge the use of the MSS flight planning - software (Rautenhaus, 2012; MSS development was partially funded by - the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - project no. UN 311/3-1)“. + software (Bauer et al, 2022, Rautenhaus et al, 2012; + MSS development was partially funded by the Deutsche Forschungsgemeinschaft + (DFG, German Research Foundation) project no. UN 311/3-1 + and project no. SPP 1294 423229456) Thank you very much. diff --git a/mslib/index.py b/mslib/index.py index 340fe9cd3..9ba7ddcb3 100644 --- a/mslib/index.py +++ b/mslib/index.py @@ -174,7 +174,7 @@ def plots(): "For further info on how to generate it, run the " \ "gallery --help command line parameter of mswms.
" \ "An example of the gallery can be seen " \ - "here" + "here" return render_template("/content.html", act="plots", content=content) @APP.route("/mss/code/") diff --git a/mslib/msui/multilayers.py b/mslib/msui/multilayers.py index 08b494274..8c13cabfd 100644 --- a/mslib/msui/multilayers.py +++ b/mslib/msui/multilayers.py @@ -636,6 +636,9 @@ def _parse_vtimes(self): self.vtime_name = valid_time_names[0] values = self.extents[self.vtime_name]["values"] self.allowed_valid_times = sorted(self.parent.dock_widget.parse_time_extent(values)) + while len(self.allowed_valid_times) > 1000: + logging.warning("Too many valid times (%s). discarding 90%%.", len(self.allowed_valid_times)) + self.allowed_valid_times = self.allowed_valid_times[::10] self.vtimes = [_time.isoformat() + "Z" for _time in self.allowed_valid_times] if len(self.allowed_valid_times) == 0: logging.error("Cannot determine valid time format of %s for %s", self.header.text(0), self.text(0)) diff --git a/mslib/msui/wms_control.py b/mslib/msui/wms_control.py index e53270926..e793bc813 100644 --- a/mslib/msui/wms_control.py +++ b/mslib/msui/wms_control.py @@ -1285,7 +1285,7 @@ def normalize_crs(crs): if ret == QtWidgets.QMessageBox.Ignore: self.check_for_allowed_crs = False elif ret == QtWidgets.QMessageBox.No: - return + return [] # get...Time() will return None if the corresponding checkboxes are # disabled. objects passed to wms.getmap will not be included diff --git a/mslib/utils/config.py b/mslib/utils/config.py index c740c220e..af9a918e5 100644 --- a/mslib/utils/config.py +++ b/mslib/utils/config.py @@ -111,8 +111,9 @@ class MSUIDefaultConfig: # URLs of default WMS servers. default_WMS = [ "http://localhost:8081/", - "http://eumetview.eumetsat.int/geoserver/wms", - "https://apps.ecmwf.int/wms/?token=public" + "https://view.eumetsat.int/geoserver/wms", + "http://eccharts.ecmwf.int/wms/?token=public", + "https://neo.gsfc.nasa.gov/wms/wms" ] default_VSEC_WMS = [ diff --git a/mslib/utils/coordinate.py b/mslib/utils/coordinate.py index b645fe5ec..54ecb2ff0 100644 --- a/mslib/utils/coordinate.py +++ b/mslib/utils/coordinate.py @@ -110,15 +110,13 @@ def rotate_point(point, angle, origin=(0, 0)): def get_projection_params(proj): proj = proj.lower() if proj.startswith("crs:"): - raise ValueError("CRS not supported") - projid = proj[4:] if projid == "84": proj_params = { "basemap": {"projection": "cyl"}, "bbox": "degree"} else: - raise ValueError("unsupported CRS code: '%s'", proj) + raise ValueError("Only CRS code 84 is supported: '%s' given", proj) elif proj.startswith("auto:"): raise ValueError("AUTO not supported") diff --git a/mslib/utils/time.py b/mslib/utils/time.py index 00d38f6a2..22b020013 100644 --- a/mslib/utils/time.py +++ b/mslib/utils/time.py @@ -43,7 +43,10 @@ def parse_iso_datetime(string): def parse_iso_duration(string): - return isodate.parse_duration(string) + try: + return isodate.parse_duration(string) + except isodate.ISO8601Error: + return datetime.timedelta(weeks=4) JSEC_START = datetime.datetime(2000, 1, 1) diff --git a/mslib/version.py b/mslib/version.py index 877b16c9e..642cdf5d0 100644 --- a/mslib/version.py +++ b/mslib/version.py @@ -24,4 +24,4 @@ See the License for the specific language governing permissions and limitations under the License. """ -__version__ = u'8.3.0' +__version__ = u'8.3.1' diff --git a/requirements.d/development.txt b/requirements.d/development.txt index 366ddaed2..e57232b2b 100644 --- a/requirements.d/development.txt +++ b/requirements.d/development.txt @@ -24,3 +24,5 @@ eventlet>0.30.2 dnspython>=2.0.0, <2.3.0 gsl==2.7.0 boa +xmlschema<2.5.0 + diff --git a/tests/_test_utils/test_coordinate.py b/tests/_test_utils/test_coordinate.py index 5408ce48c..e38582aeb 100644 --- a/tests/_test_utils/test_coordinate.py +++ b/tests/_test_utils/test_coordinate.py @@ -60,7 +60,7 @@ def test_get_projection_params(self): with pytest.raises(ValueError): coordinate.get_projection_params('auto:42001') with pytest.raises(ValueError): - coordinate.get_projection_params('crs:84') + coordinate.get_projection_params('crs:83') class TestAngles(object):