Skip to content

dep & test: Replace deprecated functions and add tests for interface.py - #230

Merged
sbillinge merged 6 commits into
diffpy:mainfrom
cadenmyers13:fix-structure-deprecations
Oct 15, 2026
Merged

sbillinge merged 6 commits into
diffpy:mainfrom
cadenmyers13:fix-structure-deprecations

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

No description provided.

@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review/merge. Missed these because I didnt have srreal installed in my env which caused certain tests to be skipped. This wont be a problem when we separate packages out into diffpy.cmi*.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.37500% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.96%. Comparing base (a9eae82) to head (b35b24d).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
tests/test_sgconstraints.py 0.00% 2 Missing ⚠️
tests/test_objcrystparset.py 0.00% 1 Missing ⚠️
tests/test_pdfcontribution.py 50.00% 1 Missing ⚠️
tests/test_pdfgenerator.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #230       +/-   ##
===========================================
+ Coverage   71.63%   84.96%   +13.32%     
===========================================
  Files          25       44       +19     
  Lines        3437     4887     +1450     
===========================================
+ Hits         2462     4152     +1690     
+ Misses        975      735      -240     
Files with missing lines Coverage Δ
tests/test_interface.py 100.00% <100.00%> (ø)
tests/test_objcrystparset.py 10.19% <0.00%> (-0.08%) ⬇️
tests/test_pdfcontribution.py 39.02% <50.00%> (ø)
tests/test_pdfgenerator.py 16.66% <0.00%> (ø)
tests/test_sgconstraints.py 11.58% <0.00%> (+1.51%) ⬆️

... and 20 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 cadenmyers13 changed the title dep: Replace deprecated functions dep & test: Replace deprecated functions and add tests for interface.py Oct 15, 2026
Comment thread tests/test_interface.py
# Expected: p1 is constrained and its value is 6.
def test_constrain_operator():
recipe, p1, p2 = _make_recipe_with_variables()
recipe *= "p1", "2*p2"

@cadenmyers13 cadenmyers13 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

tbh, i had no clue you could constrain/restrain parameters with *=/%=. Kinda cool! Although not super intuitive

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.

tbh, i had no clue you could constrain/restrain parameters with *=/%=. Kinda cool! Although not super intuitive

Classic Pavol. Is it in the docs, where the symbols are actually explained? If not, let's put it there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@sbillinge 😂 . Added it to the docs. built them and doubled checked it

@cadenmyers13 cadenmyers13 mentioned this pull request Oct 15, 2026
10 of 20 tasks
@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review again

@sbillinge
sbillinge merged commit e49212e into diffpy:main Oct 15, 2026
7 checks passed
@cadenmyers13
cadenmyers13 deleted the fix-structure-deprecations branch October 15, 2026 22:08
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