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

release schedule automation #181

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

sleeping-h
Copy link
Collaborator

@sleeping-h sleeping-h commented Feb 23, 2024

Summary by CodeRabbit

  • New Features
    • Restructured download options for various platforms, enhancing user experience with a more organized layout.
    • Added dynamic content capabilities in the installation guide and other documentation, allowing for more flexible content generation.
    • Introduced new shortcodes in the Hugo theme for improved content presentation, including download links for macOS and Windows, dynamic parameter retrieval, and spoiler elements.
  • Documentation
    • Updated the roadmap, bug reporting instructions, and FAQ with dynamic parameters for version numbers and citations, ensuring up-to-date information.
  • Chores
    • Modified the update schedule script to write JSON data, improving data structure and content management.

Copy link
Contributor

coderabbitai bot commented Feb 23, 2024

Walkthrough

The recent updates to the QGIS documentation and website have significantly improved the user experience for downloading software, accessing installation guides, and utilizing resources. Changes include dynamic content generation for more flexible documentation, updated download options across various platforms, and enhanced templating for FAQs and bug reporting. The introduction of shortcodes and JSON for versioning and parameters streamlines content updates and customization.

Changes

Files Change Summary
content/download/index.md Updated download options and layout for various platforms.
content/resources/.../index.md, roadmap.md, bug-reporting.md, faq.md Implemented dynamic content insertion and updated templating with parameters.
scripts/update-schedule.py Shifted from Python to JSON for version information, enhancing data structure and content.
themes/.../download-macos.html, download-windows.html Introduced download links for macOS and Windows, including version details and installer info.
themes/.../download-platforms-*.html Added shortcodes for displaying download information for various platforms.
themes/.../param*.html, spoiler-*.html New shortcodes for parameter retrieval and spoiler elements in Hugo Bulma Blocks theme.

🐰✨

In the world of code, where changes abound,
A rabbit hopped in, improvements were found.
With dynamic content and downloads so sleek,
QGIS's new face, is what users seek.
So here's to the team, with vision so bright,
Making maps and data, a pure delight.
🌍💻🌟

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 254669b and aa68482.
Files ignored due to path filters (2)
  • csv/schedule.csv is excluded by: !**/*.csv
  • data/conf.json is excluded by: !**/*.json
Files selected for processing (14)
  • content/download/index.md (2 hunks)
  • content/resources/installation-guide/index.md (17 hunks)
  • content/resources/roadmap.md (1 hunks)
  • content/resources/support/bug-reporting.md (1 hunks)
  • content/resources/support/faq.md (2 hunks)
  • scripts/update-schedule.py (2 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/download-macos.html (1 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/download-platforms-end.html (1 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/download-platforms-start.html (1 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/download-windows.html (1 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/param-link.html (1 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/param.html (1 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/spoiler-end.html (1 hunks)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/spoiler-start.html (1 hunks)
Files skipped from review due to trivial changes (2)
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/download-platforms-end.html
  • themes/hugo-bulma-blocks-theme/layouts/shortcodes/spoiler-end.html
Additional comments: 13
themes/hugo-bulma-blocks-theme/layouts/shortcodes/param.html (1)
  • 1-1: This Hugo shortcode template correctly fetches a configuration value based on a provided key. The syntax and logic are appropriate for the intended functionality.
themes/hugo-bulma-blocks-theme/layouts/shortcodes/param-link.html (1)
  • 1-1: This Hugo shortcode template correctly fetches a configuration value based on a provided key and applies the markdownify function to convert Markdown content to HTML. The syntax and logic are appropriate for the intended functionality.
themes/hugo-bulma-blocks-theme/layouts/shortcodes/spoiler-start.html (1)
  • 1-3: This Hugo shortcode template correctly creates a spoiler element with optional id and required title attributes. The syntax and logic are appropriate for the intended functionality.
themes/hugo-bulma-blocks-theme/layouts/shortcodes/download-macos.html (1)
  • 1-11: The use of dynamic data for version information in the macOS download buttons is correctly implemented, aligning with the PR objectives to make content dynamic.
themes/hugo-bulma-blocks-theme/layouts/shortcodes/download-windows.html (1)
  • 1-23: The use of dynamic data for version information and the correct use of absURL for generating an absolute URL for the installation guide link in the Windows download buttons are correctly implemented, aligning with the PR objectives to make content dynamic.
scripts/update-schedule.py (3)
  • 6-6: The addition of the json import statement is appropriate for the new functionality of writing JSON data to a file. This change aligns with the PR objectives of enhancing automation and maintainability.
  • 218-252: The JSON data structure for the release schedule is well-organized and includes a comprehensive set of parameters that cover various aspects of the release. This approach significantly improves the maintainability and flexibility of managing release information. However, ensure that all newly introduced parameters are documented and that their usage is clear to other contributors or systems that rely on this data.
  • 208-255: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-252]

The removal of writing calendar data to an .ics file, as mentioned in the summary, aligns with the shift towards using JSON for release information. This change likely simplifies the script and reduces the maintenance burden. Ensure that any systems or processes that previously depended on the .ics file are updated or have an alternative method to access the release schedule information.

Ensure all dependencies on the .ics file are identified and updated accordingly.

content/resources/installation-guide/index.md (5)
  • 33-35: The use of Hugo parameters ({{< param "release" >}}, {{< param "codename" >}}, etc.) to dynamically insert version information into the installation guide is a significant improvement. This approach ensures that the content remains up-to-date with minimal manual intervention. Ensure that all parameters used here are correctly defined in the site configuration and that their values are updated as part of the release process.
  • 58-62: The dynamic insertion of version information into the OSGeo4W installer section using Hugo parameters is correctly implemented. This ensures that the guide reflects the most current release information, enhancing the user experience by providing accurate and up-to-date installation instructions.
  • 113-113: The dynamic insertion of the latest stable QGIS version into the Debian/Ubuntu installation instructions using Hugo parameters is a good practice. It ensures that the guide remains relevant and reduces the need for manual updates. However, ensure that the {{< param "version" >}} parameter is consistently updated in the site configuration to reflect the latest stable version.
  • 171-171: The note about the next point release date dynamically inserted using a Hugo parameter ({{< param "nextpointreleasedate" >}}) is a useful addition for users looking forward to upcoming releases. This dynamic content insertion enhances the guide's usefulness by providing timely information about future releases.
  • 184-193: The dynamic insertion of version information into the repositories table using Hugo parameters is correctly implemented. This ensures that the guide reflects the most current release information for various Debian and Ubuntu versions, enhancing the user experience by providing accurate and up-to-date installation instructions. Ensure that all parameters used here are correctly defined in the site configuration and that their values are updated as part of the release process.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between aa68482 and c98e813.
Files selected for processing (1)
  • scripts/update-schedule.py (2 hunks)
Additional comments: 3
scripts/update-schedule.py (3)
  • 6-6: The addition of the json import statement is appropriate for handling JSON data operations, aligning with the PR's objective to shift version information handling to JSON for enhanced flexibility and maintainability.
  • 220-252: The shift to writing JSON data to data/conf.json instead of Python or .ics files is a significant improvement. This change enhances the maintainability and flexibility of the release information. However, ensure that all downstream consumers of this data are updated to handle JSON appropriately. Additionally, consider validating the JSON structure to prevent runtime errors due to malformed data.
  • 218-252: The addition of parameters to the JSON data, such as version details, release notes, and URLs for documentation and downloads, significantly enhances the dynamic content capabilities of the QGIS project's website and documentation. This aligns with the PR's objectives to ensure flexibility and adaptability. However, ensure that the URLs and version information are correctly formatted and tested to prevent broken links or incorrect information being displayed to users.

shortver = "".join(lr_version.split(".")[:2])
for f in [
# f"themes/qgis-theme/static/images/qgisorg_banner{shortver}.png", # TODO
f"content/product/visual-changelogs/visualchangelog{shortver}/index.md"
# f"content/product/visual-changelogs/visualchangelog{shortver}/index.md"
Copy link
Contributor

Choose a reason for hiding this comment

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

The commented-out file existence checks are placeholders for future validation, as noted in previous comments. It's crucial to either implement these checks or clarify the comments to avoid confusion. Implementing these checks would ensure that related resources are available for new releases, enhancing the robustness of the release process.

-        # f"themes/qgis-theme/static/images/qgisorg_banner{shortver}.png", # TODO
-        # f"content/product/visual-changelogs/visualchangelog{shortver}/index.md"
+        # Implement or clarify the purpose of these file existence checks.

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
# f"content/product/visual-changelogs/visualchangelog{shortver}/index.md"

"ltr_msi": f"https://qgis.org/downloads/QGIS-OSGeo4W-{ltr_version}-{ltr_binary}.msi",
"ltr_sha": f"https://qgis.org/downloads/QGIS-OSGeo4W-{ltr_version}-{ltr_binary}.sha256sum",
"weekly_msi": "https://download.osgeo.org/qgis/windows/weekly/?C=M&O=D",
}, f, indent=4)
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The script output confirms that the update-schedule.py script contains references to reading from and writing to the schedule.ics file. This indicates that the removal of the code responsible for writing to the .ics file could indeed impact other parts of the script that rely on this file, supporting the initial review comment. It is crucial to address these dependencies and ensure clear communication with stakeholders about the removal of .ics file generation.

Analysis chain

The removal of writing calendar data to an .ics file simplifies the release schedule automation process. However, ensure that any features or functionalities dependent on the .ics file are either updated or no longer required. This change should be communicated to stakeholders to manage expectations regarding calendar integration.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Check for references to 'schedule.ics' in the project.
rg --type py 'schedule.ics'
# Suggest communicating changes to stakeholders.
echo "Ensure stakeholders are informed about the removal of '.ics' file generation."

Length of output: 354

@dqunbp dqunbp merged commit 9ce98b3 into main Feb 26, 2024
1 of 3 checks passed
@sleeping-h sleeping-h deleted the 17875-create-data-file-with-latest-release-parameters branch March 11, 2024 12: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