Skip to content

Add a Changelog to the Documentation#364

Merged
AntObi merged 8 commits into
developfrom
changelog
Jan 14, 2025
Merged

Add a Changelog to the Documentation#364
AntObi merged 8 commits into
developfrom
changelog

Conversation

@AntObi

@AntObi AntObi commented Jan 14, 2025

Copy link
Copy Markdown
Collaborator

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

  • This change requires a documentation update

How Has This Been Tested?

  • Verified that the changelog appears in the locally built documentation.

Test Configuration:

  • Python version: 3.10
  • Operating System: macOS

Reviewers

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a script to filter out GitHub Actions bot entries from the changelog.
  • Documentation

    • Updated documentation configuration.
    • Updated copyright year to 2025.
    • Incremented documentation version to 3.0.2.
    • Added a dedicated CHANGELOG section to the documentation structure.
  • Chores

    • Refined changelog documentation.
    • Removed mock module implementations in documentation configuration.

@AntObi AntObi added docs housekeeping House-Keeping labels Jan 14, 2025
@coderabbitai

coderabbitai Bot commented Jan 14, 2025

Copy link
Copy Markdown
Contributor

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 @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 baa2eae and efcfd21.

📒 Files selected for processing (1)
  • .github/workflows/update-changelog.yml (1 hunks)

Walkthrough

A new development script filter_changelog.py has been introduced to remove GitHub Actions bot entries from the changelog. Simultaneously, the documentation configuration file conf.py was updated with version and copyright year changes. The project's changelog CHANGELOG.md was also modified to document recent version updates, including bug fixes and enhancements across versions 3.0.2, 3.0.1, and 3.0.

Changes

File Change Summary
dev_scripts/filter_changelog.py Added new script to filter out GitHub Actions bot entries from changelog
docs/conf.py - Updated copyright year to 2025
- Incremented release version to 3.0.2
- Changed source_suffix to list format
- Removed mock module implementation
docs/CHANGELOG.md Updated with version details including bug fixes and enhancements for versions 3.0.2, 3.0.1, and 3.0
docs/index.rst Added new entry for CHANGELOG in the toctree

Possibly related PRs

  • Bump release v3 #347: The introduction of the check-live-links.yml workflow in this PR relates to the main PR's changes as both involve modifications to the handling of GitHub Actions, specifically in relation to filtering or managing entries in changelogs or workflows.
  • Include crystal space utils in package build #361: This PR includes changes to the setup.py file that also involve updates to the package structure, which may relate to the overall organization and management of scripts like the one introduced in the main PR.
  • Sync Develop Branch with Master branch #362: The synchronization of branches in this PR may indirectly relate to the main PR's changes, as it ensures that all recent updates, including the new script for filtering changelog entries, are integrated into the main development line.

Poem

🐰 A changelog cleaner, swift and bright,
Filtering bot entries out of sight.
Version numbers dance and sway,
Documentation finds its way!
CodeRabbit's magic, clean and neat 🧹


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 or @coderabbitai title 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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:

  1. Add error handling for file operations
  2. Pre-compile the regex pattern for better performance
  3. 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

📥 Commits

Reviewing files that changed from the base of the PR and between eb7ef2a and dbaa5e6.

📒 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.

Comment thread docs/CHANGELOG.md

- 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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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

codecov Bot commented Jan 14, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.43%. Comparing base (95a23b8) to head (efcfd21).
Report is 192 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AntObi AntObi merged commit 914054b into develop Jan 14, 2025
@AntObi AntObi deleted the changelog branch January 14, 2025 17:14
@coderabbitai coderabbitai Bot mentioned this pull request Feb 25, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Apr 2, 2025
9 tasks
KingaMas pushed a commit to KingaMas/SMACT that referenced this pull request Apr 25, 2025
Add a Changelog to the Documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant