Skip to content

Commit

Permalink
Merge pull request #2059 from Open-MSS/merge_stable_to_develop_new
Browse files Browse the repository at this point in the history
Merge stable to develop new
  • Loading branch information
ReimarBauer authored Oct 12, 2023
2 parents bd1b543 + 66a7dcb commit f72546b
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ build:
tools:
python: "mambaforge-4.10"

sphinx:
configuration: docs/conf.py

conda:
environment: docs/environment.yml
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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
~~~~~~~~~~~~~

Expand Down
12 changes: 4 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions docs/publications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion localbuild/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ requirements:
- flask-httpauth
- flask-mail
- flask-migrate
- werkzeug >=2.2.3
- werkzeug >=2.2.3, <3.0.0
- flask-socketio >=5.1.0
- flask-sqlalchemy >=3.0.0
- flask-cors
Expand Down
2 changes: 1 addition & 1 deletion mslib/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def plots():
"For further info on how to generate it, run the " \
"<b>gallery --help</b> command line parameter of mswms.<br>" \
"An example of the gallery can be seen " \
"<a href=\"https://mss.readthedocs.io/en/latest/gallery/index.html\">here</a>"
"<a href=\"https://mss.readthedocs.io/en/stable/gallery/index.html\">here</a>"
return render_template("/content.html", act="plots", content=content)

@APP.route("/mss/code/<path:filename>")
Expand Down
3 changes: 3 additions & 0 deletions mslib/msui/multilayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion mslib/msui/wms_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. <None> objects passed to wms.getmap will not be included
Expand Down
5 changes: 3 additions & 2 deletions mslib/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
4 changes: 1 addition & 3 deletions mslib/utils/coordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 4 additions & 1 deletion mslib/utils/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion mslib/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 2 additions & 0 deletions requirements.d/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ eventlet>0.30.2
dnspython>=2.0.0, <2.3.0
gsl==2.7.0
boa
xmlschema<2.5.0

2 changes: 1 addition & 1 deletion tests/_test_utils/test_coordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f72546b

Please sign in to comment.