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

Develop #71

Merged
merged 31 commits into from
May 15, 2024
Merged

Develop #71

merged 31 commits into from
May 15, 2024

Conversation

kavanase
Copy link
Member

@kavanase kavanase commented Apr 11, 2024

Summary by CodeRabbit

  • New Features

    • Added a verbose option to various functions for enhanced output detail.
    • Introduced logic to handle bulk oxidation states in defect analysis.
    • Enhanced defect identification by automatically determining oxidation states if not provided.
  • Bug Fixes

    • Fixed ordering in the apply_dimer_distortion function to ensure specific operations sequence.
  • Documentation

    • Updated publication links and references in README and documentation to reflect current information.
    • Updated release version in documentation configuration.
  • Refactor

    • Refactored test setup and test functions for improved readability and consistency.
    • Modified several functions to include a verbose parameter for conditional output.
  • Tests

    • Enhanced test coverage with additional checks and a new testing function.
    • Introduced a custom decorator for image comparison in plotting tests.
  • Chores

    • Updated workflow actions to newer versions and refined CI/CD pipeline configurations.
    • Updated Python versions and operating systems in workflow and documentation configurations.

…` along with `snb-plot` and `snb-analyse`. Also add test
…e to a `doped` change, fixed in the next released version
…fficiency (avoid regenerating each time, shaves ~30 minutes off testing times)
Copy link

coderabbitai bot commented Apr 13, 2024

Walkthrough

This update weaves a tapestry of improvements throughout the project, enhancing functionality, maintainability, and user experience. From upgrading Python versions to refining workflows, handling errors gracefully, and enriching documentation and testing, these changes aim to elevate the project's quality and efficiency.

Changes

File Path Change Summary
.github/workflows/... Updated Python version, upgraded GitHub Actions, refined triggers, and modified test commands.
.readthedocs.yaml Updated OS version to ubuntu-22.04 and Python version to 3.11.
CHANGELOG.rst Version 3.3.2: Added verbose options, improved oxi-state guessing, efficiency updates.
README.md, docs/index.rst Updated publication link for K. Li et al.'s paper.
setup.py, docs/conf.py Version number updated from '3.3.1' to '3.3.2'.
shakenbreak/... Enhanced functionality with verbose options, improved error handling, and updated function calls.
tests/... Improved test setups, added custom decorators, and refined test functions.

🐰✨
In the warren, beneath the moon's glow,
Changes whisper through the code's flow.
Upgraded, refined, a dance of lines,
A rabbit's touch in digital signs.
Celebrate the craft, hop and twirl,
In the burrow of bytes, a new world unfurls.
🌟🐇


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Actionable comments outside the diff hunks (5)
shakenbreak/io.py (1)

Line range hint 22-23: The import pymatgen.core.structure is unused in this file. Removing unused imports can help reduce memory footprint and improve the clarity of the code.

- from pymatgen.core.structure import Structure
tests/test_input.py (4)

Line range hint 4-4: Remove unused import filecmp.

- import filecmp

Line range hint 21-21: Remove unused import Species from pymatgen.core.periodic_table.

- from pymatgen.core.periodic_table import DummySpecies, Species
+ from pymatgen.core.periodic_table import DummySpecies

Line range hint 967-967: The local variable vac_coords is assigned but never used within the method. Consider removing it if it's not needed.

- vac_coords = np.array([0, 0, 0])  # Cd vacancy fractional coordinates

Line range hint 2118-2118: The local variable w is assigned but never used within the method. Consider removing it if it's not needed.

- with warnings.catch_warnings(record=True) as w:
+ with warnings.catch_warnings(record=True):

shakenbreak/energy_lowering_distortions.py Outdated Show resolved Hide resolved
shakenbreak/cli.py Outdated Show resolved Hide resolved
shakenbreak/cli.py Outdated Show resolved Hide resolved
shakenbreak/cli.py Show resolved Hide resolved
shakenbreak/cli.py Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 28

shakenbreak/energy_lowering_distortions.py Outdated Show resolved Hide resolved
shakenbreak/energy_lowering_distortions.py Outdated Show resolved Hide resolved
shakenbreak/energy_lowering_distortions.py Outdated Show resolved Hide resolved
shakenbreak/energy_lowering_distortions.py Show resolved Hide resolved
shakenbreak/cli.py Show resolved Hide resolved
@@ -1652,9 +1645,6 @@ def test_write_vasp_files(self):
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
Copy link

Choose a reason for hiding this comment

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

Replace assertEqual with assert for consistency with Python best practices.

- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
assert kpoints.kpts == [[1, 1, 1]]

@@ -1692,13 +1682,12 @@ def test_write_vasp_files(self):
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
Copy link

Choose a reason for hiding this comment

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

Replace assertEqual with assert for consistency with Python best practices.

- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
assert kpoints.kpts == [[1, 1, 1]]

@@ -2007,11 +1996,10 @@ def test_write_vasp_files(self):
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
Copy link

Choose a reason for hiding this comment

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

Replace assertEqual with assert for consistency with Python best practices.

- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
assert kpoints.kpts == [[1, 1, 1]]

@@ -2222,9 +2210,6 @@ def test_write_vasp_files_from_doped_defect_gen(self):
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
Copy link

Choose a reason for hiding this comment

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

Replace assertEqual with assert for consistency with Python best practices.

- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
assert kpoints.kpts == [[1, 1, 1]]

@@ -2259,13 +2244,12 @@ def test_write_vasp_files_from_doped_defect_gen(self):
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
Copy link

Choose a reason for hiding this comment

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

Replace assertEqual with assert for consistency with Python best practices.

- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
assert kpoints.kpts == [[1, 1, 1]]

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 27

Out of diff range and nitpick comments (35)
shakenbreak/SnB_run.sh (8)

Line range hint 68-68: Use find instead of ls to better handle non-alphanumeric filenames.

- num_outcars=$(ls OUTCAR* | wc -l)
+ num_outcars=$(find . -maxdepth 1 -name 'OUTCAR*' | wc -l)

Line range hint 145-145: Use { ..; } instead of (..) to avoid subshell overhead.

- if check_multiple_single_step_outcars && { ( [[ -f "CONTCAR" ]] && [[ $(wc -l < "CONTCAR") -le 9 ]] ) || ( [[ -f "CONTCAR" ]] && diff -q "POSCAR" "CONTCAR" >/dev/null ) || [[ ! -f "CONTCAR" ]]; }; then
+ if check_multiple_single_step_outcars && { [[ -f "CONTCAR" ]] && [[ $(wc -l < "CONTCAR") -le 9 ]] || [[ -f "CONTCAR" ]] && diff -q "POSCAR" "CONTCAR" >/dev/null || [[ ! -f "CONTCAR" ]]; }; then

Line range hint 155-155: Consider using grep -c instead of grep|wc -l.

- num_ionic_steps=$(grep entropy= OUTCAR* | wc -l)
+ num_ionic_steps=$(grep -c 'entropy=' OUTCAR*)

Line range hint 195-195: Double quote to prevent globbing and word splitting.

- cp ${vasp_file} ${vasp_file}_${current_time}
+ cp "${vasp_file}" "${vasp_file}_${current_time}"

Line range hint 197-197: Double quote to prevent globbing and word splitting.

- "cp" CONTCAR POSCAR
+ "cp" "CONTCAR" "POSCAR"

Line range hint 218-218: Use ./*glob* or -- *glob* so names with dashes won't become options.

- rm "${i}"/DOSCAR
+ rm -- "${i}"/DOSCAR

Line range hint 222-222: Use ./*glob* or -- *glob* so names with dashes won't become options.

- rm *_"${current_time}"
+ rm -- *_"${current_time}"

Line range hint 252-252: Double quote to prevent globbing and word splitting.

- rm "${i}"/DOSCAR
+ rm -- "${i}"/DOSCAR
README.md (14)

Line range hint 10-10: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.

- defect structure-searching method employing chemically-guided bond distortions to locate ground-state
+ defect structure searching method employing chemically guided bond distortions to locate ground-state

Line range hint 11-11: Unpaired symbol: ‘]’ seems to be missing.

- locate ground-state and metastable structures of point defects in solid materials. [Docs here!](https://shakenbreak.readthedocs.io/en/latest/)
+ locate ground-state and metastable structures of point defects in solid materials. [Docs here!](https://shakenbreak.readthedocs.io/en/latest/)]

Line range hint 38-38: Consider adding a comma here.

- Alternatively if needed, it can also be installed from `conda` with:
+ Alternatively, if needed, it can also be installed from `conda` with:

Line range hint 109-109: Consider an alternative verb to strengthen your wording.

- Please let us know if you have any issues with compatibility, or if you would like to see any additional features added to `ShakeNBreak` to make it more compatible with your code.
+ Please inform us if you encounter any compatibility issues, or if you would like to see any additional features added to `ShakeNBreak` to enhance its compatibility with your code.

Line range hint 113-113: Consider adding a comma here.

- Bugs reports, feature requests and questions
+ Bugs, reports, feature requests, and questions

Line range hint 174-174: Did you mean “are” or “were”?

- `ShakeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-source python packages:
+ `ShakeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-source Python packages:

Line range hint 174-174: If you want to indicate numerical ranges or time ranges, consider using an en dash.

- `ShakeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-source python packages:
+ `ShakeNBreak` is compatible with Python 3.9–3.12 and requires the following open-source Python packages:

Line range hint 27-27: Heading levels should only increment by one level at a time.

- ### Literature
+ ## Literature

Line range hint 28-28: Unordered list style.

- - Preview: Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016/j.matt.2021.06.003), _Matter_ 4 (8), 2602-2605, **2021**
+ * Preview: Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016/j.matt.2021.06.003), _Matter_ 4 (8), 2602-2605, **2021**

Line range hint 71-71: Multiple consecutive blank lines.

- 
+ 

Line range hint 9-9: Headings should be surrounded by blank lines.

- # `ShakeNBreak` (`SnB`)
+ 
# `ShakeNBreak` (`SnB`)

Line range hint 35-35: Fenced code blocks should be surrounded by blank lines.

- ```bash
+ 
```bash

Line range hint 14-14: Lists should be surrounded by blank lines.

- Main features include:
+ 
Main features include:

Line range hint 10-10: Images should have alternate text (alt text).

- <a href="https://shakenbreak.readthedocs.io/en/latest/"><img align="right" width="400" src="https://raw.githubusercontent.com/SMTG-Bham/ShakeNBreak/main/docs/toc.png"></a>
+ <a href="https://shakenbreak.readthedocs.io/en/latest/"><img align="right" width="400" src="https://raw.githubusercontent.com/SMTG-Bham/ShakeNBreak/main/docs/toc.png" alt="ShakeNBreak Table of Contents"></a>
docs/index.rst (1)

214-218: Ensure the new study entries follow the same format as the existing ones for consistency.

The new study entries look good, but please ensure they follow the same format as the existing ones for consistency. For example, ensure proper use of italics, bold, and subscript where applicable.

tests/test_input.py (11)

Line range hint 480-484: Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(V_Cd_comp, Composition("Cd32Te32"))
+ assert V_Cd_comp == Composition("Cd32Te32")

Line range hint 554-554: Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(intput_frac_coords.tolist(), output_frac_coords.tolist())
+ assert intput_frac_coords.tolist() == output_frac_coords.tolist()

Line range hint 573-573: The first line of the docstring should end with a period.

- """Test _calc_number_electrons function"""
+ """Test _calc_number_electrons function."""

Line range hint 617-617: Use a regular assert instead of unittest-style assertNotEqual for a more Pythonic approach.

- self.assertNotEqual(V_Cd_distorted_dict["distorted_structure"], self.V_Cd_minus0pt5_struc_rattled)
+ assert V_Cd_distorted_dict["distorted_structure"] != self.V_Cd_minus0pt5_struc_rattled

Line range hint 675-675: Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(Int_Cd_2_distorted_dict["distorted_structure"], self.Int_Cd_2_minus0pt6_struc_rattled)
+ assert Int_Cd_2_distorted_dict["distorted_structure"] == self.Int_Cd_2_minus0pt6_struc_rattled

Line range hint 757-757: Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(Int_Cd_2_distorted_dict["distorted_structure"], self.Int_Cd_2_minus0pt6_NN_10_struc_unrattled)
+ assert Int_Cd_2_distorted_dict["distorted_structure"] == self.Int_Cd_2_minus0pt6_NN_10_struc_unrattled

Line range hint 884-884: Use a regular assert instead of unittest-style assertIn for a more Pythonic approach.

- self.assertIn("Bond_Distortion_-60.0%", V_Cd_distorted_dict["distortions"])
+ assert "Bond_Distortion_-60.0%" in V_Cd_distorted_dict["distortions"]

Line range hint 2558-2558: Use a regular assert instead of unittest-style assertDictEqual for a more Pythonic approach.

- self.assertDictEqual(output[1]['defects']['v_Cd_C1_Se2.68']["charges"][0]['distorted_atoms'], [[58, 'Se'], [34, 'Te']])
+ assert output[1]['defects']['v_Cd_C1_Se2.68']["charges"][0]['distorted_atoms'] == [[58, 'Se'], [34, 'Te']]

Line range hint 3734-3734: Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(dist.defects_dict["Cd_i_C3v_Cd2.71"][0].defect.defect_site_index, 0)
+ assert dist.defects_dict["Cd_i_C3v_Cd2.71"][0].defect.defect_site_index == 0

Line range hint 2824-2824: Use a regular assert instead of unittest-style assertTrue for a more Pythonic approach.

- self.assertTrue(os.path.exists("vac_1_Cd_0/Unperturbed"))
+ assert os.path.exists("vac_1_Cd_0/Unperturbed")

Line range hint 2908-2908: Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(test_input, generated_input)
+ assert test_input == generated_input
tests/test_cli.py (1)

Line range hint 3232-3246: Simplify the list comprehension.

- assert all(
-     f"unreasonable charge state). If both checks pass, you likely need to adjust "
-     f"the `stdev` rattling parameter (can occur for hard/ionic/magnetic "
-     f"materials); see "
-     f"https://shakenbreak.readthedocs.io/en/latest/Tips.html#hard-ionic-materials\n"
-     f"This often indicates a complex PES with multiple minima, "
-     f"thus energy-lowering distortions particularly likely, so important to "
-     f"test with reduced `stdev`!" == str(i.message)
-     for i in w
- )
+ for i in w:
+     assert (
+         f"unreasonable charge state). If both checks pass, you likely need to adjust "
+         f"the `stdev` rattling parameter (can occur for hard/ionic/magnetic "
+         f"materials); see "
+         f"https://shakenbreak.readthedocs.io/en/latest/Tips.html#hard-ionic-materials\n"
+         f"This often indicates a complex PES with multiple minima, "
+         f"thus energy-lowering distortions particularly likely, so important to "
+         f"test with reduced `stdev`!" == str(i.message)
+     )
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between a4cd681 and 5084535.
Files selected for processing (11)
  • README.md (1 hunks)
  • docs/index.rst (1 hunks)
  • shakenbreak/SnB_run.sh (1 hunks)
  • shakenbreak/cli.py (32 hunks)
  • shakenbreak/distortions.py (16 hunks)
  • shakenbreak/energy_lowering_distortions.py (27 hunks)
  • shakenbreak/input.py (69 hunks)
  • tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input.inp (1 hunks)
  • tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input_user_parameters.inp (1 hunks)
  • tests/test_cli.py (16 hunks)
  • tests/test_input.py (27 hunks)
Files not summarized due to errors (1)
  • shakenbreak/input.py: Error: Message exceeds token limit
Files skipped from review due to trivial changes (1)
  • shakenbreak/distortions.py
Additional Context Used
LanguageTool (11)
README.md (11)

Near line 10: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ct structure-searching method employing chemically-guided bond distortions to locate ground-state...


Near line 11: Unpaired symbol: ‘]’ seems to be missing
Context: ...es of point defects in solid materials. [Docs here!](https://shakenbreak.readthed...


Near line 28: ‘In Search of’ might be wordy. Consider a shorter alternative.
Context: ...ew: Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016...


Near line 29: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...i.org/10.21105/joss.04817), Journal of Open Source Software 7 (80), 4817, 2022 - Theo...


Near line 38: Possible missing comma found.
Context: ... bash pip install shakenbreak Alternatively if needed, it can also be installed fro...


Near line 109: Consider an alternative verb to strengthen your wording.
Context: ... these files. Please let us know if you have any issues with compatibility, or if yo...


Near line 113: Consider adding a comma here.
Context: ... reports, feature requests and questions Please use the [Issue Tracker](https://github....


Near line 165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...i.org/10.21105/joss.04817). Journal of Open Source Software 7 (80), 4817, 2022 - Theo...


Near line 169: ‘In Search of’ might be wordy. Consider a shorter alternative.
Context: ...: - Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016...


Near line 174: Did you mean “are” or “were”?
Context: ...d) file. ## Requirements ShakeNBreak is compatible with Python 3.9 - 3.12 and r...


Near line 174: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...akeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-sou...

ShellCheck (10)
shakenbreak/SnB_run.sh (10)

[info] 68-68: Use find instead of ls to better handle non-alphanumeric filenames.


[style] 145-145: Use { ..; } instead of (..) to avoid subshell overhead.


[style] 155-155: Consider using 'grep -c' instead of 'grep|wc -l'.


[info] 195-195: Double quote to prevent globbing and word splitting.


[info] 195-195: Double quote to prevent globbing and word splitting.


[info] 195-195: Double quote to prevent globbing and word splitting.


[info] 197-197: Double quote to prevent globbing and word splitting.


[info] 218-218: Use ./glob or -- glob so names with dashes won't become options.


[info] 222-222: Use ./glob or -- glob so names with dashes won't become options.


[info] 252-252: Double quote to prevent globbing and word splitting.

Ruff (1109)
tests/test_cli.py (696)

1-1: Missing docstring in public module


1-29: Import block is un-sorted or un-formatted


45-45: Missing docstring in public function


54-54: First line should end with a period, question mark, or exclamation point


156-156: Call endswith once with a tuple


228-231: First line should end with a period, question mark, or exclamation point


242-245: First line should end with a period, question mark, or exclamation point


268-268: Use a regular assert instead of unittest-style assertEqual


269-269: Use a regular assert instead of unittest-style assertIn


274-274: Use a regular assert instead of unittest-style assertIn


280-280: Use a regular assert instead of unittest-style assertIn


287-287: Use a regular assert instead of unittest-style assertIn


288-288: Use a regular assert instead of unittest-style assertIn


289-289: Use a regular assert instead of unittest-style assertIn


293-293: Use a regular assert instead of unittest-style assertIn


294-294: Use a regular assert instead of unittest-style assertIn


295-296: Explicitly concatenated string should be implicitly concatenated


300-300: Use a regular assert instead of unittest-style assertIn


301-301: Use a regular assert instead of unittest-style assertIn


302-303: Explicitly concatenated string should be implicitly concatenated


310-310: Use a regular assert instead of unittest-style assertTrue


314-314: Use a regular assert instead of unittest-style assertEqual


318-318: Use a regular assert instead of unittest-style assertEqual


324-324: Use a regular assert instead of unittest-style assertEqual


352-352: Use a regular assert instead of unittest-style assertEqual


353-353: Use a regular assert instead of unittest-style assertNotIn


359-359: Use a regular assert instead of unittest-style assertIn


365-365: Use a regular assert instead of unittest-style assertIn


371-371: Use a regular assert instead of unittest-style assertIn


372-372: Use a regular assert instead of unittest-style assertIn


373-373: Use a regular assert instead of unittest-style assertIn


377-377: Use a regular assert instead of unittest-style assertNotIn


378-378: Use a regular assert instead of unittest-style assertNotIn


379-380: Explicitly concatenated string should be implicitly concatenated


387-387: Use a regular assert instead of unittest-style assertIn


394-394: Use a regular assert instead of unittest-style assertIn


397-397: Use a regular assert instead of unittest-style assertTrue


398-398: Use a regular assert instead of unittest-style assertTrue


404-404: Use a regular assert instead of unittest-style assertIn


411-411: Use a regular assert instead of unittest-style assertTrue


420-420: Prefer next(...) over single element slice


422-422: Use a regular assert instead of unittest-style assertDictEqual


451-451: Use a regular assert instead of unittest-style assertEqual


452-452: Use a regular assert instead of unittest-style assertIn


453-453: Use a regular assert instead of unittest-style assertIn


454-454: Use a regular assert instead of unittest-style assertIn


458-458: Use a regular assert instead of unittest-style assertNotIn


462-462: Use a regular assert instead of unittest-style assertNotIn


465-465: Use a regular assert instead of unittest-style assertEqual


466-466: Use a regular assert instead of unittest-style assertEqual


469-469: Use a regular assert instead of unittest-style assertEqual


480-480: Use a regular assert instead of unittest-style assertDictEqual


506-506: Use a regular assert instead of unittest-style assertEqual


507-507: Use a regular assert instead of unittest-style assertIn


508-508: Use a regular assert instead of unittest-style assertIn


509-509: Use a regular assert instead of unittest-style assertIn


513-513: Use a regular assert instead of unittest-style assertNotIn


517-517: Use a regular assert instead of unittest-style assertNotIn


520-520: Use a regular assert instead of unittest-style assertEqual


521-521: Use a regular assert instead of unittest-style assertEqual


525-525: Use a regular assert instead of unittest-style assertEqual


536-536: Use a regular assert instead of unittest-style assertNotEqual


539-539: Use a regular assert instead of unittest-style assertDictEqual


570-570: Use a regular assert instead of unittest-style assertEqual


571-571: Use a regular assert instead of unittest-style assertIn


572-572: Use a regular assert instead of unittest-style assertIn


573-573: Use a regular assert instead of unittest-style assertNotIn


577-577: Use a regular assert instead of unittest-style assertNotIn


581-581: Use a regular assert instead of unittest-style assertNotIn


584-584: Use a regular assert instead of unittest-style assertEqual


585-585: Use a regular assert instead of unittest-style assertEqual


588-588: Use a regular assert instead of unittest-style assertEqual


599-599: Use a regular assert instead of unittest-style assertNotEqual


630-630: Use a regular assert instead of unittest-style assertEqual


631-631: Use a regular assert instead of unittest-style assertIn


632-632: Use a regular assert instead of unittest-style assertIn


633-633: Use a regular assert instead of unittest-style assertNotIn


637-637: Use a regular assert instead of unittest-style assertIn


641-641: Use a regular assert instead of unittest-style assertIn


644-644: Use a regular assert instead of unittest-style assertEqual


645-645: Use a regular assert instead of unittest-style assertEqual


648-648: Use a regular assert instead of unittest-style assertEqual


659-659: Use a regular assert instead of unittest-style assertNotEqual


680-680: Use a regular assert instead of unittest-style assertEqual


681-681: Use a regular assert instead of unittest-style assertNotIn


682-682: Use a regular assert instead of unittest-style assertIn


683-683: Use a regular assert instead of unittest-style assertIn


684-684: Use a regular assert instead of unittest-style assertIn


685-685: Use a regular assert instead of unittest-style assertIn


686-686: Use a regular assert instead of unittest-style assertIn


750-750: Unnecessary open mode parameters


776-776: Use a regular assert instead of unittest-style assertEqual


785-785: Use a regular assert instead of unittest-style assertTrue


786-786: Use a regular assert instead of unittest-style assertTrue


787-787: Use a regular assert instead of unittest-style assertIn


789-789: Use a regular assert instead of unittest-style assertIn


790-791: Explicitly concatenated string should be implicitly concatenated


796-796: Use a regular assert instead of unittest-style assertEqual


821-821: Use a regular assert instead of unittest-style assertEqual


824-824: Use a regular assert instead of unittest-style assertFalse


827-827: Use a regular assert instead of unittest-style assertFalse


831-831: Use a regular assert instead of unittest-style assertNotIn


832-832: Use a regular assert instead of unittest-style assertIn


833-833: Use a regular assert instead of unittest-style assertIn


834-835: Explicitly concatenated string should be implicitly concatenated


839-839: Use a regular assert instead of unittest-style assertEqual


870-870: Use a regular assert instead of unittest-style assertEqual


877-877: Use a regular assert instead of unittest-style assertFalse


881-881: Use a regular assert instead of unittest-style assertNotIn


882-882: Use a regular assert instead of unittest-style assertIn


884-884: Use a regular assert instead of unittest-style assertIn


885-886: Explicitly concatenated string should be implicitly concatenated


916-916: Use a regular assert instead of unittest-style assertEqual


919-919: Use a regular assert instead of unittest-style assertNotIn


920-920: Use a regular assert instead of unittest-style assertIn


921-921: Use a regular assert instead of unittest-style assertIn


922-922: f-string without any placeholders


922-923: Explicitly concatenated string should be implicitly concatenated


927-927: Use a regular assert instead of unittest-style assertNotIn


951-951: Use a regular assert instead of unittest-style assertEqual


954-954: Use a regular assert instead of unittest-style assertNotIn


955-955: Use a regular assert instead of unittest-style assertIn


956-956: Use a regular assert instead of unittest-style assertIn


957-958: Explicitly concatenated string should be implicitly concatenated


962-962: Use a regular assert instead of unittest-style assertNotIn


1025-1025: Unnecessary open mode parameters


1043-1043: Use a regular assert instead of unittest-style assertEqual


1044-1044: Use a regular assert instead of unittest-style assertIn


1050-1050: Use a regular assert instead of unittest-style assertIn


1056-1056: Use a regular assert instead of unittest-style assertIn


1063-1063: Use a regular assert instead of unittest-style assertIn


1064-1064: Use a regular assert instead of unittest-style assertIn


1065-1065: Use a regular assert instead of unittest-style assertIn


1069-1069: Use a regular assert instead of unittest-style assertIn


1070-1070: Use a regular assert instead of unittest-style assertIn


1071-1073: Explicitly concatenated string should be implicitly concatenated


1099-1099: Use a regular assert instead of unittest-style assertIn


1100-1100: Use a regular assert instead of unittest-style assertIn


1101-1101: Use a regular assert instead of unittest-style assertIn


1105-1105: Use a regular assert instead of unittest-style assertIn


1109-1109: Use a regular assert instead of unittest-style assertNotIn


1110-1110: Use a regular assert instead of unittest-style assertNotIn


1113-1113: Use a regular assert instead of unittest-style assertTrue


1114-1114: Use a regular assert instead of unittest-style assertFalse


1115-1115: Use a regular assert instead of unittest-style assertFalse


1132-1132: Use a regular assert instead of unittest-style assertIn


1137-1137: Use a regular assert instead of unittest-style assertIn


1141-1141: Use a regular assert instead of unittest-style assertNotIn


1142-1142: Use a regular assert instead of unittest-style assertNotIn


1145-1145: Use a regular assert instead of unittest-style assertTrue


1146-1146: Use a regular assert instead of unittest-style assertFalse


1147-1147: Use a regular assert instead of unittest-style assertFalse


1185-1185: Use a regular assert instead of unittest-style assertEqual


1189-1189: Use a regular assert instead of unittest-style assertEqual


1193-1193: Use a regular assert instead of unittest-style assertEqual


1224-1224: Use a regular assert instead of unittest-style assertEqual


1225-1225: Use a regular assert instead of unittest-style assertNotIn


1226-1226: Use a regular assert instead of unittest-style assertNotIn


1227-1227: Use a regular assert instead of unittest-style assertIn


1234-1234: Use a regular assert instead of unittest-style assertIn


1235-1235: Use a regular assert instead of unittest-style assertIn


1236-1236: Use a regular assert instead of unittest-style assertIn


1243-1243: Use a regular assert instead of unittest-style assertNotEqual


1277-1277: Use a regular assert instead of unittest-style assertEqual


1278-1278: Use a regular assert instead of unittest-style assertNotIn


1279-1279: Use a regular assert instead of unittest-style assertIn


1280-1280: Use a regular assert instead of unittest-style assertIn


1285-1285: Use a regular assert instead of unittest-style assertIn


1286-1286: Use a regular assert instead of unittest-style assertIn


1287-1287: Use a regular assert instead of unittest-style assertIn


1336-1336: Unnecessary open mode parameters


1365-1365: Use a regular assert instead of unittest-style assertEqual


1366-1366: Use a regular assert instead of unittest-style assertNotIn


1367-1367: Use a regular assert instead of unittest-style assertIn


1368-1368: Use a regular assert instead of unittest-style assertIn


1373-1373: Use a regular assert instead of unittest-style assertIn


1374-1374: Use a regular assert instead of unittest-style assertIn


1375-1375: Use a regular assert instead of unittest-style assertIn


1381-1381: Use a regular assert instead of unittest-style assertTrue


1382-1382: Use a regular assert instead of unittest-style assertTrue


1386-1386: Use a regular assert instead of unittest-style assertEqual


1390-1390: Use a regular assert instead of unittest-style assertEqual


1417-1417: Use a regular assert instead of unittest-style assertEqual


1418-1418: Use a regular assert instead of unittest-style assertIn


1422-1422: Use a regular assert instead of unittest-style assertIn


1426-1426: Use a regular assert instead of unittest-style assertIn


1430-1430: Use a regular assert instead of unittest-style assertNotIn


1431-1431: Use a regular assert instead of unittest-style assertNotIn


1432-1432: Use a regular assert instead of unittest-style assertTrue


1433-1433: Use a regular assert instead of unittest-style assertTrue


1434-1434: Use a regular assert instead of unittest-style assertTrue


1435-1435: Use a regular assert instead of unittest-style assertTrue


1436-1436: Use a regular assert instead of unittest-style assertTrue


1437-1437: Use a regular assert instead of unittest-style assertFalse


1465-1465: Use a regular assert instead of unittest-style assertEqual


1466-1466: Use a regular assert instead of unittest-style assertIn


1467-1467: Use a regular assert instead of unittest-style assertNotIn


1477-1477: Use a regular assert instead of unittest-style assertEqual


1481-1481: Use a regular assert instead of unittest-style assertEqual


1485-1485: Use a regular assert instead of unittest-style assertEqual


1517-1517: Use a regular assert instead of unittest-style assertEqual


1518-1518: Use a regular assert instead of unittest-style assertIn


1519-1519: Use a regular assert instead of unittest-style assertNotIn


1520-1520: Use a regular assert instead of unittest-style assertEqual


1521-1521: Use a regular assert instead of unittest-style assertEqual


1568-1568: Use a regular assert instead of unittest-style assertEqual


1569-1569: Use a regular assert instead of unittest-style assertIn


1570-1570: Use a regular assert instead of unittest-style assertIn


1571-1571: Use a regular assert instead of unittest-style assertIn


1576-1576: Use a regular assert instead of unittest-style assertIn


1577-1577: Use a regular assert instead of unittest-style assertIn


1579-1579: Use a regular assert instead of unittest-style assertIn


1583-1583: Use a regular assert instead of unittest-style assertIn


1587-1587: Use a regular assert instead of unittest-style assertIn


1588-1588: Use a regular assert instead of unittest-style assertIn


1589-1590: Explicitly concatenated string should be implicitly concatenated


1594-1594: Use a regular assert instead of unittest-style assertIn


1598-1598: Use a regular assert instead of unittest-style assertIn


1599-1599: Use a regular assert instead of unittest-style assertIn


1600-1601: Explicitly concatenated string should be implicitly concatenated


1605-1605: Use a regular assert instead of unittest-style assertIn


1609-1609: Use a regular assert instead of unittest-style assertIn


1610-1610: Use a regular assert instead of unittest-style assertIn


1611-1612: Explicitly concatenated string should be implicitly concatenated


1612-1612: Line too long (114 > 107)


1613-1613: Line too long (117 > 107)


1616-1616: Use a regular assert instead of unittest-style assertNotIn


1619-1621: Consider [1, *list(range(-1, 2))] instead of concatenation


1623-1623: Use a regular assert instead of unittest-style assertTrue


1630-1630: Use a regular assert instead of unittest-style assertTrue


1632-1632: Use a regular assert instead of unittest-style assertEqual


1637-1637: Use a regular assert instead of unittest-style assertEqual


1695-1695: Use a regular assert instead of unittest-style assertEqual


1696-1696: Use a regular assert instead of unittest-style assertIn


1697-1697: Use a regular assert instead of unittest-style assertIn


1700-1700: Use a regular assert instead of unittest-style assertNotIn


1704-1704: Use a regular assert instead of unittest-style assertIn


1708-1708: Use a regular assert instead of unittest-style assertIn


1709-1709: Use a regular assert instead of unittest-style assertIn


1710-1711: Explicitly concatenated string should be implicitly concatenated


1716-1716: Use a regular assert instead of unittest-style assertTrue


1717-1717: Use a regular assert instead of unittest-style assertFalse


1719-1719: Use a regular assert instead of unittest-style assertEqual


1763-1763: Use a regular assert instead of unittest-style assertEqual


1764-1764: Use a regular assert instead of unittest-style assertIn


1765-1765: Use a regular assert instead of unittest-style assertIn


1768-1768: Use a regular assert instead of unittest-style assertNotIn


1772-1772: Use a regular assert instead of unittest-style assertIn


1776-1776: Use a regular assert instead of unittest-style assertIn


1777-1777: Use a regular assert instead of unittest-style assertIn


1778-1779: Explicitly concatenated string should be implicitly concatenated


1784-1784: Use a regular assert instead of unittest-style assertTrue


1785-1785: Use a regular assert instead of unittest-style assertFalse


1787-1787: Use a regular assert instead of unittest-style assertEqual


1831-1831: Use a regular assert instead of unittest-style assertEqual


1832-1832: Use a regular assert instead of unittest-style assertIn


1833-1833: Use a regular assert instead of unittest-style assertIn


1834-1834: Use a regular assert instead of unittest-style assertEqual


1835-1835: Use a regular assert instead of unittest-style assertEqual


1840-1840: Use a regular assert instead of unittest-style assertIn


1846-1846: Use a regular assert instead of unittest-style assertIn


1850-1850: Use a regular assert instead of unittest-style assertIn


1851-1851: Use a regular assert instead of unittest-style assertIn


1852-1853: Explicitly concatenated string should be implicitly concatenated


1858-1858: Use a regular assert instead of unittest-style assertTrue


1870-1876: f-string without any placeholders


1895-1895: Use a regular assert instead of unittest-style assertEqual


1896-1896: Use a regular assert instead of unittest-style assertIn


1897-1897: Use a regular assert instead of unittest-style assertIn


1898-1898: Use a regular assert instead of unittest-style assertEqual


1899-1899: Use a regular assert instead of unittest-style assertEqual


1904-1904: Use a regular assert instead of unittest-style assertIn


1909-1909: Use a regular assert instead of unittest-style assertIn


1910-1910: f-string without any placeholders


1914-1914: Use a regular assert instead of unittest-style assertIn


1915-1915: f-string without any placeholders


1918-1918: Use a regular assert instead of unittest-style assertIn


1919-1919: Use a regular assert instead of unittest-style assertIn


1920-1921: Explicitly concatenated string should be implicitly concatenated


1926-1926: Use a regular assert instead of unittest-style assertTrue


1927-1927: Use a regular assert instead of unittest-style assertTrue


1951-1951: Use a regular assert instead of unittest-style assertIn


1957-1957: Use a regular assert instead of unittest-style assertIn


1961-1961: Use a regular assert instead of unittest-style assertNotIn


1962-1962: Use a regular assert instead of unittest-style assertNotIn


1965-1965: Use a regular assert instead of unittest-style assertTrue


1966-1966: Use a regular assert instead of unittest-style assertFalse


1967-1967: Use a regular assert instead of unittest-style assertFalse


1970-1970: First line should end with a period, question mark, or exclamation point


1977-1977: Use a regular assert instead of unittest-style assertIn


1982-1982: Use a regular assert instead of unittest-style assertIn


1983-1983: Use a regular assert instead of unittest-style assertIn


1984-1984: Use a regular assert instead of unittest-style assertNotIn


1996-1996: Use a regular assert instead of unittest-style assertNotIn


2001-2001: Use a regular assert instead of unittest-style assertIn


2002-2002: Use a regular assert instead of unittest-style assertIn


2003-2003: Use a regular assert instead of unittest-style assertNotIn


2006-2006: Use a regular assert instead of unittest-style assertIn


2007-2007: Use a regular assert instead of unittest-style assertIn


2008-2008: Use a regular assert instead of unittest-style assertTrue


2022-2022: Use a regular assert instead of unittest-style assertNotIn


2027-2027: Use a regular assert instead of unittest-style assertIn


2028-2028: Use a regular assert instead of unittest-style assertIn


2029-2029: Use a regular assert instead of unittest-style assertNotIn


2032-2032: Use a regular assert instead of unittest-style assertIn


2033-2033: Use a regular assert instead of unittest-style assertIn


2034-2034: Use a regular assert instead of unittest-style assertTrue


2054-2054: Use a regular assert instead of unittest-style assertIn


2062-2062: Use a regular assert instead of unittest-style assertEqual


2073-2073: Use a regular assert instead of unittest-style assertIn


2081-2081: Use a regular assert instead of unittest-style assertEqual


2092-2092: Use a regular assert instead of unittest-style assertIn


2100-2100: Use a regular assert instead of unittest-style assertEqual


2101-2101: Use a regular assert instead of unittest-style assertEqual


2102-2102: Use a regular assert instead of unittest-style assertEqual


2103-2103: Use a regular assert instead of unittest-style assertEqual


2122-2122: Use a regular assert instead of unittest-style assertIn


2123-2123: Use a regular assert instead of unittest-style assertIn


2126-2126: Use a regular assert instead of unittest-style assertIn


2127-2127: Use a regular assert instead of unittest-style assertIn


2128-2128: Use a regular assert instead of unittest-style assertIn


2131-2131: Use a regular assert instead of unittest-style assertIn


2134-2134: Use a regular assert instead of unittest-style assertIn


2137-2137: Use a regular assert instead of unittest-style assertFalse


2140-2140: Use a regular assert instead of unittest-style assertTrue


2141-2141: Use a regular assert instead of unittest-style assertFalse


2177-2177: Use a regular assert instead of unittest-style assertIn


2183-2183: Use a regular assert instead of unittest-style assertIn


2214-2214: Use a regular assert instead of unittest-style assertIn


2215-2215: Use a regular assert instead of unittest-style assertIn


2216-2216: Use a regular assert instead of unittest-style assertNotIn


2217-2217: Use a regular assert instead of unittest-style assertNotIn


2218-2218: Use a regular assert instead of unittest-style assertNotIn


2219-2219: Use a regular assert instead of unittest-style assertIn


2224-2224: Use a regular assert instead of unittest-style assertFalse


2225-2225: Use a regular assert instead of unittest-style assertTrue


2236-2236: Use a regular assert instead of unittest-style assertIn


2237-2237: Use a regular assert instead of unittest-style assertIn


2238-2238: Use a regular assert instead of unittest-style assertNotIn


2239-2239: Use a regular assert instead of unittest-style assertNotIn


2240-2240: Use a regular assert instead of unittest-style assertNotIn


2241-2241: Use a regular assert instead of unittest-style assertNotIn


2246-2246: Use a regular assert instead of unittest-style assertFalse


2247-2247: Use a regular assert instead of unittest-style assertFalse


2248-2248: Use a regular assert instead of unittest-style assertTrue


2277-2277: Use a regular assert instead of unittest-style assertIn


2278-2278: Use a regular assert instead of unittest-style assertIn


2279-2279: Use a regular assert instead of unittest-style assertNotIn


2280-2280: Use a regular assert instead of unittest-style assertIn


2281-2281: Use a regular assert instead of unittest-style assertIn


2282-2282: Use a regular assert instead of unittest-style assertNotIn


2287-2287: Use a regular assert instead of unittest-style assertFalse


2288-2288: Use a regular assert instead of unittest-style assertTrue


2289-2289: Use a regular assert instead of unittest-style assertIn


2297-2297: Use a regular assert instead of unittest-style assertEqual


2298-2298: Use a regular assert instead of unittest-style assertEqual


2299-2299: Use a regular assert instead of unittest-style assertEqual


2325-2325: Use a regular assert instead of unittest-style assertIn


2326-2326: Use a regular assert instead of unittest-style assertIn


2327-2327: Use a regular assert instead of unittest-style assertNotIn


2328-2328: Use a regular assert instead of unittest-style assertNotIn


2329-2329: Use a regular assert instead of unittest-style assertNotIn


2332-2332: Use a regular assert instead of unittest-style assertIn


2337-2337: Use a regular assert instead of unittest-style assertFalse


2338-2338: Use a regular assert instead of unittest-style assertTrue


2370-2370: Use a regular assert instead of unittest-style assertIn


2371-2371: Use a regular assert instead of unittest-style assertIn


2372-2372: Use a regular assert instead of unittest-style assertNotIn


2373-2373: Use a regular assert instead of unittest-style assertNotIn


2376-2376: Use a regular assert instead of unittest-style assertNotIn


2377-2377: Use a regular assert instead of unittest-style assertNotIn


2382-2382: Use a regular assert instead of unittest-style assertIn


2387-2387: Use a regular assert instead of unittest-style assertFalse


2388-2388: Use a regular assert instead of unittest-style assertTrue


2389-2389: Use a regular assert instead of unittest-style assertNotIn


2394-2394: Use a regular assert instead of unittest-style assertEqual


2423-2423: Use a regular assert instead of unittest-style assertIn


2424-2424: Use a regular assert instead of unittest-style assertIn


2425-2425: Use a regular assert instead of unittest-style assertNotIn


2426-2426: Use a regular assert instead of unittest-style assertNotIn


2429-2429: Use a regular assert instead of unittest-style assertNotIn


2430-2430: Use a regular assert instead of unittest-style assertNotIn


2435-2435: Use a regular assert instead of unittest-style assertIn


2440-2440: Use a regular assert instead of unittest-style assertFalse


2441-2441: Use a regular assert instead of unittest-style assertTrue


2442-2442: Use a regular assert instead of unittest-style assertNotIn


2447-2447: Use a regular assert instead of unittest-style assertEqual


2465-2465: Use a regular assert instead of unittest-style assertNotIn


2478-2478: Use a regular assert instead of unittest-style assertNotIn


2512-2512: Use a regular assert instead of unittest-style assertIn


2513-2513: Use a regular assert instead of unittest-style assertNotIn


2514-2514: Use a regular assert instead of unittest-style assertNotIn


2515-2515: Use a regular assert instead of unittest-style assertIn


2516-2516: Use a regular assert instead of unittest-style assertIn


2519-2519: Use a regular assert instead of unittest-style assertIn


2525-2525: Use a regular assert instead of unittest-style assertIn


2529-2529: Use a regular assert instead of unittest-style assertTrue


2553-2553: Use a regular assert instead of unittest-style assertIn


2554-2554: Use a regular assert instead of unittest-style assertNotIn


2555-2555: Use a regular assert instead of unittest-style assertIn


2556-2556: Line too long (119 > 107)


2559-2559: Use a regular assert instead of unittest-style assertIn


2560-2560: Line too long (120 > 107)


2563-2563: Use a regular assert instead of unittest-style assertIn


2564-2564: Use a regular assert instead of unittest-style assertIn


2565-2565: Use a regular assert instead of unittest-style assertNotIn


2568-2568: Use a regular assert instead of unittest-style assertTrue


2596-2596: Use a regular assert instead of unittest-style assertIn


2597-2597: Use a regular assert instead of unittest-style assertNotIn


2598-2598: Use a regular assert instead of unittest-style assertNotIn


2599-2599: Use a regular assert instead of unittest-style assertIn


2600-2600: Use a regular assert instead of unittest-style assertIn


2601-2601: Use a regular assert instead of unittest-style assertNotIn


2604-2604: Use a regular assert instead of unittest-style assertTrue


2638-2638: Use a regular assert instead of unittest-style assertIn


2639-2639: Use a regular assert instead of unittest-style assertIn


2640-2640: Use a regular assert instead of unittest-style assertNotIn


2641-2641: Use a regular assert instead of unittest-style assertIn


2642-2642: Use a regular assert instead of unittest-style assertIn


2643-2643: Use a regular assert instead of unittest-style assertFalse


2644-2644: Use a regular assert instead of unittest-style assertTrue


2645-2645: Use a regular assert instead of unittest-style assertIn


2650-2650: Use a regular assert instead of unittest-style assertIn


2653-2653: Use a regular assert instead of unittest-style assertIn


2653-2653: Use context handler for opening files


2656-2656: Use a regular assert instead of unittest-style assertEqual


2657-2657: Use a regular assert instead of unittest-style assertEqual


2658-2658: Use a regular assert instead of unittest-style assertEqual


2659-2659: Use a regular assert instead of unittest-style assertEqual


2677-2677: Use a regular assert instead of unittest-style assertNotIn


2681-2681: Use a regular assert instead of unittest-style assertIn


2681-2681: Use context handler for opening files


2698-2698: Unnecessary open mode parameters


2716-2716: Use a regular assert instead of unittest-style assertIn


2717-2717: Use a regular assert instead of unittest-style assertIn


2718-2718: Unnecessary open mode parameters


2718-2718: f-string without any placeholders


2720-2720: Use a regular assert instead of unittest-style assertIn


2723-2723: Use a regular assert instead of unittest-style assertEqual


2723-2723: f-string without any placeholders


2725-2725: Unnecessary open mode parameters


2725-2725: f-string without any placeholders


2727-2727: Use a regular assert instead of unittest-style assertIn


2728-2728: Use a regular assert instead of unittest-style assertEqual


2748-2748: Use a regular assert instead of unittest-style assertIn


2749-2749: Use a regular assert instead of unittest-style assertNotIn


2750-2750: Use a regular assert instead of unittest-style assertIn


2751-2751: Use a regular assert instead of unittest-style assertIn


2752-2752: Use a regular assert instead of unittest-style assertIn


2756-2756: Unnecessary open mode parameters


2756-2756: f-string without any placeholders


2758-2758: Use a regular assert instead of unittest-style assertIn


2761-2761: Use a regular assert instead of unittest-style assertEqual


2763-2763: Unnecessary open mode parameters


2763-2763: f-string without any placeholders


2765-2765: Use a regular assert instead of unittest-style assertIn


2769-2769: Use a regular assert instead of unittest-style assertEqual


2769-2769: f-string without any placeholders


2773-2773: Use a regular assert instead of unittest-style assertEqual


2774-2774: Use a regular assert instead of unittest-style assertEqual


2775-2775: Prefer next(i for i in saved_files if "INCAR" in i) over single element slice


2776-2776: Unnecessary open mode parameters


2778-2778: Use a regular assert instead of unittest-style assertIn


2781-2781: Use a regular assert instead of unittest-style assertEqual


2782-2782: Use a regular assert instead of unittest-style assertEqual


2787-2787: f-string without any placeholders


2803-2803: Use a regular assert instead of unittest-style assertIn


2804-2804: Use a regular assert instead of unittest-style assertNotIn


2805-2805: Unnecessary open mode parameters


2805-2805: f-string without any placeholders


2807-2807: Use a regular assert instead of unittest-style assertIn


2810-2810: Use a regular assert instead of unittest-style assertEqual


2810-2810: f-string without any placeholders


2812-2812: Unnecessary open mode parameters


2812-2812: f-string without any placeholders


2814-2814: Use a regular assert instead of unittest-style assertIn


2815-2815: Use a regular assert instead of unittest-style assertEqual


2816-2816: f-string without any placeholders


2842-2842: Use a regular assert instead of unittest-style assertIn


2847-2847: Use a regular assert instead of unittest-style assertNotIn


2859-2859: Use a regular assert instead of unittest-style assertEqual


2887-2887: Use a regular assert instead of unittest-style assertEqual


2888-2888: Use a regular assert instead of unittest-style assertEqual


2892-2892: Use a regular assert instead of unittest-style assertTrue


2898-2898: Use a regular assert instead of unittest-style assertEqual


2923-2923: Use a regular assert instead of unittest-style assertTrue


2928-2928: Use a regular assert instead of unittest-style assertTrue


2945-2945: Use a regular assert instead of unittest-style assertTrue


2967-2967: Use a regular assert instead of unittest-style assertTrue


2967-2967: Unnecessary list comprehension


2968-2968: Use a regular assert instead of unittest-style assertTrue


2970-2975: Unnecessary list comprehension


2978-2978: Use a regular assert instead of unittest-style assertTrue


3004-3004: Use a regular assert instead of unittest-style assertTrue


3017-3017: Use a regular assert instead of unittest-style assertTrue


3017-3017: Unnecessary list comprehension


3018-3018: Use a regular assert instead of unittest-style assertTrue


3025-3025: Use a regular assert instead of unittest-style assertFalse


3034-3034: Use a regular assert instead of unittest-style assertTrue


3034-3034: Unnecessary list comprehension


3035-3035: Use a regular assert instead of unittest-style assertTrue


3037-3044: Unnecessary list comprehension


3047-3047: Use a regular assert instead of unittest-style assertFalse


3070-3070: Use a regular assert instead of unittest-style assertEqual


3086-3089: Unnecessary open mode parameters


3111-3111: Use a regular assert instead of unittest-style assertNotEqual


3118-3118: Use a regular assert instead of unittest-style assertEqual


3122-3122: Use a regular assert instead of unittest-style assertIn


3169-3169: Use a regular assert instead of unittest-style assertNotEqual


3176-3176: Use a regular assert instead of unittest-style assertEqual


3180-3180: Use a regular assert instead of unittest-style assertNotIn


3222-3222: Use a regular assert instead of unittest-style assertEqual


3226-3226: Use a regular assert instead of unittest-style assertIn


3229-3229: Use a regular assert instead of unittest-style assertTrue


3230-3230: Use a regular assert instead of unittest-style assertTrue


3232-3246: Unnecessary list comprehension


3283-3283: Use a regular assert instead of unittest-style assertEqual


3285-3285: Use a regular assert instead of unittest-style assertIn


3288-3288: Use a regular assert instead of unittest-style assertTrue


3319-3319: Use a regular assert instead of unittest-style assertEqual


3321-3321: Use a regular assert instead of unittest-style assertIn


3324-3324: Use a regular assert instead of unittest-style assertTrue


3326-3336: Unnecessary list comprehension


3368-3368: Use a regular assert instead of unittest-style assertTrue


3372-3372: Use a regular assert instead of unittest-style assertNotIn


3373-3373: Use a regular assert instead of unittest-style assertTrue


3374-3374: Use a regular assert instead of unittest-style assertTrue


3376-3385: Unnecessary list comprehension


3410-3410: Use a regular assert instead of unittest-style assertTrue


3413-3415: Unnecessary open mode parameters


3415-3415: Unnecessary open mode parameters


3418-3418: Use a regular assert instead of unittest-style assertDictEqual


3436-3436: Use a regular assert instead of unittest-style assertTrue


3439-3441: Unnecessary open mode parameters


3441-3441: Unnecessary open mode parameters


3444-3444: Use a regular assert instead of unittest-style assertDictEqual


3462-3462: Use a regular assert instead of unittest-style assertTrue


3465-3467: Unnecessary open mode parameters


3467-3467: Unnecessary open mode parameters


3470-3470: Use a regular assert instead of unittest-style assertDictEqual


3475-3475: Local variable result is assigned to but never used


3488-3488: Use a regular assert instead of unittest-style assertTrue


3491-3493: Unnecessary open mode parameters


3493-3493: Unnecessary open mode parameters


3496-3496: Use a regular assert instead of unittest-style assertDictEqual


3500-3500: Use triple double quotes """


3500-3500: First line should end with a period, question mark, or exclamation point


3516-3516: Use a regular assert instead of unittest-style assertIn


3517-3517: Use a regular assert instead of unittest-style assertIn


3524-3525: Explicitly concatenated string should be implicitly concatenated


3529-3529: Use a regular assert instead of unittest-style assertEqual


3557-3557: Use a regular assert instead of unittest-style assertTrue


3562-3562: Use a regular assert instead of unittest-style assertTrue


3579-3579: Use a regular assert instead of unittest-style assertIn


3611-3611: Use a regular assert instead of unittest-style assertIn


3612-3612: Use a regular assert instead of unittest-style assertIn


3621-3622: Explicitly concatenated string should be implicitly concatenated


3626-3626: Use a regular assert instead of unittest-style assertEqual


3641-3641: Use a regular assert instead of unittest-style assertTrue


3641-3641: Unnecessary list comprehension


3642-3642: Use a regular assert instead of unittest-style assertTrue


3644-3648: Unnecessary list comprehension


3651-3651: Use a regular assert instead of unittest-style assertIn


3652-3652: Use a regular assert instead of unittest-style assertIn


3656-3656: Use a regular assert instead of unittest-style assertTrue


3657-3657: Use a regular assert instead of unittest-style assertTrue


3674-3674: Use a regular assert instead of unittest-style assertTrue


3674-3674: Unnecessary list comprehension


3675-3675: Use a regular assert instead of unittest-style assertTrue


3677-3682: Unnecessary list comprehension


3685-3685: Use a regular assert instead of unittest-style assertIn


3686-3686: Use a regular assert instead of unittest-style assertIn


3690-3690: Use a regular assert instead of unittest-style assertTrue


3691-3691: Use a regular assert instead of unittest-style assertTrue


3699-3699: Use a regular assert instead of unittest-style assertIn


3706-3706: Use a regular assert instead of unittest-style assertNotIn


3707-3707: Use a regular assert instead of unittest-style assertFalse


3711-3711: Call endswith once with a tuple


3717-3717: First line should end with a period, question mark, or exclamation point


3744-3744: Use a regular assert instead of unittest-style assertIn


3749-3749: Use a regular assert instead of unittest-style assertIn


3752-3752: Use a regular assert instead of unittest-style assertEqual


3753-3753: Use a regular assert instead of unittest-style assertEqual


3759-3759: Use a regular assert instead of unittest-style assertTrue


3788-3788: Use a regular assert instead of unittest-style assertIn


3793-3793: Use a regular assert instead of unittest-style assertIn


3794-3794: Use a regular assert instead of unittest-style assertEqual


3795-3795: Use a regular assert instead of unittest-style assertEqual


3801-3801: Use a regular assert instead of unittest-style assertTrue


3851-3851: Use a regular assert instead of unittest-style assertTrue


3858-3858: Use a regular assert instead of unittest-style assertTrue


3861-3861: Use a regular assert instead of unittest-style assertTrue


3866-3866: Use a regular assert instead of unittest-style assertNotIn


3891-3891: Use a regular assert instead of unittest-style assertNotIn


3896-3896: Use a regular assert instead of unittest-style assertNotIn


3899-3899: Use a regular assert instead of unittest-style assertTrue


3902-3902: Use a regular assert instead of unittest-style assertFalse


3903-3903: Unnecessary list comprehension


3905-3905: Use a regular assert instead of unittest-style assertTrue


3906-3906: Use a regular assert instead of unittest-style assertTrue


3938-3938: Use a regular assert instead of unittest-style assertIn


3943-3943: Use a regular assert instead of unittest-style assertIn


3944-3944: Use a regular assert instead of unittest-style assertTrue


3947-3947: Use a regular assert instead of unittest-style assertTrue


3949-3957: Unnecessary list comprehension


3960-3960: Use a regular assert instead of unittest-style assertTrue


3966-3966: Use a regular assert instead of unittest-style assertTrue


3995-3995: Use a regular assert instead of unittest-style assertTrue


3998-3998: Use a regular assert instead of unittest-style assertTrue


4019-4019: Use a regular assert instead of unittest-style assertTrue


4019-4019: Unnecessary list comprehension


4020-4020: Use a regular assert instead of unittest-style assertTrue


4022-4027: Unnecessary list comprehension


4030-4030: Use a regular assert instead of unittest-style assertIn


4035-4035: Use a regular assert instead of unittest-style assertIn


4036-4036: Use a regular assert instead of unittest-style assertTrue


4038-4045: Unnecessary list comprehension


4048-4048: Use a regular assert instead of unittest-style assertTrue


4049-4049: Use a regular assert instead of unittest-style assertTrue


4056-4056: Use a regular assert instead of unittest-style assertIn


4063-4063: Use a regular assert instead of unittest-style assertNotIn


4063-4063: f-string without any placeholders


4064-4064: Use a regular assert instead of unittest-style assertFalse


4085-4085: Use a regular assert instead of unittest-style assertTrue


4088-4088: Use a regular assert instead of unittest-style assertFalse


4091-4091: Use a regular assert instead of unittest-style assertFalse


4101-4101: First line should end with a period, question mark, or exclamation point


4118-4118: Use a regular assert instead of unittest-style assertEqual


4129-4129: Use a regular assert instead of unittest-style assertIn


4133-4133: Use a regular assert instead of unittest-style assertIn


4137-4137: Use a regular assert instead of unittest-style assertIn


4142-4142: Use a regular assert instead of unittest-style assertIn


4147-4147: Use a regular assert instead of unittest-style assertIn


4152-4152: Use a regular assert instead of unittest-style assertIn


4157-4157: Use a regular assert instead of unittest-style assertIn


4163-4163: Use a regular assert instead of unittest-style assertNotIn


4169-4169: Use a regular assert instead of unittest-style assertIn


4170-4170: Use a regular assert instead of unittest-style assertIn


4175-4175: Use a regular assert instead of unittest-style assertIn


4211-4211: Use a regular assert instead of unittest-style assertEqual


4229-4229: Use a regular assert instead of unittest-style assertIn


4233-4233: Use a regular assert instead of unittest-style assertIn


4237-4237: Use a regular assert instead of unittest-style assertIn


4242-4242: Use a regular assert instead of unittest-style assertFalse


4254-4254: Use a regular assert instead of unittest-style assertIn


4260-4260: Use a regular assert instead of unittest-style assertEqual


4264-4264: First line should end with a period, question mark, or exclamation point


4277-4277: Use a regular assert instead of unittest-style assertTrue


4280-4280: Use a regular assert instead of unittest-style assertIn


4288-4288: Use a regular assert instead of unittest-style assertEqual


4306-4306: Use a regular assert instead of unittest-style assertTrue


4311-4311: Use a regular assert instead of unittest-style assertIn


4319-4319: Use a regular assert instead of unittest-style assertEqual


4335-4335: Use a regular assert instead of unittest-style assertFalse


4338-4338: Use a regular assert instead of unittest-style assertIsInstance


4339-4339: Use a regular assert instead of unittest-style assertIn


4348-4348: Use a regular assert instead of unittest-style assertTrue


4349-4349: Use a regular assert instead of unittest-style assertIn


4357-4357: Use a regular assert instead of unittest-style assertEqual


4371-4371: Use a regular assert instead of unittest-style assertTrue


4371-4371: Unnecessary list comprehension


4372-4372: Use a regular assert instead of unittest-style assertTrue


4374-4379: Unnecessary list comprehension


4382-4382: Use a regular assert instead of unittest-style assertTrue


4383-4383: Use a regular assert instead of unittest-style assertIn


4391-4391: Use a regular assert instead of unittest-style assertEqual


4401-4401: Use a regular assert instead of unittest-style assertIsInstance


4402-4402: Use a regular assert instead of unittest-style assertIn


4413-4413: f-string without any placeholders


4417-4417: f-string without any placeholders


4432-4432: Use a regular assert instead of unittest-style assertTrue


4438-4438: Use a regular assert instead of unittest-style assertEqual


4440-4440: Use a regular assert instead of unittest-style assertFalse


4452-4452: Use a regular assert instead of unittest-style assertTrue


4455-4455: Use a regular assert instead of unittest-style assertIn


4466-4466: Use a regular assert instead of unittest-style assertEqual


4482-4482: Use a regular assert instead of unittest-style assertTrue


4485-4485: Use a regular assert instead of unittest-style assertFalse


4492-4492: Use a regular assert instead of unittest-style assertEqual


4508-4508: Use a regular assert instead of unittest-style assertTrue


4509-4509: Use a regular assert instead of unittest-style assertIn


4518-4518: Use a regular assert instead of unittest-style assertEqual


4541-4541: Use a regular assert instead of unittest-style assertTrue


4541-4541: f-string without any placeholders


4542-4542: f-string without any placeholders


4543-4543: f-string without any placeholders


4544-4544: Use a regular assert instead of unittest-style assertEqual


4548-4548: First line should end with a period, question mark, or exclamation point


4555-4555: Use a regular assert instead of unittest-style assertIn


4556-4556: Use a regular assert instead of unittest-style assertEqual


4561-4561: Use a regular assert instead of unittest-style assertIn


4562-4562: Use a regular assert instead of unittest-style assertEqual


4566-4566: Use a regular assert instead of unittest-style assertFalse


4567-4567: Use a regular assert instead of unittest-style assertEqual


4573-4573: Use a regular assert instead of unittest-style assertIn


4574-4574: Use a regular assert instead of unittest-style assertEqual

tests/test_input.py (413)

1-1: Missing docstring in public module


1-30: Import block is un-sorted or un-formatted


30-30: Missing docstring in public function


54-54: Missing blank line before section ("Args")


74-74: Do not perform function call DummySpecies in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable


81-85: Prefer next(...) over single element slice


102-102: First line should end with a period, question mark, or exclamation point


166-166: Avoid quadratic list summation


167-169: Avoid quadratic list summation


466-466: Call endswith once with a tuple


480-480: Use a regular assert instead of unittest-style assertEqual


484-484: Use a regular assert instead of unittest-style assertEqual


487-487: Use a regular assert instead of unittest-style assertEqual


488-488: Use a regular assert instead of unittest-style assertEqual


489-489: Use a regular assert instead of unittest-style assertEqual


490-490: Use a regular assert instead of unittest-style assertEqual


491-491: Use a regular assert instead of unittest-style assertEqual


492-492: Use a regular assert instead of unittest-style assertEqual


493-493: Use a regular assert instead of unittest-style assertEqual


494-494: Use a regular assert instead of unittest-style assertEqual


495-495: Use a regular assert instead of unittest-style assertEqual


496-496: Use a regular assert instead of unittest-style assertEqual


497-497: Use a regular assert instead of unittest-style assertEqual


498-498: Use a regular assert instead of unittest-style assertEqual


499-499: Use a regular assert instead of unittest-style assertEqual


500-500: Use a regular assert instead of unittest-style assertEqual


501-501: Use a regular assert instead of unittest-style assertEqual


502-502: Use a regular assert instead of unittest-style assertEqual


503-503: Use a regular assert instead of unittest-style assertEqual


504-504: Use a regular assert instead of unittest-style assertEqual


507-507: Use a regular assert instead of unittest-style assertEqual


508-508: Use a regular assert instead of unittest-style assertEqual


509-509: Use a regular assert instead of unittest-style assertEqual


510-510: Use a regular assert instead of unittest-style assertEqual


511-511: Use a regular assert instead of unittest-style assertEqual


512-512: Use a regular assert instead of unittest-style assertEqual


526-526: Use a regular assert instead of unittest-style assertEqual


530-530: First line should end with a period, question mark, or exclamation point


554-554: Use a regular assert instead of unittest-style assertEqual


573-573: First line should end with a period, question mark, or exclamation point


574-574: Use a regular assert instead of unittest-style assertEqual


575-575: Use a regular assert instead of unittest-style assertEqual


576-576: Use a regular assert instead of unittest-style assertEqual


577-577: Use a regular assert instead of unittest-style assertEqual


578-578: Use a regular assert instead of unittest-style assertEqual


579-579: Use a regular assert instead of unittest-style assertEqual


580-580: Use a regular assert instead of unittest-style assertEqual


581-581: Use a regular assert instead of unittest-style assertEqual


582-582: Use a regular assert instead of unittest-style assertEqual


585-585: First line should end with a period, question mark, or exclamation point


617-617: Use a regular assert instead of unittest-style assertNotEqual


629-629: Use a regular assert instead of unittest-style assertEqual


635-635: First line should end with a period, question mark, or exclamation point


675-675: Use a regular assert instead of unittest-style assertEqual


679-679: Use a regular assert instead of unittest-style assertDictEqual


683-683: First line should end with a period, question mark, or exclamation point


700-700: Use a regular assert instead of unittest-style assertEqual


704-704: Use a regular assert instead of unittest-style assertEqual


707-707: Use a regular assert instead of unittest-style assertEqual


708-708: Use a regular assert instead of unittest-style assertEqual


709-709: Use a regular assert instead of unittest-style assertEqual


710-710: Use a regular assert instead of unittest-style assertCountEqual


727-727: f-string without any placeholders


727-728: Explicitly concatenated string should be implicitly concatenated


757-757: Use a regular assert instead of unittest-style assertEqual


761-761: Use a regular assert instead of unittest-style assertEqual


764-764: Use a regular assert instead of unittest-style assertEqual


765-765: Use a regular assert instead of unittest-style assertEqual


772-773: Multi-line docstring closing quotes should be on a separate line


772-773: First line should end with a period, question mark, or exclamation point


813-813: Use a regular assert instead of unittest-style assertEqual


819-819: First line should end with a period, question mark, or exclamation point


828-828: Use a regular assert instead of unittest-style assertEqual


834-834: Use a regular assert instead of unittest-style assertNotEqual


835-835: Use a regular assert instead of unittest-style assertEqual


849-849: Use a regular assert instead of unittest-style assertNotEqual


850-850: Use a regular assert instead of unittest-style assertEqual


884-884: Use a regular assert instead of unittest-style assertIn


885-885: Use a regular assert instead of unittest-style assertNotEqual


893-893: Use a regular assert instead of unittest-style assertIn


894-894: Use a regular assert instead of unittest-style assertIn


896-896: Use a regular assert instead of unittest-style assertIn


899-899: First line should end with a period, question mark, or exclamation point


908-908: Use a regular assert instead of unittest-style assertEqual


913-913: Use a regular assert instead of unittest-style assertNotEqual


914-914: Use a regular assert instead of unittest-style assertEqual


924-924: First line should end with a period, question mark, or exclamation point


934-934: Use a regular assert instead of unittest-style assertEqual


938-938: Use a regular assert instead of unittest-style assertEqual


946-946: Use a regular assert instead of unittest-style assertNotEqual


947-947: Use a regular assert instead of unittest-style assertEqual


955-955: f-string without any placeholders


955-956: Explicitly concatenated string should be implicitly concatenated


982-982: Use a regular assert instead of unittest-style assertEqual


986-986: Use a regular assert instead of unittest-style assertEqual


994-994: Use a regular assert instead of unittest-style assertNotEqual


995-995: Use a regular assert instead of unittest-style assertEqual


1002-1002: First line should end with a period, question mark, or exclamation point


1014-1014: Use a regular assert instead of unittest-style assertEqual


1019-1019: Use a regular assert instead of unittest-style assertNotEqual


1021-1021: Use a regular assert instead of unittest-style assertEqual


1022-1022: Use a regular assert instead of unittest-style assertEqual


1026-1026: Use a regular assert instead of unittest-style assertEqual


1029-1029: First line should end with a period, question mark, or exclamation point


1037-1037: Use a regular assert instead of unittest-style assertEqual


1039-1039: Single quotes found but double quotes preferred


1039-1039: Single quotes found but double quotes preferred


1044-1044: No blank lines allowed after function docstring (found 1)


1044-1044: First line should end with a period, question mark, or exclamation point


1069-1069: Use a regular assert instead of unittest-style assertFalse


1079-1079: Use a regular assert instead of unittest-style assertEqual


1126-1126: Use a regular assert instead of unittest-style assertEqual


1159-1159: Use a regular assert instead of unittest-style assertEqual


1184-1184: Comment contains ambiguous (EN DASH). Did you mean - (HYPHEN-MINUS)?


1218-1218: Use a regular assert instead of unittest-style assertFalse


1220-1220: Use a regular assert instead of unittest-style assertEqual


1221-1221: Use a regular assert instead of unittest-style assertEqual


1224-1224: Use a regular assert instead of unittest-style assertEqual


1242-1242: Line too long (261 > 107)


1244-1244: Use a regular assert instead of unittest-style assertTrue


1245-1245: Use a regular assert instead of unittest-style assertFalse


1247-1247: Use a regular assert instead of unittest-style assertEqual


1250-1250: Use a regular assert instead of unittest-style assertEqual


1252-1252: Use a regular assert instead of unittest-style assertEqual


1255-1255: Use a regular assert instead of unittest-style assertEqual


1256-1256: Use a regular assert instead of unittest-style assertEqual


1266-1266: Use a regular assert instead of unittest-style assertEqual


1269-1269: Use a regular assert instead of unittest-style assertEqual


1270-1270: Use a regular assert instead of unittest-style assertEqual


1274-1274: Use a regular assert instead of unittest-style assertTrue


1281-1281: Use a regular assert instead of unittest-style assertFalse


1282-1282: Use a regular assert instead of unittest-style assertTrue


1283-1283: Use a regular assert instead of unittest-style assertTrue


1286-1286: First line should end with a period, question mark, or exclamation point


1292-1292: Use a regular assert instead of unittest-style assertEqual


1293-1293: Use a regular assert instead of unittest-style assertEqual


1297-1297: Use a regular assert instead of unittest-style assertEqual


1306-1306: Use a regular assert instead of unittest-style assertEqual


1307-1307: Use a regular assert instead of unittest-style assertEqual


1311-1311: Use a regular assert instead of unittest-style assertEqual


1320-1320: Use a regular assert instead of unittest-style assertEqual


1321-1321: Use a regular assert instead of unittest-style assertEqual


1324-1324: Use a regular assert instead of unittest-style assertEqual


1339-1339: Use a regular assert instead of unittest-style assertEqual


1350-1350: Use a regular assert instead of unittest-style assertEqual


1357-1357: Use a regular assert instead of unittest-style assertDictEqual


1382-1382: Use a regular assert instead of unittest-style assertDictEqual


1456-1456: Use a regular assert instead of unittest-style assertEqual


1499-1499: Use a regular assert instead of unittest-style assertEqual


1500-1500: Use a regular assert instead of unittest-style assertAlmostEqual


1501-1501: Use a regular assert instead of unittest-style assertIn


1502-1502: Use a regular assert instead of unittest-style assertEqual


1542-1542: Use a regular assert instead of unittest-style assertEqual


1543-1543: Use a regular assert instead of unittest-style assertAlmostEqual


1544-1544: Use a regular assert instead of unittest-style assertIn


1545-1545: Use a regular assert instead of unittest-style assertIn


1546-1546: Use a regular assert instead of unittest-style assertEqual


1547-1547: Use a regular assert instead of unittest-style assertEqual


1550-1550: First line should end with a period, question mark, or exclamation point


1555-1555: Use a regular assert instead of unittest-style assertEqual


1558-1558: First line should end with a period, question mark, or exclamation point


1571-1572: Use a single with statement with multiple contexts instead of nested with statements


1579-1579: Use a regular assert instead of unittest-style assertTrue


1607-1607: Implicitly concatenated string literals on one line


1623-1623: Implicitly concatenated string literals on one line


1632-1632: Use a regular assert instead of unittest-style assertTrue


1634-1634: Use a regular assert instead of unittest-style assertEqual


1637-1637: Use a regular assert instead of unittest-style assertEqual


1641-1641: Use a regular assert instead of unittest-style assertEqual


1643-1643: Use a regular assert instead of unittest-style assertEqual


1667-1667: Use a regular assert instead of unittest-style assertTrue


1669-1669: Use a regular assert instead of unittest-style assertEqual


1672-1672: Use a regular assert instead of unittest-style assertEqual


1676-1676: Use a regular assert instead of unittest-style assertNotEqual


1680-1680: Use a regular assert instead of unittest-style assertEqual


1702-1702: Use a regular assert instead of unittest-style assertFalse


1724-1724: Use a regular assert instead of unittest-style assertEqual


1728-1728: Use a regular assert instead of unittest-style assertEqual


1731-1731: Use a regular assert instead of unittest-style assertEqual


1736-1736: Use a regular assert instead of unittest-style assertFalse


1737-1737: Use a regular assert instead of unittest-style assertTrue


1738-1738: Use a regular assert instead of unittest-style assertTrue


1740-1740: Use a regular assert instead of unittest-style assertTrue


1741-1741: Use a regular assert instead of unittest-style assertFalse


1742-1742: Use a regular assert instead of unittest-style assertTrue


1776-1776: Use a regular assert instead of unittest-style assertEqual


1780-1780: Use a regular assert instead of unittest-style assertEqual


1800-1801: Use a single with statement with multiple contexts instead of nested with statements


1948-1948: Use a regular assert instead of unittest-style assertTrue


1979-1979: f-string without any placeholders


1979-1980: Explicitly concatenated string should be implicitly concatenated


1986-1986: Use a regular assert instead of unittest-style assertTrue


1990-1990: Use a regular assert instead of unittest-style assertEqual


1994-1994: Use a regular assert instead of unittest-style assertEqual


2027-2027: Use a regular assert instead of unittest-style assertTrue


2043-2043: Use a regular assert instead of unittest-style assertTrue


2048-2048: Use a regular assert instead of unittest-style assertTrue


2054-2054: Use a regular assert instead of unittest-style assertFalse


2090-2090: Use a regular assert instead of unittest-style assertTrue


2091-2091: Use a regular assert instead of unittest-style assertTrue


2095-2095: Use a regular assert instead of unittest-style assertEqual


2099-2099: Use a regular assert instead of unittest-style assertEqual


2127-2127: Use a regular assert instead of unittest-style assertEqual


2132-2132: First line should end with a period, question mark, or exclamation point


2138-2139: Use a single with statement with multiple contexts instead of nested with statements


2146-2146: Use key in dict instead of key in dict.keys()


2147-2147: Use a regular assert instead of unittest-style assertTrue


2148-2148: Use a regular assert instead of unittest-style assertTrue


2149-2149: Use a regular assert instead of unittest-style assertTrue


2150-2150: Use a regular assert instead of unittest-style assertTrue


2152-2152: Use a regular assert instead of unittest-style assertTrue


2153-2153: Use a regular assert instead of unittest-style assertTrue


2197-2197: Use a regular assert instead of unittest-style assertTrue


2199-2199: Use a regular assert instead of unittest-style assertEqual


2202-2202: Use a regular assert instead of unittest-style assertEqual


2207-2207: Use a regular assert instead of unittest-style assertEqual


2231-2231: Use a regular assert instead of unittest-style assertTrue


2233-2233: Use a regular assert instead of unittest-style assertEqual


2236-2236: Use a regular assert instead of unittest-style assertEqual


2241-2241: Use a regular assert instead of unittest-style assertEqual


2262-2262: Use a regular assert instead of unittest-style assertTrue


2274-2274: Use a regular assert instead of unittest-style assertTrue


2275-2275: Use a regular assert instead of unittest-style assertTrue


2276-2276: Use a regular assert instead of unittest-style assertTrue


2278-2278: Use a regular assert instead of unittest-style assertTrue


2279-2279: Use a regular assert instead of unittest-style assertTrue


2304-2304: Use a regular assert instead of unittest-style assertEqual


2310-2310: Use a regular assert instead of unittest-style assertEqual


2315-2315: Use a regular assert instead of unittest-style assertEqual


2338-2339: Use a single with statement with multiple contexts instead of nested with statements


2361-2362: Use a single with statement with multiple contexts instead of nested with statements


2389-2390: Use a single with statement with multiple contexts instead of nested with statements


2418-2419: Use a single with statement with multiple contexts instead of nested with statements


2438-2438: Use a regular assert instead of unittest-style assertTrue


2439-2439: Use a regular assert instead of unittest-style assertTrue


2442-2442: Use a regular assert instead of unittest-style assertTrue


2445-2445: Use a regular assert instead of unittest-style assertTrue


2450-2450: Use a regular assert instead of unittest-style assertTrue


2453-2453: Use a regular assert instead of unittest-style assertTrue


2458-2459: Use a single with statement with multiple contexts instead of nested with statements


2465-2465: Use a regular assert instead of unittest-style assertEqual


2480-2480: First line should end with a period, question mark, or exclamation point


2500-2500: Use a regular assert instead of unittest-style assertEqual


2501-2501: Use key in dict instead of key in dict.keys()


2555-2555: Use a regular assert instead of unittest-style assertNotEqual


2558-2558: Use a regular assert instead of unittest-style assertDictEqual


2570-2570: Use a regular assert instead of unittest-style assertTrue


2577-2577: Use a regular assert instead of unittest-style assertDictEqual


2581-2581: Use a regular assert instead of unittest-style assertDictEqual


2592-2592: Use pytest.raises instead of unittest-style assertRaises


2598-2598: Use a regular assert instead of unittest-style assertIn


2623-2623: Use a regular assert instead of unittest-style assertEqual


2624-2626: Prefer next(...) over single element slice


2627-2627: Prefer next(...) over single element slice


2631-2631: Use a regular assert instead of unittest-style assertFalse


2650-2650: Implicitly concatenated string literals on one line


2653-2653: Implicitly concatenated string literals on one line


2656-2656: Implicitly concatenated string literals on one line


2660-2660: Implicitly concatenated string literals on one line


2663-2663: Implicitly concatenated string literals on one line


2666-2666: Implicitly concatenated string literals on one line


2669-2669: Implicitly concatenated string literals on one line


2680-2680: Implicitly concatenated string literals on one line


2693-2693: Use a regular assert instead of unittest-style assertTrue


2695-2695: Use a regular assert instead of unittest-style assertEqual


2699-2699: Use a regular assert instead of unittest-style assertEqual


2703-2703: Use a regular assert instead of unittest-style assertNotEqual


2707-2707: Use a regular assert instead of unittest-style assertTrue


2709-2709: Use a regular assert instead of unittest-style assertEqual


2713-2713: Use a regular assert instead of unittest-style assertEqual


2716-2716: Use a regular assert instead of unittest-style assertEqual


2758-2758: Use a regular assert instead of unittest-style assertTrue


2761-2761: Use a regular assert instead of unittest-style assertFalse


2763-2763: Use a regular assert instead of unittest-style assertDictEqual


2768-2768: Use a regular assert instead of unittest-style assertDictEqual


2777-2777: Use pytest.raises instead of unittest-style assertRaises


2783-2783: Use a regular assert instead of unittest-style assertIn


2824-2824: Use a regular assert instead of unittest-style assertTrue


2827-2827: Use a regular assert instead of unittest-style assertFalse


2828-2828: Use a regular assert instead of unittest-style assertFalse


2829-2829: Use a regular assert instead of unittest-style assertTrue


2830-2830: Use a regular assert instead of unittest-style assertFalse


2835-2835: First line should end with a period, question mark, or exclamation point


2860-2860: Use a regular assert instead of unittest-style assertTrue


2869-2869: Use a regular assert instead of unittest-style assertEqual


2884-2884: Use a regular assert instead of unittest-style assertEqual


2908-2908: Use a regular assert instead of unittest-style assertEqual


2914-2914: First line should end with a period, question mark, or exclamation point


2932-2932: Use a regular assert instead of unittest-style assertTrue


2943-2943: Use a regular assert instead of unittest-style assertEqual


2955-2955: Use a regular assert instead of unittest-style assertEqual


2961-2961: Use a regular assert instead of unittest-style assertFalse


2964-2964: Use a regular assert instead of unittest-style assertTrue


2983-2983: Use a regular assert instead of unittest-style assertEqual


2989-2989: First line should end with a period, question mark, or exclamation point


3006-3006: Use a regular assert instead of unittest-style assertTrue


3019-3019: Use a regular assert instead of unittest-style assertEqual


3030-3030: Use a regular assert instead of unittest-style assertEqual


3036-3036: Use a regular assert instead of unittest-style assertFalse


3039-3039: Use a regular assert instead of unittest-style assertTrue


3056-3056: Use a regular assert instead of unittest-style assertEqual


3062-3062: First line should end with a period, question mark, or exclamation point


3080-3080: Use a regular assert instead of unittest-style assertTrue


3091-3091: Use a regular assert instead of unittest-style assertEqual


3105-3105: Use a regular assert instead of unittest-style assertFalse


3106-3106: Use a regular assert instead of unittest-style assertTrue


3131-3131: Use a regular assert instead of unittest-style assertEqual


3136-3136: First line should end with a period, question mark, or exclamation point


3161-3161: Use a regular assert instead of unittest-style assertEqual


3191-3191: Use a regular assert instead of unittest-style assertFalse


3204-3204: Use a regular assert instead of unittest-style assertFalse


3206-3206: Use a regular assert instead of unittest-style assertEqual


3234-3234: Use a regular assert instead of unittest-style assertTrue


3236-3245: Unnecessary list comprehension


3237-3237: Unnecessary list comprehension


3251-3251: Use a regular assert instead of unittest-style assertEqual


3252-3252: Use a regular assert instead of unittest-style assertFalse


3253-3253: Use a regular assert instead of unittest-style assertTrue


3258-3258: Use a regular assert instead of unittest-style assertFalse


3259-3259: Use a regular assert instead of unittest-style assertEqual


3263-3263: Use a regular assert instead of unittest-style assertFalse


3265-3274: Unnecessary list comprehension


3266-3266: Unnecessary list comprehension


3280-3280: Use a regular assert instead of unittest-style assertEqual


3281-3281: Use a regular assert instead of unittest-style assertFalse


3282-3282: Use a regular assert instead of unittest-style assertTrue


3307-3307: Use a regular assert instead of unittest-style assertEqual


3311-3311: Use a regular assert instead of unittest-style assertFalse


3313-3322: Unnecessary list comprehension


3314-3314: Unnecessary list comprehension


3328-3328: Use a regular assert instead of unittest-style assertEqual


3329-3329: Use a regular assert instead of unittest-style assertTrue


3330-3330: Use a regular assert instead of unittest-style assertTrue


3333-3333: First line should end with a period, question mark, or exclamation point


3340-3340: Use a regular assert instead of unittest-style assertEqual


3341-3341: Single quotes found but double quotes preferred


3341-3341: Single quotes found but double quotes preferred


3341-3341: Single quotes found but double quotes preferred


3342-3342: Single quotes found but double quotes preferred


3342-3342: Single quotes found but double quotes preferred


3352-3352: Use a regular assert instead of unittest-style assertEqual


3355-3355: f-string without any placeholders


3356-3356: f-string without any placeholders


3357-3357: f-string without any placeholders


3358-3358: f-string without any placeholders


3361-3361: Use a regular assert instead of unittest-style assertEqual


3362-3362: Single quotes found but double quotes preferred


3362-3362: Single quotes found but double quotes preferred


3362-3362: Single quotes found but double quotes preferred


3363-3363: Single quotes found but double quotes preferred


3363-3363: Single quotes found but double quotes preferred


3369-3369: First line should end with a period, question mark, or exclamation point


3385-3385: Use a regular assert instead of unittest-style assertTrue


3399-3399: Use a regular assert instead of unittest-style assertEqual


3408-3408: Use a regular assert instead of unittest-style assertTrue


3446-3446: Use a regular assert instead of unittest-style assertEqual


3454-3454: No whitespaces allowed surrounding docstring text


3454-3454: First line should end with a period, question mark, or exclamation point


3470-3470: Use a regular assert instead of unittest-style assertTrue


3477-3477: Use a regular assert instead of unittest-style assertEqual


3484-3484: Use a regular assert instead of unittest-style assertTrue


3512-3512: Use a regular assert instead of unittest-style assertEqual


3518-3520: First line should end with a period, question mark, or exclamation point


3529-3529: Use a regular assert instead of unittest-style assertEqual


3530-3534: Prefer next(...) over single element slice


3535-3539: Prefer next(...) over single element slice


3557-3557: Implicitly concatenated string literals on one line


3560-3560: Implicitly concatenated string literals on one line


3563-3563: Implicitly concatenated string literals on one line


3568-3568: Use a regular assert instead of unittest-style assertTrue


3570-3570: Use a regular assert instead of unittest-style assertEqual


3574-3574: Use a regular assert instead of unittest-style assertEqual


3577-3577: Use a regular assert instead of unittest-style assertNotEqual


3594-3594: Use a regular assert instead of unittest-style assertEqual


3595-3599: Prefer next(...) over single element slice


3600-3604: Prefer next(...) over single element slice


3607-3607: Use a regular assert instead of unittest-style assertEqual


3608-3612: Prefer next(...) over single element slice


3613-3617: Prefer next(...) over single element slice


3622-3622: Use a regular assert instead of unittest-style assertTrue


3624-3624: Use a regular assert instead of unittest-style assertEqual


3627-3627: Use a regular assert instead of unittest-style assertEqual


3631-3631: Use a regular assert instead of unittest-style assertEqual


3665-3665: Use a regular assert instead of unittest-style assertEqual


3666-3670: Prefer next(...) over single element slice


3671-3675: Prefer next(...) over single element slice


3687-3687: Use a regular assert instead of unittest-style assertEqual


3688-3692: Prefer next(...) over single element slice


3693-3697: Prefer next(...) over single element slice


3718-3718: Use a regular assert instead of unittest-style assertEqual


3719-3719: Use a regular assert instead of unittest-style assertEqual


3723-3723: Unnecessary list literal passed to list() (remove the outer call to list())


3734-3734: Use a regular assert instead of unittest-style assertEqual


3735-3739: Prefer next(...) over single element slice


3737-3737: Prefer next(iter(dist.defects_dict.keys())) over single element slice


3740-3744: Prefer next(...) over single element slice


3753-3753: Use a regular assert instead of unittest-style assertEqual


3756-3756: f-string without any placeholders


3757-3757: f-string without any placeholders


3758-3758: f-string without any placeholders


3759-3759: f-string without any placeholders


3766-3766: Use a regular assert instead of unittest-style assertEqual


3767-3771: Prefer next(...) over single element slice


3772-3776: Prefer next(...) over single element slice


3780-3780: Use pytest.raises instead of unittest-style assertRaises


3787-3787: Use a regular assert instead of unittest-style assertIn


3797-3797: Use a regular assert instead of unittest-style assertTrue


3800-3800: Use a regular assert instead of unittest-style assertFalse


3801-3801: Use a regular assert instead of unittest-style assertTrue


3809-3809: Use a regular assert instead of unittest-style assertTrue


3812-3812: Use a regular assert instead of unittest-style assertFalse


3813-3813: Use a regular assert instead of unittest-style assertTrue


3814-3814: Use a regular assert instead of unittest-style assertFalse

Additional comments not posted (19)
tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input.inp (1)

14-14: Ensure that the system being studied requires spin-polarized calculations. If not, setting SPIN_POLARIZED to .TRUE. may lead to unnecessary computational overhead.

tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input_user_parameters.inp (1)

14-14: Ensure that the system being studied does not require spin-polarized calculations. If it does, setting SPIN_POLARIZED to .FALSE. may lead to incorrect results.

shakenbreak/SnB_run.sh (1)

Line range hint 1-1: The script follows best practices for shell scripting and the logic appears to be correct.

README.md (1)

131-135: Ensure that the new studies added to the README are correctly formatted and the links are valid.

shakenbreak/cli.py (10)

12-12: New imports from doped.core and doped.generation are added. Ensure these are necessary and used within the file to avoid unnecessary dependencies.


55-61: The loop correctly sets CLI options using a config file. Ensure that config_data contains valid parameters and that this logic does not override user-specified options unintentionally.


67-67: The CONTEXT_SETTINGS dictionary is defined to customize the help option names. This is a good practice for improving user experience.


72-72: The docstring for the snb command group is clear and concise, providing a brief description of the tool.


114-116: The new --padding option is added to the generate command. Ensure that this option is correctly handled in the command logic and that its default value is appropriate.


273-273: The ValueError raised when min_charge or max_charge is not set ensures that both options are provided together. This is a good practice for input validation.


286-286: The warning about charges being specified in both CLI options and the config file helps prevent conflicts and ensures that the correct values are used.


304-304: The print statement informing about the defect charge states provides useful feedback to the user. Ensure that this information is accurate and helpful.


468-483: The logic for parsing bulk oxidation states is well-structured and includes a fallback mechanism if the cost of guessing oxidation states is too high. Ensure that the Queue import is necessary and used efficiently.


577-582: The updates to the parse_defect_charges function simplify the logic and improve readability. Ensure that the function handles all edge cases correctly.

shakenbreak/input.py (2)

120-128: The conversion of charge keys back to integers is necessary for correct processing. This change looks good.


451-454: The update of INCAR settings with ROPT is appropriate for the number of elements. This change looks good.

tests/test_input.py (2)

19-19: The import statement for Species has been removed. Ensure that this removal does not affect any functionality that previously relied on Species.


107-115: The setUpClass method initializes several class variables. Ensure that these paths and initializations are correct and necessary for the tests.

tests/test_cli.py (1)

Line range hint 3976-3984: LGTM!

@@ -12,15 +12,21 @@
import shutil
import warnings
from importlib.metadata import version
from typing import Optional, Tuple, Type, Union
from multiprocessing import Queue
Copy link

Choose a reason for hiding this comment

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

Consider using a more specific import for Queue to avoid potential namespace conflicts.

- from multiprocessing import Queue
+ from multiprocessing import Queue as MPQueue

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
from multiprocessing import Queue
from multiprocessing import Queue as MPQueue

formatted_distorted_charge = (
f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"
)
formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"
Copy link

Choose a reason for hiding this comment

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

Use consistent string formatting for formatted_distorted_charge.

To maintain consistency and readability, consider using f-string formatting for the entire expression.

- formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"
+ formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"
formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"

default_incar_settings = loadfn(
os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml")
)
default_incar_settings = loadfn(os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml"))
Copy link

Choose a reason for hiding this comment

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

Ensure that the file path construction is robust against path traversal vulnerabilities.

- default_incar_settings = loadfn(os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml"))
+ default_incar_settings = loadfn(os.path.join(MODULE_DIR, "SnB_input_files", "incar.yaml"))

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
default_incar_settings = loadfn(os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml"))
default_incar_settings = loadfn(os.path.join(MODULE_DIR, "SnB_input_files", "incar.yaml"))

defect_name_wout_charge, charge_state = defect_name.rsplit(
"_", 1
) # `defect_name` includes charge
defect_name_wout_charge, charge_state = defect_name.rsplit("_", 1) # `defect_name` includes charge
Copy link

Choose a reason for hiding this comment

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

Validate the split operation to ensure defect_name contains an underscore to avoid runtime errors.

+ if "_" not in defect_name:
+     raise ValueError("Expected an underscore in defect_name to split correctly.")

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
defect_name_wout_charge, charge_state = defect_name.rsplit("_", 1) # `defect_name` includes charge
if "_" not in defect_name:
raise ValueError("Expected an underscore in defect_name to split correctly.")
defect_name_wout_charge, charge_state = defect_name.rsplit("_", 1) # `defect_name` includes charge

Comment on lines +43 to +45
if isinstance(distorted_distortion, str):
return f"{output_path}/{defect_species}/{distorted_distortion}"
else:
return (
f"{output_path}/{defect_species}/Bond_Distortion_"
f"{round(distorted_distortion * 100, 1) + 0}%_from_{formatted_distorted_charge}"
)

Copy link

Choose a reason for hiding this comment

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

Consider simplifying the return statement for readability.

The return statement can be simplified by removing the redundant check for distorted_distortion.

- if isinstance(distorted_distortion, str):
-     return f"{output_path}/{defect_species}/{distorted_distortion}"
+ return f"{output_path}/{defect_species}/{distorted_distortion}"

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
if isinstance(distorted_distortion, str):
return f"{output_path}/{defect_species}/{distorted_distortion}"
else:
return (
f"{output_path}/{defect_species}/Bond_Distortion_"
f"{round(distorted_distortion * 100, 1) + 0}%_from_{formatted_distorted_charge}"
)
return f"{output_path}/{defect_species}/{distorted_distortion}"

Comment on lines 1951 to 1955
self.assertIn(
"Defect charge states will be set to the range: 0 {Defect oxidation "
"Defect charge states will be set to the range: 0 - {Defect oxidation "
"state}, with a `padding = 4` on either side of this range.",
result.output,
)
Copy link

Choose a reason for hiding this comment

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

Convert unittest-style assertion to a regular assert statement for consistency.

- self.assertIn(
-     "Defect charge states will be set to the range: 0 - {Defect oxidation state}, with a `padding = 4` on either side of this range.",
-     result.output
- )
+ assert "Defect charge states will be set to the range: 0 - {Defect oxidation state}, with a `padding = 4` on either side of this range." in result.output

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertIn(
"Defect charge states will be set to the range: 0 – {Defect oxidation "
"Defect charge states will be set to the range: 0 - {Defect oxidation "
"state}, with a `padding = 4` on either side of this range.",
result.output,
)
assert "Defect charge states will be set to the range: 0 - {Defect oxidation state}, with a `padding = 4` on either side of this range." in result.output

Comment on lines +2842 to +2859
self.assertIn(
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
result.output,
)
else:
self.assertNotIn(
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
result.output,
)
energies = loadfn(f"{self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml")
test_energies = {
"distortions": {
-0.4: -1176.28458753,
},
"Unperturbed": -1173.02056574,
} # Using dictionary here (rather than file/string), because parsing order
# is difference on GitHub actions
self.assertEqual(test_energies, energies)
Copy link

Choose a reason for hiding this comment

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

Convert unittest-style assertions to regular assert statements for consistency.

- self.assertIn(
-     f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
-     result.output
- )
- self.assertNotIn(
-     f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
-     result.output
- )
- self.assertEqual(test_energies, energies)
+ assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " in result.output
+ assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " not in result.output
+ assert test_energies == energies

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertIn(
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
result.output,
)
else:
self.assertNotIn(
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
result.output,
)
energies = loadfn(f"{self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml")
test_energies = {
"distortions": {
-0.4: -1176.28458753,
},
"Unperturbed": -1173.02056574,
} # Using dictionary here (rather than file/string), because parsing order
# is difference on GitHub actions
self.assertEqual(test_energies, energies)
assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " in result.output
else:
assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " not in result.output
energies = loadfn(f"{self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml")
test_energies = {
"distortions": {
-0.4: -1176.28458753,
},
"Unperturbed": -1173.02056574,
} # Using dictionary here (rather than file/string), because parsing order
# is difference on GitHub actions
assert test_energies == energies

Comment on lines 465 to +467
for fname in os.listdir("./"):
if fname.endswith("json"): # distortion_metadata and parsed_defects_dict
os.remove(f"./{fname}")
if fname.endswith("json") or fname.endswith("png"):
os.remove(f"./{fname}") # distortion_metadata, parsed_defects_dict, left-over plots
Copy link

Choose a reason for hiding this comment

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

Optimize the endswith method call to check multiple conditions in a single call.

- if fname.endswith("json") or fname.endswith("png"):
+ if fname.endswith(("json", "png")):

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
for fname in os.listdir("./"):
if fname.endswith("json"): # distortion_metadata and parsed_defects_dict
os.remove(f"./{fname}")
if fname.endswith("json") or fname.endswith("png"):
os.remove(f"./{fname}") # distortion_metadata, parsed_defects_dict, left-over plots
for fname in os.listdir("./"):
if fname.endswith(("json", "png")):
os.remove(f"./{fname}") # distortion_metadata, parsed_defects_dict, left-over plots

@@ -1077,12 +1076,11 @@ def test_create_vasp_input(self):
"vac_1_Cd_0/Bond_Distortion_-50.0%"
)
kpoints = Kpoints.from_file("vac_1_Cd_0/Bond_Distortion_-50.0%/KPOINTS")
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
self.assertEqual(kpoints.kpts, [(1, 1, 1)])
Copy link

Choose a reason for hiding this comment

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

Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(kpoints.kpts, [(1, 1, 1)])
+ assert kpoints.kpts == [(1, 1, 1)]

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertEqual(kpoints.kpts, [(1, 1, 1)])
assert kpoints.kpts == [(1, 1, 1)]

@@ -1649,12 +1640,9 @@ def test_write_vasp_files(self):
) # default
self.assertEqual(V_Cd_POSCAR.structure, self.V_Cd_minus0pt5_struc_rattled)
kpoints = Kpoints.from_file(f"{V_Cd_Bond_Distortion_folder}/KPOINTS")
self.assertEqual(kpoints.kpts, [[1, 1, 1]])
self.assertEqual(kpoints.kpts, [(1, 1, 1)])
Copy link

Choose a reason for hiding this comment

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

Use a regular assert instead of unittest-style assertEqual for a more Pythonic approach.

- self.assertEqual(kpoints.kpts, [(1, 1, 1)])
+ assert kpoints.kpts == [(1, 1, 1)]

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
self.assertEqual(kpoints.kpts, [(1, 1, 1)])
assert kpoints.kpts == [(1, 1, 1)]

@kavanase kavanase merged commit 739ae96 into main May 15, 2024
6 checks passed
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Out of diff range and nitpick comments (4)
docs/conf.py (4)

Line range hint 72-72: Use double quotes for consistency.

- nb_render_image_options = {"height": "300",}  # Reduce plots size
+ nb_render_image_options = {"height": "300"}  # Reduce plots size

Line range hint 131-131: Missing docstring in public function.

Add a docstring to describe the purpose and usage of the setup function.

def setup(app):
+    """
+    Configure the Sphinx application.
+    
+    Args:
+        app: The Sphinx application object.
+    """

Line range hint 132-132: Use double quotes for consistency.

- app.add_config_value('myst_parser_config', {
+ app.add_config_value("myst_parser_config", {

Line range hint 134-134: Use double quotes for consistency.

- 'auto_toc_tree_section': 'Contents',
+ "auto_toc_tree_section": "Contents",
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 5084535 and c30b3bc.
Files selected for processing (3)
  • CHANGELOG.rst (1 hunks)
  • docs/conf.py (1 hunks)
  • setup.py (5 hunks)
Files skipped from review due to trivial changes (1)
  • setup.py
Additional Context Used
Ruff (31)
docs/conf.py (31)

1-1: Missing docstring in public module


18-18: Single quotes found but double quotes preferred


23-23: Single quotes found but double quotes preferred


24-24: Single quotes found but double quotes preferred


25-25: Single quotes found but double quotes preferred


28-28: Single quotes found but double quotes preferred


37-37: Single quotes found but double quotes preferred


38-38: Single quotes found but double quotes preferred


39-39: Single quotes found but double quotes preferred


40-40: Single quotes found but double quotes preferred


41-41: Single quotes found but double quotes preferred


42-42: Single quotes found but double quotes preferred


43-43: Single quotes found but double quotes preferred


44-44: Single quotes found but double quotes preferred


46-46: Single quotes found but double quotes preferred


51-51: Single quotes found but double quotes preferred


51-51: Single quotes found but double quotes preferred


52-52: Single quotes found but double quotes preferred


52-52: Single quotes found but double quotes preferred


56-56: Single quotes found but double quotes preferred


61-61: Single quotes found but double quotes preferred


61-61: Single quotes found but double quotes preferred


61-61: Single quotes found but double quotes preferred


72-72: Single quotes found but double quotes preferred


82-82: Single quotes found but double quotes preferred


130-130: Single quotes found but double quotes preferred


131-131: Missing docstring in public function


132-132: Single quotes found but double quotes preferred


133-133: Single quotes found but double quotes preferred


134-134: Single quotes found but double quotes preferred


134-134: Single quotes found but double quotes preferred

@@ -25,7 +25,7 @@
author = 'Irea Mosquera-Lois, Seán R. Kavanagh'

# The full version, including alpha/beta/rc tags
release = '3.3.1'
release = '3.3.3'
Copy link

Choose a reason for hiding this comment

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

Use double quotes for consistency.

- release = '3.3.3'
+ release = "3.3.3"

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
release = '3.3.3'
release = "3.3.3"

Comment on lines +4 to +10
v3.3.3
----------
- Add ``verbose`` option to more parsing/plotting functions for better control of output detail.
- Improve effiency & robustness of oxidation state handling.
- Miscellaneous efficiency (e.g. memory reduction) and robustness updates.
- Improved GitHub Actions test efficiency.

Copy link

Choose a reason for hiding this comment

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

Ensure consistency in the changelog format.

Consider adding a period at the end of each bullet point for consistency.

- - Add ``verbose`` option to more parsing/plotting functions for better control of output detail.
- - Improve effiency & robustness of oxidation state handling.
- - Miscellaneous efficiency (e.g. memory reduction) and robustness updates.
- - Improved GitHub Actions test efficiency.
+ - Add ``verbose`` option to more parsing/plotting functions for better control of output detail.
+ - Improve efficiency & robustness of oxidation state handling.
+ - Miscellaneous efficiency (e.g. memory reduction) and robustness updates.
+ - Improved GitHub Actions test efficiency.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
v3.3.3
----------
- Add ``verbose`` option to more parsing/plotting functions for better control of output detail.
- Improve effiency & robustness of oxidation state handling.
- Miscellaneous efficiency (e.g. memory reduction) and robustness updates.
- Improved GitHub Actions test efficiency.
v3.3.3
----------
- Add ``verbose`` option to more parsing/plotting functions for better control of output detail.
- Improve efficiency & robustness of oxidation state handling.
- Miscellaneous efficiency (e.g. memory reduction) and robustness updates.
- Improved GitHub Actions test efficiency.

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