-
Notifications
You must be signed in to change notification settings - Fork 4
Validate code blocks in doc comments #224
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
Conversation
No description provided. |
…o validate-docs
…o validate-docs
…o validate-docs
Benchmark Resultsbench/FromIters.bench.mo
|
100 | 10_000 | 100_000 | |
---|---|---|---|
Array.fromIter | 53_373 |
5_152_334 |
51_503_949 |
List.fromIter | 35_436 |
3_421_823 |
34_204_824 |
List.fromIter . Iter.reverse | 56_149 |
5_392_962 |
53_907_349 |
Heap
100 | 10_000 | 100_000 | |
---|---|---|---|
Array.fromIter | 272 B |
272 B |
272 B |
List.fromIter | 272 B |
272 B |
272 B |
List.fromIter . Iter.reverse | 272 B |
272 B |
272 B |
Garbage Collection
100 | 10_000 | 100_000 | |
---|---|---|---|
Array.fromIter | 2.76 KiB |
234.79 KiB |
2.29 MiB |
List.fromIter | 3.51 KiB |
312.88 KiB |
3.05 MiB |
List.fromIter . Iter.reverse | 5.11 KiB |
469.17 KiB |
4.58 MiB |
bench/PureListStackSafety.bench.mo $({\color{gray}0\%})$
List Stack safety
Check stack-safety of the following pure/List
-related functions.
Instructions:
Heap:
Stable Memory:
Garbage Collection:
Instructions
pure/List.split | 27_403_700 |
pure/List.all | 9_301_156 |
pure/List.any | 9_401_585 |
pure/List.map | 26_005_117 |
pure/List.filter | 24_305_592 |
pure/List.filterMap | 30_606_216 |
pure/List.partition | 24_706_539 |
pure/List.join | 38_606_854 |
pure/List.flatten | 29_607_262 |
pure/List.take | 27_407_282 |
pure/List.drop | 11_004_661 |
pure/List.foldRight | 21_806_962 |
pure/List.merge | 36_411_001 |
pure/List.chunks | 61_513_741 |
pure/Queue | 161_571_999 |
Heap
pure/List.split | 272 B |
pure/List.all | 272 B |
pure/List.any | 272 B |
pure/List.map | 272 B |
pure/List.filter | 272 B |
pure/List.filterMap | 272 B |
pure/List.partition | 272 B |
pure/List.join | 272 B |
pure/List.flatten | 272 B |
pure/List.take | 272 B |
pure/List.drop | 272 B |
pure/List.foldRight | 272 B |
pure/List.merge | 272 B |
pure/List.chunks | 272 B |
pure/Queue | 272 B |
Garbage Collection
pure/List.split | 3.05 MiB |
pure/List.all | 328 B |
pure/List.any | 328 B |
pure/List.map | 3.05 MiB |
pure/List.filter | 3.05 MiB |
pure/List.filterMap | 3.05 MiB |
pure/List.partition | 3.05 MiB |
pure/List.join | 3.05 MiB |
pure/List.flatten | 3.05 MiB |
pure/List.take | 3.05 MiB |
pure/List.drop | 328 B |
pure/List.foldRight | 1.53 MiB |
pure/List.merge | 4.58 MiB |
pure/List.chunks | 7.63 MiB |
pure/Queue | 18.31 MiB |
Note: Renamed benchmarks cannot be compared. Refer to the current baseline for manual comparison.
* Only validate docs for changed Motoko files * Fix changed files logic in CI * Simplify * Try using 'ref' instead of 'sha' * Try 'origin/ref' * Try '--fetch-depth 0' * Remove changelog validation for branches merging into 'ai-docs' * Run 'main' canister method if found in doc example * Support 'no-validate' tag (separate from 'no-repl') * `Blob` docs (#236) * Update Blob docs * Fix 'toVarArray()' example * Update src/Blob.mo * `Text` docs (#246) * `Tuples` docs (#248) * `Result` docs (#244) * Update internal/PRNG docs (#249) * `pure/Queue` docs (#254) * `pure/Set` docs (#255) * Update pure/Set docs * some fixes * all examples passing * simplifications (wip) * more simplifications * add leading example --------- Co-authored-by: Claudio Russo <claudio@dfinity.org> * Update assertions in `pure/Set` doc comments (#273) * Update assertions in pure/Set * Fix * Add more transient keywords * `Iter` docs (#242) * Update Iter docs * Fix inconsistencies * Fix example * Remove unrelatd changes * `Runtime` docs (#245) * Update Runtime docs * Use 'no-validate' tags * Format * Add code style and documentation guidelines (#274) * Add code / documentation style guidelines * Fix CI * `pure/List` docs (#250) * Update assertions * Wrap examples in persistent actor * Refactor to use let bindings * Manual fixes * fix examples * missing toText doc * remove redundant type annotations --------- Co-authored-by: Kamil Listopad <listopadkamil@gmail.com> * `Queue` docs (#257) * Update Queue docs * beter names in example * unnecessary import --------- Co-authored-by: Kamil Listopad <listopadkamil@gmail.com> * `Set` docs (#258) * Update Set docs * AI docs pass * Format * Add transient keywords * fix broken examples * fix doc bug in pure/Set.mo * fix doc bug in pure/Set.mo * simplify pure/Set.mo doc * simplifications * more pure/Set.mo doc fixes (use assertions not => comments) * simplification up to min * done * remove tmp comment * simplify * Fix pure/Set imports in Set examples --------- Co-authored-by: Claudio Russo <claudio@dfinity.org> * `pure/Map` docs (#253) * Update pure/Map docs * first draft * rewrite delete example * tweaks --------- Co-authored-by: Claudio Russo <claudio@dfinity.org> * `Map` docs (#256) * Manual fixes for starting point * Update src/Map.mo * Update Map.mo * Update Map.mo * improve from/toPure set example * remove transient from pure/Map.mo * fix pure/Map.mo examples * wip * first draft * pure -> impure --------- Co-authored-by: Claudio Russo <claudio@dfinity.org> Co-authored-by: Gabor Greif <gabor@dfinity.org> * `Char` docs (#289) * Char docs * Update Char.mo * format --------- Co-authored-by: Gabor Greif <gabor@dfinity.org> * `Timer` docs (#247) * Update Timer docs * Manually fix example --------- Co-authored-by: Gabor Greif <gabor@dfinity.org> * Update API lockfile * Remove extraneous '// =>' in 'Blob.empty()' code example * chore: tweak `Char` (#290) * `Error` docs (#240) * Update Error docs * Format * Fix order of arguments * `Cycles` docs (#239) * Update Cycles docs * try bumping `moc` --------- Co-authored-by: Gabor Greif <gabor@dfinity.org> * `Principal` docs (#243) * Update Principal docs * Fix example * Make this validate for now... * `Stack` docs (#238) * Update Stack docs * Fix assertions * improvements * missing commit: simpler example --------- Co-authored-by: Kamil Listopad <listopadkamil@gmail.com> Co-authored-by: Kamil Listopad <kamil.listopad@dfinity.org> * Update instructions for setting up local dev environment (#281) * Update readme * Add Mops toolchain setup command * `Array` docs (#287) * Array docs * Fix example * Improve docs * Fix example * Apply suggestions from code review Co-authored-by: Claudio Russo <claudio@dfinity.org> --------- Co-authored-by: Claudio Russo <claudio@dfinity.org> * Only run changelog validation when merging into main branch * `Float` docs (#241) * Update Float docs * Skip examples with different behavior in interpreter * Update src/Float.mo --------- Co-authored-by: Gabor Greif <gabor@dfinity.org> * `Region` docs (#293) * Region docs * Manual fixes * Rename actor methods --------- Co-authored-by: Claudio Russo <claudio@dfinity.org> Co-authored-by: Kamil Listopad <listopadkamil@gmail.com> Co-authored-by: Gabor Greif <gabor@dfinity.org> Co-authored-by: Kamil Listopad <kamil.listopad@dfinity.org>
Progress:
include=
referencespersistent actor { ... }
when not otherwise specified (we can be more strict about this in the future)// => ...
comments into assertionslet
bindings)Resolves #223.