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

docs: Use myst_parser to include CHANGELOG.md instead of rst #245

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

mansenfranzen
Copy link
Owner

@mansenfranzen mansenfranzen commented Apr 7, 2024

Type

documentation, enhancement


Description

  • Added 'myst_parser' to the Sphinx configuration in docs/source/conf.py to enable Markdown support.
  • Updated the changelog inclusion in docs/source/reference/changelog.rst to use 'CHANGELOG.md' with 'myst_parser'.
  • Included 'myst_parser' in the optional documentation dependencies in pyproject.toml.

Changes walkthrough

Relevant files
Configuration changes
conf.py
Add 'myst_parser' Extension to Sphinx Configuration           

docs/source/conf.py

  • Added 'myst_parser' to the Sphinx extensions list.
+1/-0     
Documentation
changelog.rst
Update Changelog Inclusion to Use Markdown                             

docs/source/reference/changelog.rst

  • Changed the inclusion from 'changelog.rst' to 'CHANGELOG.md' using
    'myst_parser'.
  • +2/-1     
    Dependencies
    pyproject.toml
    Include 'myst_parser' in Optional Documentation Dependencies

    pyproject.toml

    • Added 'myst_parser' as an optional dependency for documentation.
    +3/-1     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 7, 2024
    Copy link
    Contributor

    github-actions bot commented Apr 7, 2024

    PR Description updated to latest commit (8dedf0b)

    Copy link
    Contributor

    github-actions bot commented Apr 7, 2024

    PR Review

    ⏱️ Estimated effort to review [1-5]

    1, because the changes are straightforward and pertain to documentation and configuration updates.

    🧪 Relevant tests

    No

    🔍 Possible issues

    No

    🔒 Security concerns

    No

    Code feedback:
    relevant filedocs/source/reference/changelog.rst
    suggestion      

    Ensure the CHANGELOG.md file is properly linked and rendered in the Sphinx documentation. This change facilitates the use of Markdown for the changelog, leveraging myst_parser for compatibility with Sphinx. [important]

    relevant line.. include:: ../../../CHANGELOG.md

    relevant filepyproject.toml
    suggestion      

    Adding myst-parser as an optional dependency under the [tool.poetry.extras] section for docs ensures that Sphinx can parse Markdown files, enhancing documentation flexibility. [important]

    relevant linemyst-parser = {version = "^2.0", optional = true }


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    github-actions bot commented Apr 7, 2024

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Enhancement
    Correct the MyST parser option in the Sphinx include directive.

    To include the CHANGELOG.md using MyST parser, ensure that the :parser: option is
    correctly specified. The correct syntax should be :myst_parser: instead of
    myst_parser.sphinx_. This change ensures that Sphinx correctly utilizes the MyST parser
    for the Markdown file.

    docs/source/reference/changelog.rst [1-2]

     .. include:: ../../../CHANGELOG.md
    -   :parser: myst_parser.sphinx_
    +   :myst_parser:
     
    Best practice
    Sort the optional dependencies alphabetically in pyproject.toml.

    When adding a new package to the pyproject.toml, it's a good practice to keep the optional
    dependencies sorted alphabetically within their respective sections. This enhances
    readability and maintainability of the dependency list. Therefore, consider moving the
    myst-parser line so that it appears in alphabetical order within the optional dependencies
    section.

    pyproject.toml [37-38]

    +myst-parser = {version = "^2.0", optional = true }
     sphinxcontrib-mermaid = { version = "^0.9.0", optional = true }
    -myst-parser = {version = "^2.0", optional = true }
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    @mansenfranzen mansenfranzen merged commit e6fe9e1 into main Apr 7, 2024
    33 of 36 checks passed
    @mansenfranzen mansenfranzen deleted the docs_use_changelog_md_instead_of_rst branch April 7, 2024 10:01
    @github-actions github-actions bot mentioned this pull request Apr 7, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    documentation Improvements or additions to documentation enhancement New feature or request Review effort [1-5]: 1
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    None yet

    1 participant