FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

dep: deprecate `diffpy.srfit.structure` in favor of `diffpy.cmistructure` by cadenmyers13 · Pull Request #236 · diffpy/diffpy.srfit · GitHub

Repository navigation

dep: deprecate diffpy.srfit.structure in favor of diffpy.cmistructure - #236

Merged
sbillinge merged 4 commits into
diffpy:mainfrom
cadenmyers13:structure-dep
Oct 23, 2026
Merged

sbillinge merged 4 commits into
diffpy:mainfrom
cadenmyers13:structure-dep

Conversation

Copy link
Copy Markdown
Contributor

Deprecating diffpy.srfit.structure in favor of diffpy.cmistructure.

This PR emits the deprecation warning on import:

>>> import diffpy.srfit.structure
DeprecationWarning: 'diffpy.srfit.structure'
is deprecated and will be removed in version 4.0.0. Please use 'diffpy.cmistructure' instead.

and if a function is called:

DeprecationWarning: 'diffpy.srfit.structure.sgconstraints.constrainAsSpaceGroup' is 
deprecated and will be removed in version 4.0.0. Please use 
'diffpy.cmistructure.sgconstraints.constrain_as_space_group' instead.

The attribute stru is also deprecated:

DeprecationWarning: 'diffpy.srfit.structure.basestructureparset.BaseStructureParSet.stru' is 
deprecated and will be removed in version 4.0.0. Please use 
'diffpy.cmistructure.basestructureparset.BaseStructureParSet.structure' instead.
  super(RecipeContainer, self).__setattr__(name, value)

def nacl_structure():
lattice = Lattice(5.6, 5.6, 5.6, 90, 90, 90)
atoms = [Atom("Na", [0, 0, 0]), Atom("Cl", [0.5, 0.5, 0.5])]
return Structure(atoms, lattice=lattice)

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This fixture is left here because it is only used in the deprecation tests so we want to remove it when all the tests are removed. If we don't, this will hang around in conftest.py unused

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review. deprecation of diffpy.srfit.structure

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.97%. Comparing base (507aa4e) to head (b571573).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tests/deprecated/test_structure_deprecations.py 85.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
+ Coverage   84.95%   84.97%   +0.01%     
==========================================
  Files          44       45       +1     
  Lines        4886     4945      +59     
==========================================
+ Hits         4151     4202      +51     
- Misses        735      743       +8     
Files with missing lines Coverage Δ
tests/test_sgconstraints.py 11.65% <ø> (+0.07%) ⬆️
tests/deprecated/test_structure_deprecations.py 85.00% <85.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

sbillinge merged commit 64c8288 into diffpy:main Oct 23, 2026
7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL