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

Fix issues with labels #3169

Merged
merged 5 commits into from
Jul 20, 2023
Merged

Fix issues with labels #3169

merged 5 commits into from
Jul 20, 2023

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Jul 20, 2023

Summary

This PR fixes some issues with labels and adds new tests for previously unspecified behaviour.

Major changes:

  • Site.label (and derivatives) defaults to .species_string instead of None
  • Add label attribute to Neighbor and PeriodicNeighbor

Closes #3166
Closes #3160

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

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

pip install -U pre-commit
pre-commit install

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.

@stefsmeets Thanks for putting together a PR so quickly! This looks great!

@janosh janosh added fix Bug fix PRs core Pymatgen core labels Jul 20, 2023
@janosh janosh enabled auto-merge (squash) July 20, 2023 15:20
@janosh janosh merged commit 9a98f4c into materialsproject:master Jul 20, 2023
27 checks passed
@stefsmeets stefsmeets deleted the label-fix branch July 21, 2023 11:48
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
Projects
None yet
2 participants