Skip to content

feat: make muD optional and have different options for specifying muD #168

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

Merged
merged 4 commits into from
Apr 18, 2025

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.19%. Comparing base (103f4dc) to head (19e64f6).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
- Coverage   99.20%   99.19%   -0.02%     
==========================================
  Files           5        5              
  Lines         253      249       -4     
==========================================
- Hits          251      247       -4     
  Misses          2        2              
Files with missing lines Coverage Δ
tests/test_tools.py 98.46% <100.00%> (-0.05%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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

@yucongalicechen
Copy link
Collaborator Author

@sbillinge could you check this PR too when you get a chance? Thanks.

@sbillinge sbillinge merged commit bd71eda into diffpy:main Apr 18, 2025
5 checks passed
@yucongalicechen yucongalicechen deleted the muD branch April 18, 2025 17:56
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.

2 participants