Skip to content

Commit

Permalink
Merge pull request #1164 from Open-MSS/merged_stable_into_development
Browse files Browse the repository at this point in the history
Merged stable into development
  • Loading branch information
ReimarBauer authored Aug 22, 2021
2 parents 9a873bb + e7d069b commit da77f88
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 15 deletions.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

Version 5.0.1
~~~~~~~~~~~~~

Bug fix release

All changes:
https://github.com/Open-MSS/MSS/milestone/64?closed=1

Version 5.0.0
~~~~~~~~~~~~~

Expand Down
7 changes: 4 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ If you do prefer to use over 7K open-source packages install Anaconda.

We recommend to install this for the local user. This does not require administrator permissions.


As **Beginner** start with an installation of Miniconda
- `Get Miniconda <https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`_
- `Get Anaconda <https://docs.continuum.io/anaconda/install/>`_
- `Get Miniforge <https://github.com/conda-forge/miniforge/>`_

If you are an Advanced User you know that `Anaconda <https://docs.continuum.io/anaconda/install/>`_
or `Miniforge <https://github.com/conda-forge/miniforge/>`_ are compatible too.


conda-forge channel
Expand Down
2 changes: 2 additions & 0 deletions docs/samples/config/wms/mss_wms_settings.py.chem_plots
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ import mss_chem_plots
#base_dir = os.path.abspath(os.path.dirname(mslib.mswms.__file__))
#xml_template_location = os.path.join(base_dir, "xml_templates")

# Path to store an optional gallery
_gallerypath = r"/path/to/data/mss/gallery"
_datapath = r"/path/to/data/mss/testdata"

data = {
Expand Down
2 changes: 2 additions & 0 deletions docs/samples/config/wms/mss_wms_settings.py.demodata
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ import mslib.mswms
#base_dir = os.path.abspath(os.path.dirname(mslib.mswms.__file__))
#xml_template_location = os.path.join(base_dir, "xml_templates")

# Path to store an optional gallery
_gallerypath = r"/path/to/data/mss/gallery"
_datapath = r"/path/to/data/mss/testdata"

data = {
Expand Down
2 changes: 2 additions & 0 deletions docs/samples/config/wms/mss_wms_settings.py.sample
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ import mslib.mswms
# SETTINGS ###
#

# Path to store an optional gallery
_gallerypath = r"/path/to/data/mss/gallery"

# Paths to data directories. Process callables (the functions that are
# executed by the dispatcher system) can access these paths, hence
Expand Down
13 changes: 6 additions & 7 deletions mslib/static/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,25 @@
</div>
</div>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">

<div class="carousel-inner">
<div class="carousel-item active">
<img class="rounded mx-auto d-block" src="/mss_theme/img/polstracc_2016.jpeg" alt="Polstracc 2016">
<img class="rounded mx-auto d-block img-responsive" src="mss_theme/img/polstracc_2016.jpeg" width="592" alt="Polstracc 2016">
</div>

<div class="carousel-item">
<img class="rounded mx-auto d-block" src="/mss_theme/img/emerge_2017.jpeg" alt="Emerge 2017">
<img class="rounded mx-auto d-block img-responsive" src="mss_theme/img/emerge_2017.jpeg" width="592" alt="Emerge 2017">
</div>
<div class="carousel-item">
<img class="rounded mx-auto d-block" src="/mss_theme/img/stratoclim_2017.jpeg" alt="Stratoclim 2017">
<img class="rounded mx-auto d-block img-responsive" src="mss_theme/img/stratoclim_2017.jpeg" width="592" alt="Stratoclim 2017">
</div>
<div class="carousel-item">
<img class="rounded mx-auto d-block" src="/mss_theme/img/wise_2017.jpeg" alt="Stratoclim 2017">
<img class="rounded mx-auto d-block img-responsive" src="mss_theme/img/wise_2017.jpeg" width="592" alt="Stratoclim 2017">
</div>
<div class="carousel-item">
<img class="rounded mx-auto d-block" src="/mss_theme/img/southtrac_2019.jpeg" alt="Southtrac 2019">
<img class="rounded mx-auto d-block img-responsive" src="mss_theme/img/southtrac_2019.jpeg" width="592" alt="Southtrac 2019">
</div>
<div class="carousel-item">
<img class="rounded mx-auto d-block" src="/mss_theme/img/cirrus_hl_2021.png" alt="Cirrus HL 2021">
<img class="rounded mx-auto d-block img-responsive" src="mss_theme/img/cirrus_hl_2021.png" width="592" alt="Cirrus HL 2021">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
Expand Down
29 changes: 25 additions & 4 deletions mslib/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@
from mslib.msui.constants import MSS_CONFIG_PATH


def subprocess_startupinfo():
"""
config options to hide windows terminals on subprocess call
"""
startupinfo = None
if os.name == 'nt':
# thx to https://gist.github.com/nitely/3862493
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags = subprocess.CREATE_NEW_CONSOLE | subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = subprocess.SW_HIDE
return startupinfo


def parse_iso_datetime(string):
try:
result = isodate.parse_datetime(string)
Expand Down Expand Up @@ -762,7 +775,8 @@ def __init__(self, parent=None):

# Check if mamba is installed
try:
subprocess.run(["mamba"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
subprocess.run(["mamba"], startupinfo=subprocess_startupinfo(),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
self.command = "mamba"
except FileNotFoundError:
pass
Expand All @@ -786,7 +800,9 @@ def _check_version(self):
"""
# Don't notify on updates if mss is in a git repo, as you are most likely a developer
try:
git = subprocess.run(["git", "rev-parse", "--is-inside-work-tree"], stdout=subprocess.PIPE,
git = subprocess.run(["git", "rev-parse", "--is-inside-work-tree"],
startupinfo=subprocess_startupinfo(),
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, encoding="utf8")
if "true" in git.stdout:
self.is_git_env = True
Expand All @@ -795,7 +811,8 @@ def _check_version(self):

# Return if conda is not installed
try:
subprocess.run(["conda"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
subprocess.run(["conda"], startupinfo=subprocess_startupinfo(),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
except FileNotFoundError:
return

Expand Down Expand Up @@ -858,7 +875,11 @@ def _execute_command(self, command):
"""
Handles proper execution of conda subprocesses and logging
"""
process = subprocess.Popen(command.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding="utf8")
process = subprocess.Popen(command.split(),
startupinfo=subprocess_startupinfo(),
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="utf8")
self.on_log_update.emit(" ".join(process.args) + "\n")

text = ""
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'5.0.0.'
__version__ = u'5.0.1.'

0 comments on commit da77f88

Please sign in to comment.