Skip to content

Array docs #287

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 6 commits into from
Apr 15, 2025
Merged

Array docs #287

merged 6 commits into from
Apr 15, 2025

Conversation

rvanasa
Copy link
Collaborator

@rvanasa rvanasa commented Apr 11, 2025

No description provided.

@rvanasa rvanasa requested a review from a team as a code owner April 11, 2025 17:44
Copy link

github-actions bot commented Apr 11, 2025

No description provided.

Co-authored-by: Claudio Russo <claudio@dfinity.org>
@rvanasa rvanasa mentioned this pull request Apr 15, 2025
@rvanasa rvanasa merged commit d8c03e4 into ai-docs Apr 15, 2025
11 checks passed
@rvanasa rvanasa deleted the array-docs branch April 15, 2025 19:17
rvanasa added a commit that referenced this pull request Apr 15, 2025
* 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>
rvanasa added a commit that referenced this pull request Apr 15, 2025
* Progress

* Progress

* Set up 'mo:base' imports in code snippets

* Update 'Func' doc comments

* Remove unused logic

* Add console output for non-Motoko snippets

* Wrap in actor and extract imports to top of file

* Resolve code snippet line numbers

* Add line number to errors

* Support custom actor wrappers

* Reduce console output for successful tests

* Remove 'validate:docs' from 'validate' npm command due to long runtime

* Remove canister logs from console output for now

* Convert '// =>' comments into assertions

* Fix running without test filters

* Add missing 'initialize' snippet in 'pure/Queue'

* Fix code generation corner case for assertion comments

* Account for 'ignore' keyword in front of line with assertion comment

* Misc fixes

* Show code snippet after result

* Sort file paths for deterministic console output

* Update doc comments

* Check for extra leading/trailing newline in code blocks

* Add color to GHA docs validation

* Update doc comments in Array module

* Update more doc comments; fix bug in 'Array.enumerate()' / 'VarArray.enumerate()'

* Support secondary '//' line comment for '// =>' assertions

* More doc comment fixes

* Fix examples in InternetComputer module

* Fix more doc comments

* Update examples in mutable List module

* Improve virtual file paths for snippets

* More mutable List doc improvements

* Add summary to CLI output

* Fix

* Fix Int module examples

* Adjust summary formatting

* Fix Nat module examples

* Fix more snippets

* Add individual files to docs validation summary

* Update CI

* Use more concise console output when validating all docs

* Improve console output

* AI docs base branch (#237)

* 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>

---------

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>
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