Skip to content
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

Reset label for sites changed by Structure.replace_species() #3672

Merged
merged 5 commits into from
Mar 5, 2024

Conversation

stefsmeets
Copy link
Contributor

Summary

This PR resets the label on any site changed by Structure.replace_species(). Site.label will fall back to use the default label instead (the species string).

Closes #3658

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

tests/core/test_structure.py Outdated Show resolved Hide resolved
Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

thanks a lot @stefsmeets. you have a knack for fixing stuff with minimal diff. 👍 😄

@janosh janosh enabled auto-merge (squash) March 5, 2024 19:03
@janosh janosh disabled auto-merge March 5, 2024 19:12
@janosh janosh merged commit a5a4887 into materialsproject:master Mar 5, 2024
3 of 5 checks passed
@stefsmeets stefsmeets deleted the label-replace branch March 6, 2024 07:24
@janosh janosh added fix Bug fix PRs ux User experience core Pymatgen core labels Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Pymatgen core fix Bug fix PRs ux User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Structure.replace_species leaves label intact resulting in confusing/misleading label
2 participants