From 4077a89ad29290b81af7b88c4f52e33c3a8b530a Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena Date: Wed, 12 Feb 2025 22:47:20 +0530 Subject: [PATCH 01/12] feat:command changes --- mslib/mswms/mswms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mslib/mswms/mswms.py b/mslib/mswms/mswms.py index b73fe9d5b..251d9aad8 100644 --- a/mslib/mswms/mswms.py +++ b/mslib/mswms/mswms.py @@ -44,6 +44,8 @@ def main(): parser.add_argument("--debug", help="show debugging log messages on console", action="store_true", default=False) parser.add_argument("--logfile", help="If set to a name log output goes to that file", dest="logfile", default=None) + parser.add_argument("-s", "--seed", help="creates demodata for the mswms server", + action="store_true", default=False) subparsers = parser.add_subparsers(help='Available actions', dest='action') gallery = subparsers.add_parser("gallery", help="Subcommands surrounding the gallery") From d3b0a524436ae1b32dee1d798baaf3d52712e0dc Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena Date: Wed, 12 Feb 2025 22:51:55 +0530 Subject: [PATCH 02/12] docs:updated --- README.md | 2 +- docs/installation.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c0f110a4..a4b6a7507 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ It is possible to list all versions of `mss` available on your platform with: For a simple test you can setup a demodata wms server and start a msolab server with default settings ``` - (mssenv) $ mswms_demodata --seed + (mssenv) $ mswms --seed (mssenv) $ export PYTHONPATH=~/mss (mssenv) $ mswms & (mssenv) $ mscolab start & diff --git a/docs/installation.rst b/docs/installation.rst index 234d6b6c6..0b7b8a84e 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -231,6 +231,6 @@ You can start server and client by loading the image :: $ singularity build -f mss.sif Singularity.def $ singularity shell mss.sif $ Singularity > msui # starts the ui - $ Singularity > mswms_demodata --seed # creates in your $HOME a mss/ folder with testdata + $ Singularity > mswms --seed # creates in your $HOME a mss/ folder with testdata $ Singularity > export PYTHONPATH=$HOME/mss; mswms # starts the development server $ Singularity > mscolab db --init; mscolab start # starts the mscolab development server From ccff85ce61a1a0db74340bc4f4c463765efab8f4 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena <96625401+anj20@users.noreply.github.com> Date: Sun, 2 Mar 2025 18:47:00 +0530 Subject: [PATCH 03/12] added the seed function --- mslib/mswms/mswms.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mslib/mswms/mswms.py b/mslib/mswms/mswms.py index 251d9aad8..72e070ea6 100644 --- a/mslib/mswms/mswms.py +++ b/mslib/mswms/mswms.py @@ -32,6 +32,8 @@ from mslib import __version__ from mslib.utils import setup_logging from mslib.mswms.wms import app as application +from mslib.mswms.demodata import DataFiles +import fs def main(): @@ -86,6 +88,17 @@ def main(): print("Documentation: http://mss.rtfd.io") print("Version:", __version__) sys.exit() + + if args.seed: + root_fs = fs.open_fs("~/") + if not root_fs.exists("mss/testdata"): + root_fs.makedirs("mss/testdata") + + examples = DataFiles(data_fs=fs.open_fs("~/mss/testdata"), + server_config_fs=fs.open_fs("~/mss")) + examples.create_server_config(detailed_information=True) + examples.create_data() + print("\nTo use this setup you need the mswms_settings.py in your python path e.g. \nexport PYTHONPATH=~/mss") setup_logging(args) From 6525ac5062a6aefe92eab2bdf9915fe4f419c814 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena <96625401+anj20@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:26:38 +0530 Subject: [PATCH 04/12] removed the seed function from demodata --- mslib/mswms/demodata.py | 24 ++++++++++++------------ setup.py | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mslib/mswms/demodata.py b/mslib/mswms/demodata.py index 1fe94de20..08fddd96d 100644 --- a/mslib/mswms/demodata.py +++ b/mslib/mswms/demodata.py @@ -1235,8 +1235,8 @@ def main(): """ parser = argparse.ArgumentParser() parser.add_argument("-v", "--version", help="show version", action="store_true", default=False) - parser.add_argument("-s", "--seed", help="creates demodata for the mswms server", - action="store_true", default=False) + # parser.add_argument("-s", "--seed", help="creates demodata for the mswms server", + # action="store_true", default=False) args = parser.parse_args() if args.version: print("***********************************************************************") @@ -1245,16 +1245,16 @@ def main(): print("Documentation: http://mss.rtfd.io") print("Version:", __version__) sys.exit() - if args.seed: - root_fs = fs.open_fs("~/") - if not root_fs.exists("mss/testdata"): - root_fs.makedirs("mss/testdata") - - examples = DataFiles(data_fs=fs.open_fs("~/mss/testdata"), - server_config_fs=fs.open_fs("~/mss")) - examples.create_server_config(detailed_information=True) - examples.create_data() - print("\nTo use this setup you need the mswms_settings.py in your python path e.g. \nexport PYTHONPATH=~/mss") + # if args.seed: + # root_fs = fs.open_fs("~/") + # if not root_fs.exists("mss/testdata"): + # root_fs.makedirs("mss/testdata") + + # examples = DataFiles(data_fs=fs.open_fs("~/mss/testdata"), + # server_config_fs=fs.open_fs("~/mss")) + # examples.create_server_config(detailed_information=True) + # examples.create_data() + # print("\nTo use this setup you need the mswms_settings.py in your python path e.g. \nexport PYTHONPATH=~/mss") if __name__ == '__main__': diff --git a/setup.py b/setup.py index 322495cd9..d9267bc43 100644 --- a/setup.py +++ b/setup.py @@ -38,8 +38,8 @@ "mss = mslib.msui.mss:main", "mssautoplot = mslib.utils.mssautoplot:main", "msui = mslib.msui.msui:main", - "mswms = mslib.mswms.mswms:main", - "mswms_demodata = mslib.mswms.demodata:main"] + "mswms = mslib.mswms.mswms:main",] + # "mswms_demodata = mslib.mswms.demodata:main"] if os.name != 'nt': console_scripts.append('msidp = mslib.msidp.idp:main') From a57f98a960c098716c5a65953c840ef255964e4c Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena <96625401+anj20@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:29:39 +0530 Subject: [PATCH 05/12] docs:updated --- docs/development.rst | 2 +- docs/mswms.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/development.rst b/docs/development.rst index 02676ab7a..f9642f76d 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -155,7 +155,7 @@ MSS repository needs a different folder, e.g. workspace/MSS. Avoid to mix data a :ref:`demodata ` is provided by executing:: - mswms_demodata --seed + mswms --seed To use this data add the mswms_settings.py in your python path:: diff --git a/docs/mswms.rst b/docs/mswms.rst index bf006e48c..717e2bb4b 100644 --- a/docs/mswms.rst +++ b/docs/mswms.rst @@ -27,7 +27,7 @@ Simulated Data and its configuration ------------------------------------ -We provide demodata by executing the :code:`mswms_demodata --seed` program. This creates in your home directory +We provide demodata by executing the :code:`mswms --seed` program. This creates in your home directory data files and also the needed server configuration files. The program creates 70MB of examples. This script does not overwrite an existing mswms_settings.py. From fab245fab9b4475d3fdc69fec57fd28ce92c8892 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena <96625401+anj20@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:08:19 +0530 Subject: [PATCH 06/12] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 02daf71bc..d22a63ecf 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ and don't need server configurations. ##### Updating pixi global update mss - #### Project installation Initialize a new project and navigate to the project directory. @@ -127,4 +126,4 @@ Acknowledgements We are very grateful for your continuing support for MSS! See our [Contributors page](https://mss.readthedocs.io/en/stable/authors.html) for a list of authors. See also our info on [funding]( -https://mss.readthedocs.io/en/stable/funding.html). \ No newline at end of file +https://mss.readthedocs.io/en/stable/funding.html). From 24ee0b5d71440ef3fb43de907a3acc94a723a175 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena <96625401+anj20@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:11:17 +0530 Subject: [PATCH 07/12] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d22a63ecf..0635c2345 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ and don't need server configurations. ##### Updating + pixi global update mss #### Project installation From 2a9e619ce2f8bb7cb6536afe7945e95141e54e72 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena Date: Thu, 6 Mar 2025 15:51:14 +0530 Subject: [PATCH 08/12] removed comments --- mslib/mswms/demodata.py | 2 -- setup.py | 1 - 2 files changed, 3 deletions(-) diff --git a/mslib/mswms/demodata.py b/mslib/mswms/demodata.py index 08fddd96d..76abe3908 100644 --- a/mslib/mswms/demodata.py +++ b/mslib/mswms/demodata.py @@ -1235,8 +1235,6 @@ def main(): """ parser = argparse.ArgumentParser() parser.add_argument("-v", "--version", help="show version", action="store_true", default=False) - # parser.add_argument("-s", "--seed", help="creates demodata for the mswms server", - # action="store_true", default=False) args = parser.parse_args() if args.version: print("***********************************************************************") diff --git a/setup.py b/setup.py index d9267bc43..5d5899ecc 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,6 @@ "mssautoplot = mslib.utils.mssautoplot:main", "msui = mslib.msui.msui:main", "mswms = mslib.mswms.mswms:main",] - # "mswms_demodata = mslib.mswms.demodata:main"] if os.name != 'nt': console_scripts.append('msidp = mslib.msidp.idp:main') From 9ebe5b2d52a64d595d4c8632c45eff0cb7816a09 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena Date: Thu, 6 Mar 2025 15:53:16 +0530 Subject: [PATCH 09/12] removed comments demodata.py --- mslib/mswms/demodata.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/mslib/mswms/demodata.py b/mslib/mswms/demodata.py index 76abe3908..681772726 100644 --- a/mslib/mswms/demodata.py +++ b/mslib/mswms/demodata.py @@ -1243,16 +1243,6 @@ def main(): print("Documentation: http://mss.rtfd.io") print("Version:", __version__) sys.exit() - # if args.seed: - # root_fs = fs.open_fs("~/") - # if not root_fs.exists("mss/testdata"): - # root_fs.makedirs("mss/testdata") - - # examples = DataFiles(data_fs=fs.open_fs("~/mss/testdata"), - # server_config_fs=fs.open_fs("~/mss")) - # examples.create_server_config(detailed_information=True) - # examples.create_data() - # print("\nTo use this setup you need the mswms_settings.py in your python path e.g. \nexport PYTHONPATH=~/mss") if __name__ == '__main__': From 8b2e0619f412819c24529ec4dd6d803ca41f2e19 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena Date: Thu, 6 Mar 2025 16:32:37 +0530 Subject: [PATCH 10/12] Revert "Update README.md" This reverts commit fab245fab9b4475d3fdc69fec57fd28ce92c8892. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0635c2345..f34ae7c0d 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ and don't need server configurations. pixi global update mss + #### Project installation Initialize a new project and navigate to the project directory. @@ -127,4 +128,4 @@ Acknowledgements We are very grateful for your continuing support for MSS! See our [Contributors page](https://mss.readthedocs.io/en/stable/authors.html) for a list of authors. See also our info on [funding]( -https://mss.readthedocs.io/en/stable/funding.html). +https://mss.readthedocs.io/en/stable/funding.html). \ No newline at end of file From 76ba3d74ce795b2e6d752519414f6ceec5eff9f1 Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena Date: Thu, 6 Mar 2025 16:33:10 +0530 Subject: [PATCH 11/12] Revert "Update README.md" This reverts commit 24ee0b5d71440ef3fb43de907a3acc94a723a175. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index f34ae7c0d..02daf71bc 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ and don't need server configurations. ##### Updating - pixi global update mss From e65d1ffccd3e7bab2a2e00d6aa184c7ab23e00cf Mon Sep 17 00:00:00 2001 From: Anurag Narayan Jena Date: Thu, 6 Mar 2025 16:34:25 +0530 Subject: [PATCH 12/12] Reapply "Update README.md" This reverts commit 76ba3d74ce795b2e6d752519414f6ceec5eff9f1. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 02daf71bc..f34ae7c0d 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ and don't need server configurations. ##### Updating + pixi global update mss