Skip to content

Commit

Permalink
Merge pull request #1479 from Open-MSS/merge_develop_to_stable
Browse files Browse the repository at this point in the history
Merge develop to stable
  • Loading branch information
ReimarBauer authored Jun 9, 2022
2 parents a84465a + a41b33b commit e03a1b8
Show file tree
Hide file tree
Showing 236 changed files with 1,203 additions and 1,108 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/testing-scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: new dependency test (scheduled)

on:
schedule:
- cron: '30 5 * * 1'


jobs:
test-stable-scheduled:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: stable
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}

test-develop-scheduled:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}



59 changes: 43 additions & 16 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,52 @@ jobs:
run: git config --global --add safe.directory /__w/MSS/MSS

- uses: actions/checkout@v3

- name: Check for changed dependencies
run: |
cmp -s /meta.yaml localbuild/meta.yaml && cmp -s /development.txt requirements.d/development.txt \
|| (echo Dependencies differ \
&& echo "triggerdockerbuild=yes" >> $GITHUB_ENV )
- name: Always rebuild dependencies for scheduled builds
if: ${{ success() && inputs.event_name == 'schedule' && inputs.branch_name == 'stable' && env.triggerdockerbuild != 'yes' }}
run: |
echo "triggerdockerbuild=yes" >> $GITHUB_ENV
- name: Reinstall dependencies if changed
id: step1
if: ${{ success() && env.triggerdockerbuild == 'yes' }}
run: |
cmp -s /meta.yaml localbuild/meta.yaml && cmp -s /development.txt requirements.d/development.txt || (echo Dependencies differ \
&& echo "triggerdockerbuild=yes" >> $GITHUB_ENV \
cd $GITHUB_WORKSPACE \
&& source /opt/conda/etc/profile.d/conda.sh \
&& source /opt/conda/etc/profile.d/mamba.sh \
&& mamba activate mssenv \
&& mamba deactivate \
&& cat localbuild/meta.yaml \
| sed -n '/^requirements:/,/^test:/p' \
| sed -e "s/.*- //" \
| sed -e "s/menuinst.*//" \
| sed -e "s/.*://" > reqs.txt \
&& conda create -n new_mssenv mamba python\<3.10 \
&& conda activate new_mssenv \
&& mamba install -c conda-forge pyvirtualdisplay python\<3.10 -y \
&& mamba install -c conda-forge --file reqs.txt -y \
&& mamba install -c conda-forge --file requirements.d/development.txt -y \
&& conda create --name mssenv --copy --clone new_mssenv -y)
&& cat requirements.d/development.txt >> reqs.txt \
&& echo pyvirtualdisplay >> reqs.txt \
&& cat reqs.txt \
&& mamba env remove -n mssenv \
&& mamba create -y -n mssenv --file reqs.txt
- name: Print conda list
run: |
source /opt/conda/etc/profile.d/conda.sh \
&& source /opt/conda/etc/profile.d/mamba.sh \
&& mamba activate mssenv \
&& mamba list
- name: Run tests
if: ${{ success() && inputs.xdist == 'no' }}
timeout-minutes: 25
run: |
source /opt/conda/bin/activate mssenv \
&& cd $GITHUB_WORKSPACE \
cd $GITHUB_WORKSPACE \
&& source /opt/conda/etc/profile.d/conda.sh \
&& source /opt/conda/etc/profile.d/mamba.sh \
&& mamba activate mssenv \
&& pytest -v --durations=20 --reverse --cov=mslib mslib \
|| (for i in {1..5} \
; do pytest mslib -v --durations=0 --reverse --last-failed --lfnf=none \
Expand All @@ -69,21 +92,25 @@ jobs:
if: ${{ success() && inputs.xdist == 'yes' }}
timeout-minutes: 25
run: |
source /opt/conda/bin/activate mssenv \
&& cd $GITHUB_WORKSPACE \
cd $GITHUB_WORKSPACE \
&& source /opt/conda/etc/profile.d/conda.sh \
&& source /opt/conda/etc/profile.d/mamba.sh \
&& mamba activate mssenv \
&& pytest -vv -n 6 --dist loadfile --max-worker-restart 0 mslib \
|| (for i in {1..5} \
; do pytest -vv -n 6 --dist loadfile --max-worker-restart 0 mslib --last-failed --lfnf=none \
&& break \
; done)
- name: Collect coverage
if: ${{ always() && inputs.event_name == 'push' && inputs.branch_name == 'develop' && inputs.xdist == 'no'}}
if: ${{ success() && inputs.event_name == 'push' && inputs.branch_name == 'develop' && inputs.xdist == 'no'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
source /opt/conda/bin/activate mssenv \
&& cd $GITHUB_WORKSPACE \
cd $GITHUB_WORKSPACE \
&& source /opt/conda/etc/profile.d/conda.sh \
&& source /opt/conda/etc/profile.d/mamba.sh \
&& mamba activate mssenv \
&& mamba install coveralls \
&& coveralls --service=github
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ mslib/mss_config.py
mslib/performance/data/
mslib/msui/mss.sideview.cfg
mslib/msui/mss.topview.cfg
mslib/msui/mss_settings.py
mslib/msui/msui_settings.py
mslib/msui/wms_cache/
mslib/mswms/mss_wms_settings.py
mslib/mswms/mss_wms_auth.py
mslib/mswms/mswms_settings.py
mslib/mswms/mswms_auth.py
mslib/mscolab/colabdata/
docs/_build
docs/gallery/plots
Expand Down
47 changes: 47 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,53 @@
Changelog
=========

Version 7.0.0
~~~~~~~~~~~~~

This is a refactoring release for consistent nameings.
Over the last six years MSS has grown and we created the Open-MSS organization with the move to github in 2021.
In this we have many repositories that support our work on the Mission Support System.
We use the term MSS for the whole thing today.
Therefore, we would like to give more appropriate names to the individual components.

HINT:
~~~~~

We changed:
- command mss was renamed to msui
- constants.MSS_CONFIG_PATH to constants.MSUI_CONFIG_PATH
- constants.MSS_SETTINGS to constants.MSUI_SETTINGS
- class MissionSupportSystemDefaultConfig to class MSUIDefaultConfig
- class MSS_AboutDialog to class class MSUI_AboutDialog
- class MSS_LV_Options_Dialog to class MSUI_LV_Options_Dialog
- class MSS_PerformanceSettingsWidget to class MSUI_PerformanceSettingsWidget
- class MSS_ShortcutsDialog to class MSUI_ShortcutsDialog
- class MSS_SV_OptionsDialog to class MSUI_SV_OptionsDialog
- class MSS_TV_MapAppearanceDialog to class MSUI_TV_MapAppearanceDialog
- class MSSLinearViewWindow to class MSUILinearViewWindow
- class MSSMainWindow to class MSUIMainWindow
- class MSSMplViewWindow to class MSUIMplViewWindow
- class MSSMscolab to class MSUIMscolab
- class MSSSideViewWindow to class MSUISideViewWindow
- class MSSTableViewWindow to class MSUITableViewWindow
- class MSSTopViewWindow to class MSUITopViewWindow
- class MSSWebMapService to class MSUIWebMapService

Configurations:
- Env var MSS_CONFIG_PATH to MSUI_CONFIG_PATH
- directory for msui_settings.json from ~/.config/mss to ~/.config/msui
- mss_settings.json to msui_settings.json
- mss_wms_settings.py to mswms_settings.py
- mss_wms_auth.py to mswms_auth.py
- mss_mscolab_auth.py to mscolab_auth.py

We moved:
- mslib.msui.mss_qt to mslib.utils.qt
- mslib.msui.mss_pyui to mslib.msui.msui

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

Version 6.2.1
~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions Menu/mss_shortcut.json → Menu/msui_shortcut.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"menu_name": "Anaconda${PY_VER} ${PLATFORM}",
"menu_items": [
{
"name": "MSS",
"pywscript": "${PYTHON_SCRIPTS}/mss-script.py",
"name": "MSUI",
"pywscript": "${PYTHON_SCRIPTS}/msui-script.py",
"icon": "${MENU_DIR}/mss.ico"
}
]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Once the `conda-forge` channel has been enabled, `mss` can be installed with:
$ conda create -n mssenv mamba
$ conda activate mssenv
(mssenv) $ mamba install mss python
(mssenv) $ mss
(mssenv) $ msui

It is possible to list all versions of `mss` available on your platform with:

Expand Down
20 changes: 10 additions & 10 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
common definitions for py.test
This file is part of mss.
This file is part of MSS.
:copyright: Copyright 2016-2017 Reimar Bauer
:copyright: Copyright 2016-2022 by the mss team, see AUTHORS.
:copyright: Copyright 2016-2022 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -45,15 +45,15 @@
shutil.copy(os.path.join(sample_path, "example.ftml"), constants.ROOT_DIR)

def pytest_addoption(parser):
parser.addoption("--mss_settings", action="store")
parser.addoption("--msui_settings", action="store")


def pytest_generate_tests(metafunc):
option_value = metafunc.config.option.mss_settings
option_value = metafunc.config.option.msui_settings
if option_value is not None:
mss_settings_file_fs = fs.open_fs(constants.MSS_CONFIG_PATH)
mss_settings_file_fs.writetext("mss_settings.json", option_value)
mss_settings_file_fs.close()
msui_settings_file_fs = fs.open_fs(constants.MSUI_CONFIG_PATH)
msui_settings_file_fs.writetext("msui_settings.json", option_value)
msui_settings_file_fs.close()


if os.getenv("TESTS_VISIBLE") == "TRUE":
Expand Down Expand Up @@ -81,10 +81,10 @@ def pytest_generate_tests(metafunc):
config for mscolab.
This file is part of mss.
This file is part of MSS.
:copyright: Copyright 2019 Shivashis Padhi
:copyright: Copyright 2019-2022 by the mss team, see AUTHORS.
:copyright: Copyright 2019-2022 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -171,7 +171,7 @@ class mscolab_settings(object):
parent_path = fs.path.join(constants.ROOT_DIR, 'mscolab')


importlib.machinery.SourceFileLoader('mss_wms_settings', constants.SERVER_CONFIG_FILE_PATH).load_module()
importlib.machinery.SourceFileLoader('mswms_settings', constants.SERVER_CONFIG_FILE_PATH).load_module()
sys.path.insert(0, constants.SERVER_CONFIG_FS.root_path)
importlib.machinery.SourceFileLoader('mscolab_settings', path).load_module()
sys.path.insert(0, parent_path)
Expand Down
7 changes: 2 additions & 5 deletions docs/about.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


About
-----

Expand Down Expand Up @@ -47,6 +45,5 @@ and Forschungszentrum Jülich. Improving the software will improve the quality o
will also enable its use for other scientific areas, e.g. planning of ship routes.



* `Simple issues <https://github.com/Open-MSS/MSS/wiki/Getting-Started>`_
* `Contact <https://github.com/Open-MSS/MSS/wiki/Contact>`_
* `Simple issues for getting started with contributing to MSS <https://github.com/Open-MSS/MSS/wiki/Getting-Started>`_
* `Contact <https://github.com/Open-MSS/MSS/wiki/Contact>`_
2 changes: 1 addition & 1 deletion docs/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Components
plugins
mswms
mscolab
tutorials
gentutorials


8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
# Generate template plots
from docs.gallery.plot_examples import HS_template, VS_template
from mslib.mswms.mpl_lsec_styles import LS_DefaultStyle
dataset = [next(iter(mslib.mswms.wms.mss_wms_settings.data))]
mslib.mswms.wms.mss_wms_settings.register_horizontal_layers = [(HS_template.HS_Template, dataset)]
mslib.mswms.wms.mss_wms_settings.register_vertical_layers = [(VS_template.VS_Template, dataset)]
mslib.mswms.wms.mss_wms_settings.register_linear_layers = [(LS_DefaultStyle, dataset)]
dataset = [next(iter(mslib.mswms.wms.mswms_settings.data))]
mslib.mswms.wms.mswms_settings.register_horizontal_layers = [(HS_template.HS_Template, dataset)]
mslib.mswms.wms.mswms_settings.register_vertical_layers = [(VS_template.VS_Template, dataset)]
mslib.mswms.wms.mswms_settings.register_linear_layers = [(LS_DefaultStyle, dataset)]
mslib.mswms.wms.server.__init__()
mslib.mswms.wms.server.generate_gallery(sphinx=True, create=True, clear=True, simple_naming=True)
importlib.reload(mslib.mswms.gallery_builder)
Expand Down
14 changes: 7 additions & 7 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ MSS repository needs a different folder, e.g. workspace/mss. Avoid to mix data a

$(mssdev) python mslib/mswms/demodata.py --seed

To use this data add the mss_wms_settings.py in your python path::
To use this data add the mswms_settings.py in your python path::

$(mssdev) cd $HOME/PycharmProjects/mss
$(mssdev) export PYTHONPATH="`pwd`:$HOME/mss"
Expand Down Expand Up @@ -201,12 +201,12 @@ We have implemented demodata as data base for testing. On first call of pytest a
in a /tmp/mss* folder. If you have installed gitpython a postfix of the revision head is added.


Setup mss_settings.json for special tests
Setup msui_settings.json for special tests
+++++++++++++++++++++++++++++++++++++++++

On default all tests use default configuration defined in mslib.msui.MissionSupportSystemDefaultConfig.
If you want to overwrite this setup and try out a special configuration add an mss_settings.json
file to the testings base dir in your tmp directory. You call it by the custom `--mss_settings` option
If you want to overwrite this setup and try out a special configuration add an msui_settings.json
file to the testings base dir in your tmp directory. You call it by the custom `--msui_settings` option


Testing
Expand Down Expand Up @@ -266,13 +266,13 @@ Profiling can be done by e.g.::

example::

/!\ existing server config: "mss_wms_settings.py" for demodata not overwritten!
/!\ existing server config: "mswms_settings.py" for demodata not overwritten!


/!\ existing server auth config: "mss_wms_auth.py" for demodata not overwritten!
/!\ existing server auth config: "mswms_auth.py" for demodata not overwritten!


To use this setup you need the mss_wms_settings.py in your python path e.g.
To use this setup you need the mswms_settings.py in your python path e.g.
export PYTHONPATH=~/mss
557395 function calls (543762 primitive calls) in 0.980 seconds

Expand Down
4 changes: 2 additions & 2 deletions docs/gallery/plot_examples/HS_template.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
This file is part of mss.
This file is part of MSS.
:copyright: Copyright 2021-2022 by the mss team, see AUTHORS.
:copyright: Copyright 2021-2022 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
4 changes: 2 additions & 2 deletions docs/gallery/plot_examples/VS_template.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
This file is part of mss.
This file is part of MSS.
:copyright: Copyright 2021-2022 by the mss team, see AUTHORS.
:copyright: Copyright 2021-2022 by the MSS team, see AUTHORS.
:license: APACHE-2.0, see LICENSE for details.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
4 changes: 2 additions & 2 deletions docs/gallery/plot_examples/plot_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ and play around with it however you like.

If you wish to include this into your WMS server

1. Put the file into your mss_wms_settings.py directory, e.g. **~/mss**
2. Assuming you didn't change the file or class name, append the following lines into your mss_wms_settings.py
1. Put the file into your mswms_settings.py directory, e.g. **~/mss**
2. Assuming you didn't change the file or class name, append the following lines into your mswms_settings.py

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery/plot_examples/plot_example_LS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Creating your own Linear-View plot
----------------------------------

Linear-View plots are very simple, and thus simple to create. If you wish to add your own quantity to a Linear-View all you need to do is add the following to your mss_wms_settings.py
Linear-View plots are very simple, and thus simple to create. If you wish to add your own quantity to a Linear-View all you need to do is add the following to your mswms_settings.py

.. code-block:: python
Expand Down
Loading

0 comments on commit e03a1b8

Please sign in to comment.