Conversation
|
Warning Rate limit exceeded@AntObi has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 2 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (1)
WalkthroughA new development script Changes
Possibly related PRs
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
dev_scripts/filter_changelog.py (1)
9-26: Consider improving error handling and performance.The implementation could benefit from the following enhancements:
- Add error handling for file operations
- Pre-compile the regex pattern for better performance
- Consider creating a backup before modifying the file in-place
Apply this diff to improve the implementation:
+BOT_PATTERN = re.compile(r"\[github-actions\[bot\]\]") def remove_github_actions_entries(changelog_path: str) -> None: """Remove GitHub Actions bot entries from the changelog. Args: changelog_path: Path to the changelog file. + Raises: + OSError: If there are issues with file operations. """ + # Create a backup + backup_path = f"{changelog_path}.bak" + try: + with open(changelog_path, "r") as source, open(backup_path, "w") as backup: + backup.write(source.read()) + with open(changelog_path) as file: lines = file.readlines() with open(changelog_path, "w") as file: skip = False for line in lines: - if re.search(r"\[github-actions\[bot\]\]", line): + if BOT_PATTERN.search(line): skip = True elif skip and line.strip() == "": skip = False elif not skip: file.write(line) + except OSError as e: + if os.path.exists(backup_path): + with open(backup_path, "r") as backup, open(changelog_path, "w") as dest: + dest.write(backup.read()) + raise OSError(f"Error processing changelog: {e}") + finally: + if os.path.exists(backup_path): + os.remove(backup_path)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
dev_scripts/filter_changelog.py(1 hunks)docs/CHANGELOG.md(1 hunks)docs/conf.py(3 hunks)
🧰 Additional context used
🪛 GitHub Actions: SMACT CI
docs/conf.py
[warning] 389-389: File formatting issue: unnecessary trailing newline removed by ruff-format
🪛 LanguageTool
docs/CHANGELOG.md
[inconsistency] ~63-~63: A new year has begun. Did you mean “2025-09-26”?
Context: .../github.com/WMD-group/SMACT/tree/v2.8) (2024-09-26) [Full Changelog](https://github.com/W...
(DATE_NEW_YEAR)
[inconsistency] ~71-~71: A new year has begun. Did you mean “2025-08-30”?
Context: .../github.com/WMD-group/SMACT/tree/v2.7) (2024-08-30) [Full Changelog](https://github.com/W...
(DATE_NEW_YEAR)
[inconsistency] ~90-~90: A new year has begun. Did you mean “2025-07-10”?
Context: .../github.com/WMD-group/SMACT/tree/v2.6) (2024-07-10) [Full Changelog](https://github.com/W...
(DATE_NEW_YEAR)
[misspelling] ~100-~100: This expression is normally spelled as one or with a hyphen.
Context: ...:** - ElementCountsParallel example is non deterministic [#268](https://github.com/WMD-group/SM...
(EN_COMPOUNDS_NON_DETERMINISTIC)
[grammar] ~109-~109: There seems to be a noun/verb agreement error. Did you mean “develops” or “developed”?
Context: ...62) Merged pull requests: - Merge develop branch changes into the master branch [...
(SINGULAR_NOUN_VERB_AGREEMENT)
[typographical] ~230-~230: It appears that a comma is missing.
Context: ...detect invalid covalent compounds? #58 - is it possible to use SMACT to detect vali...
(COMMA_BEFORE_QUESTION_WITH_MD)
[style] ~294-~294: Would you like to use the Oxford spelling “Organize”? The spelling ‘Organise’ is also correct.
Context: ...github.com//issues/35) - Organise examples and workflows [#17](https://g...
(OXFORD_SPELLING_Z_NOT_S)
[typographical] ~311-~311: It appears that a comma is missing.
Context: ... is no longer backwards compatible #42 - Do you have plan for more advanced Pauling...
(COMMA_BEFORE_QUESTION_WITH_MD)
[uncategorized] ~312-~312: Possible missing article found.
Context: ...MD-group/SMACT/issues/42) - Do you have plan for more advanced Pauling rules for scr...
(AI_HYDRA_LEO_MISSING_A)
[locale-violation] ~337-~337: license must be spelled with a “c” when used as a noun in British English. Use “licence”.
Context: ...tObi](https://github.com/AntObi)) - New license [#24](https://github.com/WMD-group/SMA...
(LICENCE_LICENSE_NOUN_SINGULAR)
[style] ~363-~363: Would you like to use the Oxford spelling “polarizability”? The spelling ‘polarisability’ is also correct.
Context: .../issues/15) - Add atomic polarisability [#11](https://github.com/WMD-group/SMA...
(OXFORD_SPELLING_Z_NOT_S)
[style] ~374-~374: Would you like to use the Oxford spelling “polarizability”? The spelling ‘polarisability’ is also correct.
Context: ...o](https://github.com/keeeto)) - 11 add polarisability [#12](https://github.com/WMD-group/SMA...
(OXFORD_SPELLING_Z_NOT_S)
🔇 Additional comments (7)
dev_scripts/filter_changelog.py (2)
1-7: LGTM! Clean and well-structured imports.The imports and file structure are appropriate for the task at hand.
29-34: LGTM! Well-structured command-line interface.The CLI implementation is clean and user-friendly with appropriate argument handling.
docs/conf.py (3)
56-56: LGTM! Appropriate update to source_suffix.The change from string to list format allows for better extensibility in supporting multiple documentation file formats.
66-66: LGTM! Copyright year updated correctly.The copyright year has been appropriately updated to reflect the current year 2025.
76-76: LGTM! Version number updated consistently.The version update to 3.0.2 aligns with the changes documented in the changelog.
docs/CHANGELOG.md (2)
1-400: LGTM! Well-structured changelog following Keep a Changelog format.The changelog is consistently formatted with clear version headers, links, and categorised changes.
🧰 Tools
🪛 LanguageTool
[inconsistency] ~63-~63: A new year has begun. Did you mean “2025-09-26”?
Context: .../github.com/WMD-group/SMACT/tree/v2.8) (2024-09-26) [Full Changelog](https://github.com/W...(DATE_NEW_YEAR)
[inconsistency] ~71-~71: A new year has begun. Did you mean “2025-08-30”?
Context: .../github.com/WMD-group/SMACT/tree/v2.7) (2024-08-30) [Full Changelog](https://github.com/W...(DATE_NEW_YEAR)
[inconsistency] ~90-~90: A new year has begun. Did you mean “2025-07-10”?
Context: .../github.com/WMD-group/SMACT/tree/v2.6) (2024-07-10) [Full Changelog](https://github.com/W...(DATE_NEW_YEAR)
[misspelling] ~100-~100: This expression is normally spelled as one or with a hyphen.
Context: ...:** - ElementCountsParallel example is non deterministic [#268](https://github.com/WMD-group/SM...(EN_COMPOUNDS_NON_DETERMINISTIC)
[grammar] ~109-~109: There seems to be a noun/verb agreement error. Did you mean “develops” or “developed”?
Context: ...62) Merged pull requests: - Merge develop branch changes into the master branch [...(SINGULAR_NOUN_VERB_AGREEMENT)
[typographical] ~230-~230: It appears that a comma is missing.
Context: ...detect invalid covalent compounds? #58 - is it possible to use SMACT to detect vali...(COMMA_BEFORE_QUESTION_WITH_MD)
[style] ~294-~294: Would you like to use the Oxford spelling “Organize”? The spelling ‘Organise’ is also correct.
Context: ...github.com//issues/35) - Organise examples and workflows [#17](https://g...(OXFORD_SPELLING_Z_NOT_S)
[typographical] ~311-~311: It appears that a comma is missing.
Context: ... is no longer backwards compatible #42 - Do you have plan for more advanced Pauling...(COMMA_BEFORE_QUESTION_WITH_MD)
[uncategorized] ~312-~312: Possible missing article found.
Context: ...MD-group/SMACT/issues/42) - Do you have plan for more advanced Pauling rules for scr...(AI_HYDRA_LEO_MISSING_A)
[locale-violation] ~337-~337: license must be spelled with a “c” when used as a noun in British English. Use “licence”.
Context: ...tObi](https://github.com/AntObi)) - New license [#24](https://github.com/WMD-group/SMA...(LICENCE_LICENSE_NOUN_SINGULAR)
[style] ~363-~363: Would you like to use the Oxford spelling “polarizability”? The spelling ‘polarisability’ is also correct.
Context: .../issues/15) - Add atomic polarisability [#11](https://github.com/WMD-group/SMA...(OXFORD_SPELLING_Z_NOT_S)
[style] ~374-~374: Would you like to use the Oxford spelling “polarizability”? The spelling ‘polarisability’ is also correct.
Context: ...o](https://github.com/keeeto)) - 11 add polarisability [#12](https://github.com/WMD-group/SMA...(OXFORD_SPELLING_Z_NOT_S)
3-14: LGTM! Accurate changelog entries for version 3.0.2.The changelog entries accurately reflect the recent changes, including bug fixes and documentation updates.
|
|
||
| - Bump release v3 [\#347](https://github.com/WMD-group/SMACT/pull/347) ([AntObi](https://github.com/AntObi)) | ||
|
|
||
| ## [v2.8](https://github.com/WMD-group/SMACT/tree/v2.8) (2024-09-26) |
There was a problem hiding this comment.
Update dates to reflect current year.
The following dates should be updated to 2025:
- Line 63: "2024-09-26" → "2025-09-26"
- Line 71: "2024-08-30" → "2025-08-30"
- Line 90: "2024-07-10" → "2025-07-10"
Also applies to: 71-71, 90-90
🧰 Tools
🪛 LanguageTool
[inconsistency] ~63-~63: A new year has begun. Did you mean “2025-09-26”?
Context: .../github.com/WMD-group/SMACT/tree/v2.8) (2024-09-26) [Full Changelog](https://github.com/W...
(DATE_NEW_YEAR)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #364 +/- ##
===========================================
- Coverage 75.47% 75.43% -0.04%
===========================================
Files 31 31
Lines 2642 2642
===========================================
- Hits 1994 1993 -1
- Misses 648 649 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add a Changelog to the Documentation
Adding a Changelong
Description
This PR adds a changelog to SMACT. This changelog is hosted in the documentation and can be viewed on the readthedocs site. A filter script has been included to remove the githubactions[bot] PRs from the Changelog as these are not informative.
Additionally, all Mock modules have been removed from conf.py
Type of change
How Has This Been Tested?
Test Configuration:
Reviewers
N/A
Checklist
Summary by CodeRabbit
Release Notes
New Features
Documentation
CHANGELOGsection to the documentation structure.Chores