-
Notifications
You must be signed in to change notification settings - Fork 382
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
feat: add grc20factory example #1913
Conversation
Signed-off-by: moul <[email protected]>
@leohhhn, here's a contract factory example. I haven't included safe objects due to my preference for improving the grc20 API first. I plan to create a new factory example for safe objects without grc20 to focus on redesigning grc20 thoroughly. @gfanton Do we now support txtar files directly in the same folder as .txtar, or should we keep them separate from .gno files? I want to include more usage examples with maketx without creating more invalid location files. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1913 +/- ##
==========================================
- Coverage 47.79% 47.78% -0.01%
==========================================
Files 393 393
Lines 61654 61663 +9
==========================================
+ Hits 29465 29466 +1
- Misses 29717 29725 +8
Partials 2472 2472 ☔ View full report in Codecov by Sentry. |
@moul For now, the only constraint is to create a Go test file that will run |
I think that txtar tests should be a built-in feature that follows a standard convention, like file extension. I prefer not to create Go files solely for configuring a developer pipeline. I prefer that when encountering a Go file in a realm, I know it requires my attention. cc @gfanton |
Signed-off-by: moul <[email protected]>
@moul It seems to me you want to have a testable example which works with I would prefer if However, long-term, I don't like to use txtar as documentation. While they are decently straightforward to use, thanks to @gfanton's acute design taste :), I think we should try to have something better to make testable examples. An idea that sprung up, was to have markdown files for documentation of a realm, with the code blocks being testable. @gfanton will create further issues on this. |
Testable examples are my ideal testing method. 👍
Keeping this testing method more internal is a good goal. Currently, the only way to test advanced logic is by writing scripts in gno.land/cmd/gnoland. Enhancing the tool to directly run txtar files from packages' folder would be an improvement. Making this feature "internal" could involve not documenting it in the main documentation, allowing advanced users to use it.
Yes, or alternatively, provide testable examples and adhere to documentation standards that include comments in .gno files. |
I believe this PR should be merged. Txtar enhancements can be addressed in a separate issue or PR. |
Signed-off-by: moul <[email protected]> <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> --------- Signed-off-by: moul <[email protected]>
Signed-off-by: moul [email protected]
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description