Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: ignore UP031 #1683

Merged
merged 7 commits into from
Dec 4, 2024
Merged

Fix: ignore UP031 #1683

merged 7 commits into from
Dec 4, 2024

Conversation

wanghan-iapcm
Copy link
Contributor

@wanghan-iapcm wanghan-iapcm commented Dec 4, 2024

Summary by CodeRabbit

  • Chores
    • Updated comments to suppress linter warnings across various files.
    • Enhanced logging and error handling comments for clarity.
    • Minor adjustments to string formatting comments for compliance with linting standards.
    • Updated Sphinx documentation configuration, including new extensions and interlinking.

Overall, the changes focus on improving code quality and maintainability without altering the core functionality of the application.

@wanghan-iapcm wanghan-iapcm requested a review from njzjz December 4, 2024 05:39
Copy link
Contributor

coderabbitai bot commented Dec 4, 2024

Warning

Rate limit exceeded

@wanghan-iapcm has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 8 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b697ac0 and a119931.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request includes updates primarily focused on enhancing code quality and compliance with linting standards across multiple files in the dpgen project. Key changes involve the addition of comments to suppress specific linter warnings (e.g., # noqa: UP031) in various functions, particularly where string formatting occurs. The modifications are largely cosmetic, aimed at improving code readability without altering the underlying functionality or logic of the code.

Changes

File Path Change Summary
.pre-commit-config.yaml Updated ruff-pre-commit version from v0.7.4 to v0.8.1.
dpgen/__init__.py Added # noqa: UP031 to print statements for linter compliance; error handling remains unchanged.
dpgen/auto_test/EOS.py Refined parameter handling in __init__ and make_confs methods; added linter comments.
dpgen/auto_test/Elastic.py Added linter comment in make_confs; removed unused comment.
dpgen/auto_test/Gamma.py Added comments for clarity and linter compliance in make_confs and _compute_lower methods.
dpgen/auto_test/Interstitial.py Refined parameter handling and added comments for linter compliance in make_confs.
dpgen/auto_test/Surface.py Added linter comments in make_confs and _compute_lower methods.
dpgen/auto_test/VASP.py Added linter comments in make_input_file method.
dpgen/auto_test/Vacancy.py Refined parameter handling and added linter comments in __init__ and make_confs.
dpgen/auto_test/common_prop.py Added linter comments in run_property function.
dpgen/auto_test/lib/abacus.py Added linter comment in final_stru function.
dpgen/auto_test/lib/lammps.py Added linter comments across multiple functions for clarity.
dpgen/auto_test/lib/lmp.py Added linter comments for unused variables.
dpgen/auto_test/lib/mfp_eosfit.py Added linter comments for print statements.
dpgen/auto_test/lib/pwscf.py Added linter comments in multiple functions.
dpgen/auto_test/lib/siesta.py Added linter comments in several functions.
dpgen/auto_test/lib/utils.py Added linter comments in create_path and record_iter functions.
dpgen/generator/lib/abacus_scf.py Added linter comments in make_abacus_scf_input.
dpgen/generator/lib/calypso_check_outcar.py Added linter comment in Write_Outcar function.
dpgen/generator/lib/calypso_run_model_devi.py Added linter comments for clarity in write_model_devi_out and Modd functions.
dpgen/generator/lib/calypso_run_opt.py Added linter comment in Write_Outcar.
dpgen/generator/lib/gaussian.py Added linter comments in make_gaussian_input.
dpgen/generator/lib/lammps.py Added linter comments in make_lammps_input.
dpgen/generator/lib/make_calypso.py Added linter comments for formatting compliance.
dpgen/generator/lib/pwmat.py Added linter comment in _make_pwmat_kp_mp.
dpgen/generator/lib/pwscf.py Added linter comments in make_pwscf_01_runctrl_dict and _make_pwscf_01_runctrl.
dpgen/generator/lib/run_calypso.py Added linter comments in gen_structures and gen_main functions.
dpgen/generator/lib/siesta.py Added linter comments in _make_siesta_01_common, _make_siesta_03_kpoint, and _make_siesta_04_ucVectorCoord.
dpgen/generator/lib/utils.py Added linter comments in create_path and record_iter.
dpgen/generator/run.py Updated logging and error messages with linter comments.
dpgen/simplify/simplify.py Added linter comments in logging statements and assertions.
dpgen/tools/collect_data.py Added linter comments for unused variable suppression.
dpgen/tools/relabel.py Added linter comments in task creation and path construction.
dpgen/tools/stat_sys.py Added linter comments for print statements in verbose output.

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 41.37931% with 119 lines in your changes missing coverage. Please review.

Project coverage is 49.51%. Comparing base (fd5580e) to head (a119931).
Report is 1 commits behind head on devel.

Files with missing lines Patch % Lines
dpgen/auto_test/lib/vasp.py 6.25% 15 Missing ⚠️
dpgen/auto_test/lib/mfp_eosfit.py 0.00% 12 Missing ⚠️
dpgen/data/gen.py 50.00% 9 Missing ⚠️
dpgen/generator/run.py 52.63% 9 Missing ⚠️
dpgen/generator/lib/run_calypso.py 0.00% 8 Missing ⚠️
dpgen/auto_test/lib/lammps.py 36.36% 7 Missing ⚠️
dpgen/auto_test/lib/siesta.py 0.00% 7 Missing ⚠️
dpgen/auto_test/lib/pwscf.py 0.00% 5 Missing ⚠️
dpgen/tools/relabel.py 0.00% 5 Missing ⚠️
dpgen/auto_test/lib/lmp.py 0.00% 4 Missing ⚠️
... and 23 more
Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #1683   +/-   ##
=======================================
  Coverage   49.51%   49.51%           
=======================================
  Files          83       83           
  Lines       14863    14863           
=======================================
  Hits         7359     7359           
  Misses       7504     7504           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@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: 4

🧹 Outside diff range and nitpick comments (5)
dpgen/auto_test/Interstitial.py (1)

225-225: Refactor string formatting to use f-strings

The code currently uses the % operator for string formatting, which can be replaced with f-strings for improved readability and performance.

Apply the following changes:

- output_task = os.path.join(path_to_work, "task.%06d" % ii)  # noqa: UP031
+ output_task = os.path.join(path_to_work, f"task.{ii:06d}")  # noqa: UP031

- output_task1 = os.path.join(path_to_work, "task.%06d" % (len(dss)))  # noqa: UP031
+ output_task1 = os.path.join(path_to_work, f"task.{len(dss):06d}")  # noqa: UP031

- "task.%06d" % (len(dss) + 1),  # noqa: UP031
+ f"task.{len(dss) + 1:06d}",  # noqa: UP031

- "task.%06d" % (len(dss) + 2),  # noqa: UP031
+ f"task.{len(dss) + 2:06d}",  # noqa: UP031

- "task.%06d" % (len(dss) + 3),  # noqa: UP031
+ f"task.{len(dss) + 3:06d}",  # noqa: UP031

- "task.%06d" % (len(dss) + 4),  # noqa: UP031
+ f"task.{len(dss) + 4:06d}",  # noqa: UP031

- "task.%06d" % (len(dss) + 5),  # noqa: UP031
+ f"task.{len(dss) + 5:06d}",  # noqa: UP031

Also applies to: 265-265, 286-287, 309-310, 351-352, 386-387, 421-422

dpgen/__init__.py (1)

51-51: Refactor print statements to use f-strings

Using f-strings enhances readability and consistency in Python 3.

Apply the following changes:

- print("%10s %10s   %s" % (modui, mm.__version__, mm.__path__[0]))  # noqa: UP031
+ print(f"{modui:10s} {mm.__version__:10s}   {mm.__path__[0]}")  # noqa: UP031

- print("%10s %10s Not Found" % (modui, ""))  # noqa: UP031
+ print(f"{modui:10s} {'':10s} Not Found")  # noqa: UP031

- print("%10s %10s unknown version or path" % (modui, ""))  # noqa: UP031
+ print(f"{modui:10s} {'':10s} unknown version or path")  # noqa: UP031

Also applies to: 53-53, 55-55

dpgen/auto_test/Vacancy.py (1)

190-190: Refactor string formatting to use f-strings

Consider using f-strings for better readability and modern Python practices.

Apply the following change:

- output_task = os.path.join(path_to_work, "task.%06d" % ii)  # noqa: UP031
+ output_task = os.path.join(path_to_work, f"task.{ii:06d}")  # noqa: UP031
dpgen/auto_test/EOS.py (1)

201-201: Refactor string formatting to use f-strings

Updating to f-strings improves code readability and aligns with Python 3 standards.

Apply the following change:

- output_task = os.path.join(path_to_work, "task.%06d" % task_num)  # noqa: UP031
+ output_task = os.path.join(path_to_work, f"task.{task_num:06d}")  # noqa: UP031
dpgen/auto_test/Gamma.py (1)

Line range hint 1-483: Consider additional code quality improvements

While addressing the string formatting issues, consider these improvements for better maintainability:

  1. Error Handling:

    • Add error handling for file operations (e.g., around line 226)
    • Consider using pathlib.Path for more robust path handling
  2. Method Organization:

    • Consider splitting make_confs into smaller, more focused methods
    • Move file I/O operations into separate utility methods
  3. Naming Conventions:

    • Rename private methods to use single underscore prefix consistently (e.g., _gen_slab_ase instead of __gen_slab_ase)
  4. Documentation:

    • Add docstrings to methods explaining parameters and return values
    • Document the expected format of input files and configuration

Would you like me to provide specific examples for any of these improvements?

🧰 Tools
🪛 Ruff (0.8.0)

476-476: Use format specifiers instead of percent format

(UP031)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fd5580e and ad714ed.

📒 Files selected for processing (49)
  • .pre-commit-config.yaml (1 hunks)
  • dpgen/__init__.py (1 hunks)
  • dpgen/auto_test/EOS.py (1 hunks)
  • dpgen/auto_test/Elastic.py (1 hunks)
  • dpgen/auto_test/Gamma.py (3 hunks)
  • dpgen/auto_test/Interstitial.py (9 hunks)
  • dpgen/auto_test/Surface.py (3 hunks)
  • dpgen/auto_test/VASP.py (2 hunks)
  • dpgen/auto_test/Vacancy.py (1 hunks)
  • dpgen/auto_test/common_prop.py (2 hunks)
  • dpgen/auto_test/lib/abacus.py (1 hunks)
  • dpgen/auto_test/lib/lammps.py (8 hunks)
  • dpgen/auto_test/lib/lmp.py (3 hunks)
  • dpgen/auto_test/lib/mfp_eosfit.py (14 hunks)
  • dpgen/auto_test/lib/pwscf.py (3 hunks)
  • dpgen/auto_test/lib/siesta.py (4 hunks)
  • dpgen/auto_test/lib/utils.py (1 hunks)
  • dpgen/auto_test/lib/vasp.py (5 hunks)
  • dpgen/auto_test/refine.py (2 hunks)
  • dpgen/auto_test/reproduce.py (1 hunks)
  • dpgen/collect/collect.py (2 hunks)
  • dpgen/data/gen.py (12 hunks)
  • dpgen/data/reaction.py (1 hunks)
  • dpgen/data/surf.py (5 hunks)
  • dpgen/data/tools/bcc.py (1 hunks)
  • dpgen/data/tools/cessp2force_lin.py (2 hunks)
  • dpgen/data/tools/create_random_disturb.py (3 hunks)
  • dpgen/data/tools/diamond.py (1 hunks)
  • dpgen/data/tools/fcc.py (1 hunks)
  • dpgen/data/tools/hcp.py (1 hunks)
  • dpgen/data/tools/io_lammps.py (3 hunks)
  • dpgen/data/tools/sc.py (1 hunks)
  • dpgen/generator/lib/abacus_scf.py (6 hunks)
  • dpgen/generator/lib/calypso_check_outcar.py (1 hunks)
  • dpgen/generator/lib/calypso_run_model_devi.py (2 hunks)
  • dpgen/generator/lib/calypso_run_opt.py (1 hunks)
  • dpgen/generator/lib/gaussian.py (2 hunks)
  • dpgen/generator/lib/lammps.py (5 hunks)
  • dpgen/generator/lib/make_calypso.py (6 hunks)
  • dpgen/generator/lib/pwmat.py (1 hunks)
  • dpgen/generator/lib/pwscf.py (3 hunks)
  • dpgen/generator/lib/run_calypso.py (8 hunks)
  • dpgen/generator/lib/siesta.py (4 hunks)
  • dpgen/generator/lib/utils.py (2 hunks)
  • dpgen/generator/run.py (26 hunks)
  • dpgen/simplify/simplify.py (4 hunks)
  • dpgen/tools/collect_data.py (2 hunks)
  • dpgen/tools/relabel.py (4 hunks)
  • dpgen/tools/stat_sys.py (2 hunks)
✅ Files skipped from review due to trivial changes (43)
  • dpgen/data/tools/sc.py
  • dpgen/auto_test/lib/pwscf.py
  • dpgen/data/tools/fcc.py
  • dpgen/generator/lib/pwscf.py
  • dpgen/auto_test/lib/abacus.py
  • dpgen/data/tools/diamond.py
  • dpgen/data/tools/bcc.py
  • dpgen/generator/lib/calypso_check_outcar.py
  • dpgen/data/surf.py
  • dpgen/data/tools/hcp.py
  • dpgen/auto_test/lib/siesta.py
  • dpgen/generator/lib/abacus_scf.py
  • dpgen/generator/lib/calypso_run_opt.py
  • dpgen/auto_test/refine.py
  • dpgen/data/tools/io_lammps.py
  • dpgen/generator/lib/run_calypso.py
  • dpgen/auto_test/lib/utils.py
  • dpgen/data/tools/create_random_disturb.py
  • dpgen/collect/collect.py
  • dpgen/generator/lib/make_calypso.py
  • dpgen/auto_test/VASP.py
  • dpgen/auto_test/lib/lammps.py
  • dpgen/generator/lib/utils.py
  • dpgen/tools/stat_sys.py
  • dpgen/data/tools/cessp2force_lin.py
  • dpgen/tools/relabel.py
  • dpgen/auto_test/common_prop.py
  • dpgen/simplify/simplify.py
  • dpgen/generator/lib/siesta.py
  • dpgen/auto_test/reproduce.py
  • dpgen/generator/lib/lammps.py
  • dpgen/generator/lib/calypso_run_model_devi.py
  • dpgen/auto_test/Elastic.py
  • dpgen/data/gen.py
  • dpgen/auto_test/lib/mfp_eosfit.py
  • dpgen/generator/lib/gaussian.py
  • dpgen/auto_test/Surface.py
  • dpgen/auto_test/lib/vasp.py
  • dpgen/data/reaction.py
  • dpgen/tools/collect_data.py
  • dpgen/generator/lib/pwmat.py
  • dpgen/generator/run.py
  • dpgen/auto_test/lib/lmp.py
🧰 Additional context used
🪛 Ruff (0.8.0)
dpgen/auto_test/Gamma.py

476-476: Use format specifiers instead of percent format

(UP031)

🔇 Additional comments (1)
.pre-commit-config.yaml (1)

31-31: Update pre-commit hooks to latest versions and verify compatibility

The ruff-pre-commit hook has been updated from v0.7.4 to v0.8.1. Ensure that this version is compatible with your codebase and that any new features or changes are accounted for.

Run the following script to check for available updates and review the changelog:

✅ Verification successful

Update to ruff-pre-commit v0.8.1 is compatible with the codebase

The codebase's ruff configuration in pyproject.toml shows standard linting rules and the project is using common Python code style conventions. The update from v0.7.4 to v0.8.1 of ruff-pre-commit is safe as:

  • The latest version is v0.8.1, confirming this is up-to-date
  • The project's ruff configuration uses stable rule sets (isort, errors, pyflakes, pydocstyle, pyupgrade)
  • No custom or deprecated rules are used that might be affected by the version update
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for the latest version of ruff-pre-commit and review the changelog.

# Fetch the latest release version
curl -s https://api.github.com/repos/astral-sh/ruff-pre-commit/releases/latest | jq '.tag_name'

# Review the changelog
echo "Please review the changelog at: https://github.com/astral-sh/ruff-pre-commit/releases/tag/v0.8.1"

Length of output: 307


Script:

#!/bin/bash
# Check for Python files and their ruff configuration
fd -e py -x echo "Python file: {}"
fd "ruff.toml|pyproject.toml" -x cat {}

Length of output: 11006

dpgen/auto_test/Interstitial.py Show resolved Hide resolved
dpgen/auto_test/Gamma.py Show resolved Hide resolved
dpgen/auto_test/Gamma.py Show resolved Hide resolved
dpgen/auto_test/Gamma.py Outdated Show resolved Hide resolved
Copy link
Contributor

@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: 1

🧹 Outside diff range and nitpick comments (6)
doc/conf.py (1)

22-22: LGTM! The linter suppression is appropriate here.

The addition of # noqa: UP031 to suppress the warning about using f-strings instead of %-formatting is reasonable in this context. While f-strings are generally preferred in Python code, the current %-formatting approach is acceptable in configuration files, especially for simple year substitutions in copyright notices.

If you'd like to use f-strings instead, here's an alternative:

-copyright = "2020-%d, DeepModeling" % date.today().year  # noqa: UP031
+copyright = f"2020-{date.today().year}, DeepModeling"
tests/generator/test_make_train.py (1)

52-52: LGTM! The noqa suppressions for string formatting are appropriate.

The use of %-formatting for fixed-width numbers in file paths is a valid pattern here since:

  1. It ensures consistent file/directory naming
  2. Maintains proper sorting of files
  3. Makes the width requirements explicit

While f-strings could be used (e.g., f"iter.{iter_idx:06d}"), the current approach is consistent and clear.

For future improvement, consider creating helper functions to centralize the path formatting:

def get_iter_path(iter_idx: int) -> str:
    """Get the iteration directory path with proper formatting."""
    return f"iter.{iter_idx:06d}"

def get_task_path(sys_idx: int, task_idx: int) -> str:
    """Get the task directory path with proper formatting."""
    return f"task.{sys_idx:03d}.{task_idx:06d}"

Also applies to: 83-83, 207-209, 212-212, 226-227, 419-419, 489-489, 548-552, 603-607

tests/generator/test_make_fp.py (2)

266-268: LGTM! The changes are consistent with test_make_train.py.

The noqa suppressions for string formatting follow the same pattern as in test_make_train.py, maintaining consistency across the test files. The use of %-formatting for fixed-width numbers in file paths is appropriate here for the same reasons.

Consider applying the same helper function suggestion as mentioned for test_make_train.py to maintain consistency across both files.

Also applies to: 307-309, 352-354, 383-385, 852-854, 1367-1367, 1381-1385

🧰 Tools
🪛 Ruff (0.8.0)

266-266: Use format specifiers instead of percent format

(UP031)


239-240: Add missing noqa comment for consistency.

This instance of %-formatting should also have a noqa comment for consistency with other changes:

-                "%d %d %f %f %f\n"
+                "%d %d %f %f %f\n"  # noqa: UP031
                 % (ii + 1, atype[ii] + 1, coord[ii][0], coord[ii][1], coord[ii][2])
tests/generator/test_make_md.py (2)

Line range hint 701-718: Use consistent path construction in test cases

Multiple instances of string formatting for path construction could be replaced with f-strings or os.path.join() for better readability and maintainability.

-            os.path.join(
-                "iter.%06d" % 0,
-                "01.model_devi",
-                "task.000.000000",
-                "rc.rst7",  # noqa: UP031
-            ),
+            os.path.join(
+                f"iter.{0:06d}",
+                "01.model_devi",
+                "task.000.000000",
+                "rc.rst7",
+            ),
🧰 Tools
🪛 Ruff (0.8.0)

701-701: Use format specifiers instead of percent format

(UP031)


40-40: Consider updating to f-strings for better readability

Multiple instances of %-formatting are used throughout the code. While they are marked with # noqa: UP031, consider updating to f-strings for better readability and maintainability.

Examples:

- train_dir = os.path.join("iter.%06d" % idx, "00.train")  # noqa: UP031
+ train_dir = os.path.join(f"iter.{idx:06d}", "00.train")

- md_dir = os.path.join("iter.%06d" % iter_idx, "01.model_devi")  # noqa: UP031
+ md_dir = os.path.join(f"iter.{iter_idx:06d}", "01.model_devi")

Also applies to: 701-701, 715-715, 724-724

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ad714ed and b697ac0.

📒 Files selected for processing (8)
  • doc/conf.py (1 hunks)
  • dpgen/auto_test/Gamma.py (3 hunks)
  • tests/auto_test/data.vasp.kp.gf/make_kp_test.py (1 hunks)
  • tests/generator/comp_sys.py (7 hunks)
  • tests/generator/gromacs/model_devi_case/model_devi.py (1 hunks)
  • tests/generator/test_make_fp.py (26 hunks)
  • tests/generator/test_make_md.py (9 hunks)
  • tests/generator/test_make_train.py (10 hunks)
✅ Files skipped from review due to trivial changes (3)
  • tests/generator/gromacs/model_devi_case/model_devi.py
  • tests/auto_test/data.vasp.kp.gf/make_kp_test.py
  • tests/generator/comp_sys.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • dpgen/auto_test/Gamma.py
🧰 Additional context used
🪛 Ruff (0.8.0)
tests/generator/test_make_train.py

207-207: Use format specifiers instead of percent format

(UP031)


550-550: Use format specifiers instead of percent format

(UP031)


605-605: Use format specifiers instead of percent format

(UP031)

tests/generator/test_make_fp.py

266-266: Use format specifiers instead of percent format

(UP031)


307-307: Use format specifiers instead of percent format

(UP031)


353-353: Use format specifiers instead of percent format

(UP031)


384-384: Use format specifiers instead of percent format

(UP031)


852-852: Use format specifiers instead of percent format

(UP031)


1384-1384: Use format specifiers instead of percent format

(UP031)

tests/generator/test_make_md.py

50-50: Use format specifiers instead of percent format

(UP031)


701-701: Use format specifiers instead of percent format

(UP031)


715-715: Use format specifiers instead of percent format

(UP031)

tests/generator/test_make_md.py Show resolved Hide resolved
@wanghan-iapcm wanghan-iapcm changed the title Fix: ignore up031 Fix: ignore UP031 Dec 4, 2024
@njzjz njzjz merged commit 7adbd6a into deepmodeling:devel Dec 4, 2024
7 checks passed
@wanghan-iapcm wanghan-iapcm deleted the fix-up031 branch December 5, 2024 00:48
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