Skip to content

docs: update packages design dock #1616

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

Merged
merged 4 commits into from
Jun 23, 2025
Merged

Conversation

derberg
Copy link
Member

@derberg derberg commented Jun 17, 2025

Resolves #1610

Summary by CodeRabbit

  • Documentation
    • Updated testing guidelines to prioritize using dummy AsyncAPI documents in test cases, while still allowing the use of mocked Parser objects.
    • Added criteria for template quality, highlighting the importance of acceptance tests with Microcks for mocks and runtime validation.

Copy link

changeset-bot bot commented Jun 17, 2025

⚠️ No Changeset found

Latest commit: 0f7a78f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Jun 17, 2025

Walkthrough

The guideline in the packages/README.md was updated to specify that test cases for helpers should always prioritize using dummy AsyncAPI documents, though mocking fake Parser objects is still permitted. Additionally, a new point was added about templates being considered ready if they have acceptance tests configured with Microcks. No changes were made to code, exports, or public entities.

Changes

File(s) Change Summary
packages/README.md Revised guideline wording to prioritize dummy AsyncAPI documents in helper tests, allowing mocks; added Microcks testing acceptance criteria.

Assessment against linked issues

Objective Addressed Explanation
Update template development Assumptions and Principles documentation (#1610)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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 anywhere in the PR title to generate the title automatically.

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 (1)
packages/README.md (1)

24-24: Fix capitalization and improve clarity of the testing guideline
The second sentence starts with a lowercase letter and could be merged for better readability.

-6. Helpers need dedicated tests. Always push for having test cases presented through dummy AsyncAPI documents. mock fake Parser objects inside tests.
+6. Helpers need dedicated tests. Always push for having test cases presented through dummy AsyncAPI documents, though mocking fake Parser objects inside tests is still permitted.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 596117a and 8c1c383.

📒 Files selected for processing (1)
  • packages/README.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: Test NodeJS PR - macos-13

Copy link
Contributor

@Adi-204 Adi-204 left a comment

Choose a reason for hiding this comment

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

@derberg I can only see changes done in Helpers testing point. But in issue I propose about adding point regarding Microcks as it was mention as TODO at the end of file.

image

Or we can't add point regarding Microcks for now?

Copy link
Member Author

derberg commented Jun 17, 2025

nah, sorry, my VSCode had a hiccup and autosafe stopped working

Copy link
Member Author

derberg commented Jun 17, 2025

updated

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)
packages/README.md (2)

24-24: Clarify and correct test guideline wording.

The sentence "Mock fake Parser objects inside tests only is special cases where using dummy document is not an option." is grammatically incorrect and hard to parse. Consider rephrasing for clarity:

“Helpers need dedicated tests. Always provide test cases using dummy AsyncAPI documents, and mock Parser objects only when dummy documents cannot be used.”


31-31: Fix grammatical agreement and improve clarity.

Change the wording to address number agreement and readability:

“Templates are considered ready for use if they have acceptance tests configured with Microcks, which provides mocks and a runtime environment. An example implementation is available in tests for websocket.”

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c1c383 and c127637.

📒 Files selected for processing (1)
  • packages/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/README.md

[style] ~27-~27: This phrase is redundant. Consider writing “consulted”.
Context: ...ew template feature is added it must be consulted with: - Spec references docs using [raw d...

(CONSULT_WITH)


[grammar] ~31-~31: Did you mean “are” or “were”?
Context: ...nt tests can be executed. 11. Templates is considered to be of a good quality and ...

(SENT_START_NNS_IS)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test NodeJS PR - macos-13
  • GitHub Check: Test NodeJS PR - windows-latest

@derberg derberg moved this to In Progress in Maintainers work Jun 18, 2025
@derberg derberg changed the title chore: update packages design dock docs: update packages design dock Jun 23, 2025
Copy link
Collaborator

@Florence-Njeri Florence-Njeri left a comment

Choose a reason for hiding this comment

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

Hey @derberg One small change request and it will be good to merge

Co-authored-by: Florence Njeri <[email protected]>
@derberg derberg requested a review from Florence-Njeri June 23, 2025 14:19
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)
packages/README.md (1)

31-31: Fix grammar in the template readiness guideline.

The phrase starts with “A templates is…” and misses a verb in the example sentence. A more grammatically correct version could be:

  • “A template is considered of good quality and ready for use if it has acceptance tests configured using Microcks, which provides both mocks and runtime support. An example implementation is available at tests for websocket.”
🧹 Nitpick comments (1)
packages/README.md (1)

24-24: Clarify the test guidance grammar.

The sentence “Mock fake Parser objects inside tests only is special cases where using dummy document is not an option” contains a typo and grammatical error. Consider rephrasing for clarity:

  • “Mock fake Parser objects inside tests only in special cases where using dummy documents is not an option.”
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c127637 and c9408c1.

📒 Files selected for processing (1)
  • packages/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/README.md

[style] ~27-~27: This phrase is redundant. Consider writing “consulted”.
Context: ...ew template feature is added it must be consulted with: - Spec references docs using [raw d...

(CONSULT_WITH)


[uncategorized] ~30-~30: A comma might be missing here.
Context: ...s a lot of control on tests running. We can for example have templates:test scrip...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~30-~30: A comma might be missing here.
Context: ...of control on tests running. We can for example have templates:test script that will ...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~30-~30: You might be missing the article “a” here.
Context: ... tests running. We can for example have templates:test script that will run tes...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[grammar] ~31-~31: The plural noun “templates” cannot be used with the article “A”. Did you mean “A template” or “templates”?
Context: ...the relevant tests can be executed. 11. A templates is considered to be of a good quality a...

(A_NNS)


[grammar] ~31-~31: You should probably use: “are”.
Context: ... tests can be executed. 11. A templates is considered to be of a good quality and ...

(AGREEMENT_SENT_START)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: Test NodeJS PR - macos-13

Copy link

@derberg
Copy link
Member Author

derberg commented Jun 23, 2025

/rtm

@asyncapi-bot asyncapi-bot merged commit 1b21c32 into asyncapi:master Jun 23, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Maintainers work Jun 23, 2025
@derberg derberg moved this from Done to Archive in Maintainers work Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Archive
Development

Successfully merging this pull request may close these issues.

[draft]: update template development Assumptions and Principles
4 participants