Skip to content

Conversation

tuancoltech
Copy link
Member

@tuancoltech tuancoltech commented Apr 13, 2025

Add new section in README on how to publish and test a snapshot release

Summary by CodeRabbit

  • Documentation
    • Added a new section in the README.md detailing steps for publishing a snapshot for local development and testing, enhancing the guidance for developers.

Copy link

coderabbitai bot commented Apr 13, 2025

Walkthrough

The update adds a new section in the README titled "How to publish a snapshot for local development & testing?". This section outlines a step-by-step process for publishing a snapshot version of the library for local testing. The guide details modifications to the build.gradle file (updating libVersion, versionCode, and the publication version), switching the Maven repository configuration to use mavenLocal(), executing a Gradle publish command, and updating the app's repository settings. Note that no public API declarations were modified. In line with elimu.ai's mission to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽 and math🔢 within 6 months, this guide supports developers in maintaining a smooth workflow.

Changes

File(s) Change Summary
README.md Added a new section providing a step-by-step guide on publishing a snapshot for local development. The guide covers updating gradle configurations, switching to mavenLocal(), executing the publish command, and modifying the app's repository settings for snapshot implementation.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant BG as Build.gradle
    participant MV as MavenLocal
    participant Gradle as Gradle CLI
    participant App as App Build.gradle
    participant Test as Local Testing

    Dev->>BG: Update libVersion, versionCode, publication version
    Dev->>BG: Replace Maven repository with mavenLocal()
    Dev->>Gradle: Execute publish release command
    Gradle->>MV: Publish snapshot version
    Dev->>App: Add mavenLocal() to repositories & implement snapshot version
    Dev->>Test: Test snapshot locally
Loading

Possibly related PRs

  • Prepare release 1.0.5 #15: The changes in the main PR focus on providing instructions for modifying the libVersion and versionCode in the build.gradle file, while the retrieved PR specifically updates these variables to reflect a new version, indicating a direct relationship at the code level.

Suggested reviewers

  • jo-elimu

🪧 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.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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

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

🧹 Nitpick comments (3)
README.md (3)

42-42: Improve URL Formatting for Markdownlint Compliance

The first step contains a bare URL which may trigger markdown lint warnings (MD034). Consider formatting it as a proper markdown link to improve readability and ensure compliance. For example:

-1. Change `libVersion`, `versionCode` and publication `version` in https://github.com/elimu-ai/common-utils/blob/main/utils/build.gradle
+1. Change `libVersion`, `versionCode` and publication `version` in [build.gradle](https://github.com/elimu-ai/common-utils/blob/main/utils/build.gradle)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

42-42: Bare URL used
null

(MD034, no-bare-urls)


45-45: Fix Typographical Error

There is a minor typo in step 4. The word "repositsories" should be corrected to "repositories" to avoid confusion.

-4. In app side: Add `mavenLocal()` to `repositsories` block in `build.gradle` script
+4. In app side: Add `mavenLocal()` to `repositories` block in `build.gradle` script

46-46: Clarify Snapshot Version Placeholder

In step 5, the placeholder $snapshot_version is used. It might be helpful to add a brief note or example (for example, 1.0.1-SNAPSHOT) to clarify that developers should replace the placeholder with the actual snapshot version.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0dff681 and 6c8b0e2.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

42-42: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build (windows-latest, 17)
  • GitHub Check: build (windows-latest, 21)
🔇 Additional comments (1)
README.md (1)

40-48: Great New Snapshot Publishing Section!

The new section is well-organized and provides clear, step-by-step instructions for publishing and testing a snapshot release. This level of clarity is especially valuable as it supports both experienced and new contributors—and aligns with elimu.ai's mission to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽 and math🔢 within 6 months.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

42-42: Bare URL used
null

(MD034, no-bare-urls)

Copy link

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

♻️ Duplicate comments (1)
README.md (1)

45-45: Step 4 – Configure App-side Repository Settings.
This step instructs developers to add mavenLocal() to the repositories block in the app's build.gradle script. Note that a similar recommendation was previously provided by jo-elimu. If this repeats earlier guidance, ensure that documentation remains consistent.

🧹 Nitpick comments (2)
README.md (2)

42-42: Step 1 – Modify Build Script Parameters.
The instruction "Change libVersion, versionCode and publication version in https://github.com/elimu-ai/common-utils/blob/main/utils/build.gradle" is clear. However, consider formatting the URL as a markdown link (e.g., [build.gradle](https://github.com/elimu-ai/common-utils/blob/main/utils/build.gradle)) to adhere to markdownlint guidelines (MD034: no-bare-urls) and improve readability.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

42-42: Bare URL used
null

(MD034, no-bare-urls)


46-46: Step 5 – Implement Snapshot Version Dependency.
Clarify what the placeholder $snapshot_version should be replaced with. Providing an example or linking to further documentation would enhance developer understanding and reduce potential confusion when updating the dependency.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c8b0e2 and 68de713.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

42-42: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build (windows-latest, 21)
  • GitHub Check: build (windows-latest, 17)
🔇 Additional comments (4)
README.md (4)

40-41: Introduction of Snapshot Publishing Section is clear and informative.
The new section "How to publish a snapshot for local development & testing?" provides a straightforward guide that will help developers quickly understand the process. This aligns nicely with elimu.ai's mission to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽, and math🔢 within 6 months.


43-43: Step 2 – Update Repository Configuration.
The direction to replace the existing Maven repository with mavenLocal() under the publishing -> repositories block is precise and practical for local snapshot testing.


44-44: Step 3 – Execute Gradle Publish Command.
The command ./gradlew clean utils:publishReleasePublicationToMavenLocal is correctly provided and clearly indicates the necessary action for publishing the snapshot release.


47-48: Step 6 – Confirm Testing Readiness.
The final step "You're now ready to test the snapshot!" effectively concludes the guide on a positive note. It reassures developers that after following the instructions, the snapshot is ready for testing.

Copy link
Member

@jo-elimu jo-elimu left a comment

Choose a reason for hiding this comment

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

@tuancoltech Made a suggestion.

Co-authored-by: Jo G. <1451036+jo-elimu@users.noreply.github.com>
@tuancoltech tuancoltech requested a review from jo-elimu April 14, 2025 15:14
@tuancoltech
Copy link
Member Author

@tuancoltech Made a suggestion.

@jo-elimu Thanks. I've pushed the suggested changes.

Copy link

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

🧹 Nitpick comments (2)
README.md (2)

42-42: Enhance Markdown Link Formatting for Gradle File Reference

The bare URL in step 1 can be formatted as a clickable markdown link. This change not only improves readability but also complies with markdown best practices and addresses the MD034 static analysis warning.

-1. Change the `libVersion` and `versionCode` in https://github.com/elimu-ai/common-utils/blob/main/utils/build.gradle
+1. Change the `libVersion` and `versionCode` in [utils/build.gradle](https://github.com/elimu-ai/common-utils/blob/main/utils/build.gradle)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

42-42: Bare URL used
null

(MD034, no-bare-urls)


40-48: Clear and Detailed Snapshot Publishing Instructions

The newly added section, "How to publish a snapshot for local development & testing?", provides clear, actionable steps for publishing and testing a snapshot release. The instructions are easy to follow and directly support the improved developer workflow.

A couple of suggestions:

  • In step 5, consider clarifying whether $snapshot_version is a placeholder to be replaced with the actual snapshot version.
  • Ensure consistency with previously suggested changes (e.g., adding mavenLocal() to the app’s repositories) to avoid redundancy.

This documentation is essential in streamlining the release process and aligns with elimu.ai's mission to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽 and math🔢 within 6 months.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

42-42: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68de713 and 54e4117.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

42-42: Bare URL used
null

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build (windows-latest, 21)
  • GitHub Check: build (windows-latest, 17)

@tuancoltech tuancoltech merged commit 2265f1d into main Apr 15, 2025
6 checks passed
@tuancoltech tuancoltech deleted the doc/add_snapshot_publish_guide branch April 15, 2025 01:07
@coderabbitai coderabbitai bot mentioned this pull request Apr 27, 2025
11 tasks
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