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: make muD optional and have different options for specifying muD #168

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

Conversation

yucongalicechen
Copy link
Collaborator

@yucongalicechen yucongalicechen commented Feb 24, 2025

@sbillinge ready for review

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.20%. Comparing base (1a263b4) to head (becbe94).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
- Coverage   99.21%   99.20%   -0.02%     
==========================================
  Files           5        5              
  Lines         254      250       -4     
==========================================
- Hits          252      248       -4     
  Misses          2        2              
Files with missing lines Coverage Δ
tests/test_tools.py 98.46% <100.00%> (-0.05%) ⬇️

@yucongalicechen
Copy link
Collaborator Author

Screenshots of the cli and gui interfaces:
cli
gui

]
return args


def _add_mud_selection_group(p, is_gui=False):
"""Current Options:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

grouped the related mu*D arguments

)
args.z_scan_file = str(filepath)
args.mud = compute_mud(filepath)
return _estimate_mud_from_zscan(args)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Made the z-scan part a separate private function

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

cli_inputs = ["2.5"] + inputs
cli_inputs = 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.

Manually entered muD following the new convention ("2.5" to "--mud", "2.5")

assert actual_args.mud == pytest.approx(2.5, rel=1e-4, abs=0.1)
assert actual_args.z_scan_file is None

@pytest.mark.parametrize(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new tests

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.

1 participant