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

chore: deprecate assignUniqueLabels by stevenhua0320 · Pull Request #158 · diffpy/diffpy.structure · GitHub

Repository navigation

chore: deprecate assignUniqueLabels - #158

Merged
sbillinge merged 4 commits into
diffpy:mainfrom
stevenhua0320:deprecate-assignUniqueLabels
Feb 20, 2026
Merged

sbillinge merged 4 commits into
diffpy:mainfrom
stevenhua0320:deprecate-assignUniqueLabels

Conversation

Copy link
Copy Markdown
Contributor

@sbillinge ready to review.
Now the test for this function would give deprecationWarning shown below.

(diffpy.structure) ~/dbs/diffpy.structure git:[deprecate-assignUniqueLabels]
pytest
============================================================================================================== test session starts ==============================================================================================================
platform darwin -- Python 3.14.3, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/huarundong/dbs/diffpy.structure
configfile: pyproject.toml
collected 138 items                                                                                                                                                                                                                             

tests/test_atom.py ..                                                                                                                                                                                                                     [  1%]
tests/test_lattice.py ............                                                                                                                                                                                                        [ 10%]
tests/test_loadstructure.py ......                                                                                                                                                                                                        [ 14%]
tests/test_p_cif.py .....................                                                                                                                                                                                                 [ 29%]
tests/test_p_discus.py .....                                                                                                                                                                                                              [ 33%]
tests/test_p_pdffit.py .........                                                                                                                                                                                                          [ 39%]
tests/test_parsers.py .............                                                                                                                                                                                                       [ 49%]
tests/test_spacegroups.py .....                                                                                                                                                                                                           [ 52%]
tests/test_structure.py ........................................                                                                                                                                                                          [ 81%]
tests/test_supercell.py ...                                                                                                                                                                                                               [ 84%]
tests/test_symmetryutilities.py .....................                                                                                                                                                                                     [ 99%]
tests/test_version.py .                                                                                                                                                                                                                   [100%]

=============================================================================================================== warnings summary ================================================================================================================
tests/test_structure.py::TestStructure::test_assignUniqueLabels
  /Users/huarundong/dbs/diffpy.structure/tests/test_structure.py:128: DeprecationWarning: 'diffpy.structure.Structure.assignUniqueLabels' is deprecated and will be removed in version 4.0.0. Please use 'diffpy.structure.Structure.assign_unique_labels' instead.
    self.stru.assignUniqueLabels()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================================== 138 passed, 1 warning in 0.63s =========================================================================================================

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.

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

I will merge this but @stevenhua0320 and @cadenmyers13 please can you see my comment

Comment thread news/deprecate-assignUniqueLabels.rst Outdated
@@ -0,0 +1,23 @@
**Added:**

* No News Added: deprecate assignUniqueLabels method

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.

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

Why is this no news. Don't we need to list what we deprecate and what we add?

Comment thread tests/test_structure.py Outdated

def test_assignUniqueLabels(self):
"""Check Structure.assignUniqueLabels()"""
"""Duplicate test with the deprecated assignUniqueLabels method.

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.

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

I don't think we need to do this. This test will start failing when we remove the function so these will be easy to find and remove.

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

@sbillinge So, what we need to contain here? should we maintain the original docstring here?

Copy link
Copy Markdown
Contributor

Actually, I can't merge because of the news. I am afraid that I may have merged som no-news's that should have had news in them. Please can you take a look @stevenhua0320 and add PRs if I did?

Copy link
Copy Markdown
Contributor Author

@sbillinge It's safe right now since nothing deprecation's PR has been merged yet. I would now change the news and see anything that we need edit here.

codecov Bot commented Feb 20, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.93%. Comparing base (1b565c8) to head (2a1f30e).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #158   +/-   ##
=======================================
  Coverage   98.93%   98.93%           
=======================================
  Files          13       13           
  Lines        1878     1884    +6     
=======================================
+ Hits         1858     1864    +6     
  Misses         20       20           
Files with missing lines Coverage Δ
tests/test_structure.py 99.78% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

sbillinge merged commit 39d41f0 into diffpy:main Feb 20, 2026
7 checks passed
stevenhua0320 changed the title build: deprecate assignUniqueLabels chore: deprecate assignUniqueLabels Feb 20, 2026
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