Skip to content
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

Add dosctrings everywhere in std and core libraries #1066

Closed
sezna opened this issue Jan 6, 2022 · 6 comments
Closed

Add dosctrings everywhere in std and core libraries #1066

sezna opened this issue Jan 6, 2022 · 6 comments
Labels
forc-doc Everything related to the `forc doc` command plugin. good first issue Good for newcomers lib: core Core library lib: std Standard library P: high Should be looked at if there are no critical issues left

Comments

@sezna
Copy link
Contributor

sezna commented Jan 6, 2022

While forc doc is not fully functional yet, we really should be adding docstrings to everything in the standard library.

@adlerjohn adlerjohn transferred this issue from FuelLabs/sway-lib-std Mar 29, 2022
@adlerjohn adlerjohn added good first issue Good for newcomers lib: std Standard library labels Mar 29, 2022
@mohammadfawaz mohammadfawaz changed the title Docstrings Add dosctrings everywhere in the std and core libraries Jul 11, 2022
@mohammadfawaz mohammadfawaz changed the title Add dosctrings everywhere in the std and core libraries Add dosctrings everywhere in std and core libraries Jul 11, 2022
@mitchmindtree mitchmindtree added lib: core Core library documentation P: high Should be looked at if there are no critical issues left labels Oct 27, 2022
@mitchmindtree
Copy link
Contributor

Now that #2869 is implemented, now would be a great time to get started on this!

The docs are still looking quite raw today, but having fleshed out documentation in core and std would act as a great real-world test case for landing new features like doc tests, inter-module linking, etc.

@mitchmindtree mitchmindtree added forc-doc Everything related to the `forc doc` command plugin. and removed documentation labels Oct 27, 2022
@eureka-cpu
Copy link
Contributor

Is this still open? I believe the docs in at least std are looking pretty good

@mitchmindtree
Copy link
Contributor

Loads of the items and modules in std are still missing docs, and most of those that have docs have something like a single sentence that doesn't give much context about the purpose of the type, how to use it correctly, no examples, etc.

I think the "standard" of std docs we should hold ourselves to is Rust's std: https://doc.rust-lang.org/std/index.html. It totally outclasses us at the moment.

That said, this issue is a bit vague - maybe we're better off opening a tracking issue that sets a standard for how we expect std items to be documented, and a checklist for going through them? All methods/functions should likely have examples at least, however we'd likely be better off tackling #3176 before adding too many examples, otherwise they'll almost certainly fall out of date without close attention.

@eureka-cpu
Copy link
Contributor

Loads of the items and modules in std are still missing docs, and most of those that have docs have something like a single sentence that doesn't give much context about the purpose of the type, how to use it correctly, no examples, etc.

I think the "standard" of std docs we should hold ourselves to is Rust's std: https://doc.rust-lang.org/std/index.html. It totally outclasses us at the moment.

That said, this issue is a bit vague - maybe we're better off opening a tracking issue that sets a standard for how we expect std items to be documented, and a checklist for going through them? All methods/functions should likely have examples at least, however we'd likely be better off tackling #3176 before adding too many examples, otherwise they'll almost certainly fall out of date without close attention.

@gr00vytvniks this could be a good issue for you to take on.

@gr00vytvniks
Copy link
Contributor

If this is still a relevant issue I'd be happy to take it on :)

@bitzoic
Copy link
Member

bitzoic commented Mar 12, 2024

Closed by #4830

@bitzoic bitzoic closed this as completed Mar 12, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Fuel Network Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forc-doc Everything related to the `forc doc` command plugin. good first issue Good for newcomers lib: core Core library lib: std Standard library P: high Should be looked at if there are no critical issues left
Projects
Status: Done
Development

No branches or pull requests

6 participants