-
Notifications
You must be signed in to change notification settings - Fork 13
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
refactor(docs): add how to test typegraphs doc #798
Conversation
@zifeo should I include the bitnami/minIo upgrade from 2022 to 2024 in this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good progress! Yes, you can bump the docker images :)
@coderabbitai review |
WalkthroughThis update includes a version upgrade for the Minio service in the Docker Compose configuration to enhance its capabilities. A comprehensive guide for testing typegraphs within the Metatype SDK has been introduced, with setup instructions for both TypeScript and Python. Additionally, minor formatting adjustments across various documentation files improve clarity and readability without impacting functionality. Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
@afmika @Natoandro is there a way for a user to start a typegate instance programmatically, without shell commands? |
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range, codebase verification and nitpick comments (2)
website/docs/guides/test-your-typegraph/index.mdx (2)
99-120
: Ensure typegraph is properly initialized.The test cases use
tg
directly, but the initialization oftg
is not shown in the provided code. Ensure thattg
is properly initialized before running the tests.
- Initialization of
tg
is missing in the provided code snippet.Analysis chain
Ensure typegraph is properly initialized.
The test cases use
tg
directly, but the initialization oftg
is not shown in the provided code. Ensure thattg
is properly initialized before running the tests.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the initialization of `tg` in the provided code. # Test: Search for the initialization of `tg`. Expect: Initialization code for `tg`. rg --type python -A 5 $'tg = 'Length of output: 62
Script:
#!/bin/bash # Description: Verify the initialization of `tg` in the provided code. # Test: Search for the initialization of `tg`. Expect: Initialization code for `tg`. rg --type typescript -A 5 $'tg = 'Length of output: 70
Script:
#!/bin/bash # Description: Verify the initialization of `tg` in the provided code. # Test: Search for the initialization of `tg`. Expect: Initialization code for `tg`. rg --glob '*.ts' -A 5 $'tg = 'Length of output: 18693
163-227
: Ensure typegate is properly launched.The TODO comment indicates that the typegate should be launched programmatically. However, there is no implementation for this in the code. Please ensure that the typegate is properly launched before running the tests.
- File:
website/docs/guides/test-your-typegraph/index.mdx
- Lines: 163-227
Analysis chain
Ensure typegate is properly launched.
The TODO comment indicates that the typegate should be launched programmatically. Ensure that the typegate is properly launched before running the tests.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the launching of the typegate in the provided code. # Test: Search for the launching of the typegate. Expect: Code to launch the typegate programmatically. rg --type python -A 5 $'launch typegate'Length of output: 72
Script:
#!/bin/bash # Description: Verify the launching of the typegate in the provided code. # Test: Search for the launching of the typegate. Expect: Code to launch the typegate programmatically. rg --type typescript -A 5 'launch typegate'Length of output: 80
Script:
#!/bin/bash # Description: Verify the launching of the typegate in the provided code. # Test: Search for the launching of the typegate. Expect: Code to launch the typegate programmatically. rg -A 5 'launch typegate'Length of output: 509
👍 worth taking coderrabbit's feedback into account |
…ocs/how-to-test-typegraph
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (2)
website/docs/guides/test-your-typegraph/index.mdx (2)
19-23
: Clarify the installation step.The installation step should explicitly mention that it is for the TypeScript SDK.
- To test typegraphs in the _typescript_ SDK, you first need to add _vitest_ as a dev dependency to your metatype project. + To test typegraphs in the _TypeScript_ SDK, you first need to add _vitest_ as a dev dependency to your Metatype project.
122-122
: Clarify the purpose of the tests.The description should clarify that the tests are for validating the typegraph's functionality.
- The above were simple tests you can execute against the output of the typegraph function. You can also do a serialization test to check if the typegraph is serialized successfully. + The above are simple tests to validate the functionality of your typegraph. You can also perform a serialization test to ensure the typegraph is serialized successfully.
How to test your typegraphs
documentationMigration notes
No Migrations Needed
Summary by CodeRabbit
New Features
Documentation
Meta CLI
upgrade instructions.typegraph
package for better clarity.Chores