Skip to content

refactor and style: Refactor unittest tests for in favor of pytest and update docstrings in fitbase - #222

Merged
sbillinge merged 2 commits into
diffpy:mainfrom
cadenmyers13:fitbase-standard
Oct 13, 2026
Merged

sbillinge merged 2 commits into
diffpy:mainfrom
cadenmyers13:fitbase-standard

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

This PR standardizes diffpy.srfit.fitbase by:

  1. Refactoring tests in favor of pytest group standards
  2. Updating docstrings to numpy standards
  3. Adding a test for test_simplerecipe.py

The new architecture for testing the deprecated functions is moving them into tests/deprecated/ so when they are removed they are easy to find and are organized

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.94734% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.13%. Comparing base (a9eae82) to head (92ad141).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
tests/deprecated/test_equation_deprecations.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #222       +/-   ##
===========================================
+ Coverage   71.63%   85.13%   +13.50%     
===========================================
  Files          25       43       +18     
  Lines        3437     4751     +1314     
===========================================
+ Hits         2462     4045     +1583     
+ Misses        975      706      -269     
Files with missing lines Coverage Δ
tests/conftest.py 94.55% <100.00%> (+6.14%) ⬆️
tests/deprecated/test_constraint_deprecations.py 100.00% <100.00%> (ø)
...ts/deprecated/test_fitcontribution_deprecations.py 100.00% <100.00%> (ø)
tests/deprecated/test_fitrecipe_deprecations.py 100.00% <100.00%> (ø)
tests/deprecated/test_fitresults_deprecations.py 100.00% <100.00%> (ø)
tests/deprecated/test_parameter_deprecations.py 100.00% <100.00%> (ø)
tests/deprecated/test_parameterset_deprecations.py 100.00% <100.00%> (ø)
tests/deprecated/test_profile_deprecations.py 100.00% <100.00%> (ø)
...ests/deprecated/test_profileparser_deprecations.py 100.00% <100.00%> (ø)
...ts/deprecated/test_recipeorganizer_deprecations.py 100.00% <100.00%> (ø)
... and 15 more

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review. After this PR is merged we can go ahead with the 3.4.0rc0 release

@sbillinge sbillinge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Haha, that is way to much to review, but I trust Claude on that.

@sbillinge
sbillinge merged commit 766d877 into diffpy:main Oct 13, 2026
7 checks passed
@cadenmyers13
cadenmyers13 deleted the fitbase-standard branch October 13, 2026 18:25
@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge haha yeah. I skimmed over each line to make sure things look reasonable. Caught some stylization things but overall looked good.

@cadenmyers13

Copy link
Copy Markdown
Contributor Author

Also since its a refactor it knows the behavior we want to test

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