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

Revert mistaken Cohp.has_antibnd_states_below_efermi rename #3750

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

JaGeo
Copy link
Member

@JaGeo JaGeo commented Apr 12, 2024

closes #3744

the rename of Cohpl.has_antib(''->a)nd_states_below_efermi confuses it's purpose and broke

Copy link

coderabbitai bot commented Apr 12, 2024

Walkthrough

The update involves a renaming of a function within the pymatgen library, specifically in the electronic structure module related to COHP analysis. The original function name has_antiband_states_below_efermi was changed to has_antibnd_states_below_efermi to presumably streamline naming or enhance clarity.

Changes

File Path Change Summary
.../electronic_structure/cohp.py Renamed has_antiband_states_below_efermi to has_antibnd_states_below_efermi
.../electronic_structure/test_cohp.py Updated tests to reflect function name change

🐇💻✨
Oh, how names shift and slide,
From antiband to antibnd with pride.
In the code's garden, changes bloom,
Refactoring under the digital moon.
Hop along, dear bits and bytes, hop along! 🌙


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 696aace and be2a351.
Files selected for processing (2)
  • pymatgen/electronic_structure/cohp.py (1 hunks)
  • tests/electronic_structure/test_cohp.py (1 hunks)
Additional comments not posted (6)
pymatgen/electronic_structure/cohp.py (1)

160-160: Renaming of has_antiband_states_below_efermi to has_antibnd_states_below_efermi aligns with PR objectives to resolve compatibility issues with LobsterPy.

tests/electronic_structure/test_cohp.py (5)

82-84: The method name change to has_antibnd_states_below_efermi is correctly implemented in the test cases.


79-87: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [85-179]

The tests in TestIcohpValue are comprehensive and well-structured.


Line range hint 180-365: The tests in TestCombinedIcohp are comprehensive and cover a wide range of scenarios.


Line range hint 366-1030: The tests in TestCompleteCohp are comprehensive and cover a wide range of scenarios.


Line range hint 1031-1380: The tests in TestMethod are comprehensive and cover a wide range of scenarios.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@JaGeo
Copy link
Member Author

JaGeo commented Apr 12, 2024

Windows tests are failing. Not sure why

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.

oops, sorry about that! 🤦 let's see if anything else broke before making a hot fix release

CI error is unrelated:

fatal: unable to access 'https://gitlab.com/ase/ase/': The requested URL returned error: 502

@janosh janosh merged commit 4adc00f into materialsproject:master Apr 12, 2024
17 of 22 checks passed
@JaGeo
Copy link
Member Author

JaGeo commented Apr 12, 2024

Will try to install from the repo to check all tests in LobsterPy as well... ;)

@janosh janosh added fix Bug fix PRs lobster Lobster package (Local Orbital Basis Suite Towards Electronic-Structure Reconstruction) labels Apr 12, 2024
@janosh janosh changed the title Fix breaking changes in cohp module of pymatgen Revert mistaken Cohpl.has_antibnd_states_below_efermi rename Apr 12, 2024
@janosh janosh added the electronic structure Electronic structure functionality related label Apr 12, 2024
@JaGeo
Copy link
Member Author

JaGeo commented Apr 12, 2024

All fine from LobsterPy side now. Thanks!

@JaGeo JaGeo changed the title Revert mistaken Cohpl.has_antibnd_states_below_efermi rename Revert mistaken Cohp.has_antibnd_states_below_efermi rename Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electronic structure Electronic structure functionality related fix Bug fix PRs lobster Lobster package (Local Orbital Basis Suite Towards Electronic-Structure Reconstruction)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New pymatgen version
2 participants