Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:command changes #2644

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Conversation

anj20
Copy link
Contributor

@anj20 anj20 commented Feb 12, 2025

Purpose of PR?: Replace the mswms_demodata command with a --seed option for the mswms command, aligning it with the behavior of the seed option in mscolab

Fixes #2631

Does this PR introduce a breaking change?
No

If the changes in this PR are manually verified, list down the scenarios covered::
Verified that the seed function runs correctly when executed using mswms -seed

Checklist:

  • Bug fix. Fixes #
  • New feature (Non-API breaking changes that adds functionality)
  • PR Title follows the convention of <type>: <subject>
  • Commit has unit tests

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and what does this?

Have you tried the examples?

Copy link
Contributor Author

@anj20 anj20 Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and what does this?

Have you tried the examples?

It adds an argument '-s' or '--seed' to enable data seeding using the mswms command.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and how is the method called?

Does it create demodata in a dir as the description says?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it is not creating

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u give some hint where to do the changes?

Copy link
Member

@ReimarBauer ReimarBauer Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look in conftest for an example, this creates also demodata for the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi i have added the seed function. Can u jst review it?

@ReimarBauer
Copy link
Member

@anj20 do you have time to finish this in the next days?

@anj20 anj20 requested a review from ReimarBauer March 2, 2025 13:17
@ReimarBauer
Copy link
Member

@anj20
please solve the merge conflict

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when this is now copied here and we won´t call mswms_demodata any more the main function of demodata can be removed.

setup.py needs changes

and the docs need changes too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok lemme make the changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi do i need to remove the entire main funtion?

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@anj20
Copy link
Contributor Author

anj20 commented Mar 3, 2025

see comments

updated plz review it

@anj20 anj20 requested a review from ReimarBauer March 3, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change the command mswms_demodata to seed of mswms
2 participants