Skip to content

feat: add applymud subcommand #196

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yucongalicechen
Copy link
Collaborator

@yucongalicechen yucongalicechen commented Jul 4, 2025

closes #191

The getmud subcommand is tracked through #193 and #181. Docs update for this PR is tracked through #192.

Here're screenshots of the GUI interface:
1
2

@sbillinge ready for review

@@ -158,7 +159,7 @@ def _define_arguments():
return args


def _add_mud_selection_group(p, is_gui=False):
def _add_mud_selection_group(p, use_gui=False):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed is_gui to use_gui because I feel like it's a better variable name

def get_args(override_cli_inputs=None):
p = ArgumentParser()
p = _add_mud_selection_group(p, is_gui=False)
def _register_applymud_subparser(subp, use_gui=False):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here it's basically the same as before, but I'm taking it out as a separate function for adding arguments to applymud. I think it'll be cleaner when define another one for getmud later.

for arg in _define_arguments():
kwargs = {key: value for key, value in arg.items() if key != "name"}
p.add_argument(*arg["name"], **kwargs)
def create_parser(use_gui=False):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Function for creating gooey/argument parser

@@ -45,6 +45,7 @@
"wavelength",
"theoretical_from_density",
"theoretical_from_packing",
"subcommand",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do not write subcommand in the output files

@@ -115,7 +115,7 @@ def test_set_input_lists(inputs, expected, user_filesystem):
base_dir.resolve() / expected_path for expected_path in expected
]

cli_inputs = inputs + ["--mud", "2.5"]
cli_inputs = ["applymud"] + inputs + ["--mud", "2.5"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here just adding applymud to cli inputs for all tests

Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.31%. Comparing base (83ad2ec) to head (928cdc6).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #196   +/-   ##
=======================================
  Coverage   99.31%   99.31%           
=======================================
  Files           5        5           
  Lines         292      292           
=======================================
  Hits          290      290           
  Misses          2        2           
Files with missing lines Coverage Δ
tests/test_tools.py 98.84% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

feat: new CLI architecture
1 participant