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 fixable ruff rules #4015

Merged
merged 33 commits into from
Aug 28, 2024
Merged

Conversation

DanielYang59
Copy link
Contributor

@DanielYang59 DanielYang59 commented Aug 25, 2024

Summary

Fix fixable ruff rules

TODOs

@@ -83,7 +83,7 @@ def get_parameter_updates(
dict: The updated for the parameters for the output section of FHI-aims
"""
if isinstance(structure, Molecule):
raise ValueError("BandStructures can not be made for non-periodic systems") # noqa: TRY004
Copy link
Contributor Author

@DanielYang59 DanielYang59 Aug 25, 2024

Choose a reason for hiding this comment

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

ValueError changed to TypeError, tests seem to pass.

monkeypatch.setitem(SETTINGS, "AIMS_SPECIES_DIR", f"{TEST_FILES_DIR}/io/aims/species_directory")


def check_band(test_line: str, ref_line: str) -> bool:
Copy link
Contributor Author

@DanielYang59 DanielYang59 Aug 25, 2024

Choose a reason for hiding this comment

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

Need confirm: these helper functions for testing io.aims is relocated from pymatgen.util.testing.aims, was the original location intended? Is it safe to relocate them into tests? @shyuep

@DanielYang59 DanielYang59 marked this pull request as ready for review August 26, 2024 01:20
@DanielYang59 DanielYang59 marked this pull request as draft August 26, 2024 01:22
@DanielYang59 DanielYang59 marked this pull request as ready for review August 26, 2024 02:55
@DanielYang59 DanielYang59 marked this pull request as draft August 27, 2024 08:35
@DanielYang59 DanielYang59 marked this pull request as ready for review August 27, 2024 10:55
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, good stuff as always!

will hold off on reviewing #4017 until this is merged

src/pymatgen/io/abinit/abiobjects.py Outdated Show resolved Hide resolved
src/pymatgen/analysis/adsorption.py Outdated Show resolved Hide resolved
@janosh janosh added the linting Linting and quality assurance label Aug 27, 2024
@DanielYang59 DanielYang59 requested a review from janosh August 28, 2024 01:32
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 million @DanielYang59! 👍

@janosh janosh merged commit 46d843c into materialsproject:master Aug 28, 2024
43 checks passed
@DanielYang59 DanielYang59 deleted the remove-assert branch August 28, 2024 11:03
@DanielYang59
Copy link
Contributor Author

No problem, thanks for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linting Linting and quality assurance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants