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

Improve doctests #764

Open
igaray opened this issue Aug 21, 2024 · 8 comments
Open

Improve doctests #764

igaray opened this issue Aug 21, 2024 · 8 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@igaray
Copy link
Collaborator

igaray commented Aug 21, 2024

All the code examples in the documentation have the ignore attribute set. Some of them truly require it while others have gone stale as a result. All the code examples in the markdown files in the docs folder, as well as the in the in-code documentation, should be checked, have the ignore attribute changed to no_run, 'should_panic`, or removed to ensure that examples are correct.

See https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#attributes for reference.

@igaray igaray added documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed labels Aug 21, 2024
@igaray
Copy link
Collaborator Author

igaray commented Aug 21, 2024

Hey Adrian! sure, go ahead.
Just a couple of things:

  • first, this depends on Consolidate documentation #757 being merged
  • second, I doubt you'll be able to fix all the doctests in one go. You'll have to read all the documentation added in that PR, and see which ones require the ignore attribute and which ones are not, and whether any code example needs to be updated to new APIs.

I would say take a look at that PR and see if you want to start, and open a draft PR on which we can talk and guide you. Don't try to have at it in one go to make sure you don't waste effort.

In addition, if while reading the docs something is not clear, then please ask questions. A fresh set of eyes reading the docs and asking questions is very valuable.

Thanks

@adrianvrj
Copy link
Contributor

adrianvrj commented Aug 21, 2024

@igaray sounds good, I will do as you say and make sure to stay in contact

@MatiasAchucarro
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a passionate and results-driven web developer, currently deepening my knowledge in web3 technologies, Cairo, and open-source development through Dojo Coding. My skill set includes expertise in JavaScript, React, HTML, CSS, C# with .NET Entity Framework, and more. I also have experience with tools like Git, GitHub, SQL Server, and Postman. My focus has been on building solid web applications, from task lists to full-fledged CRUD systems, with front-end, back-end, and database integration.

This will be my first contribution to the open-source ecosystem, and I am excited to learn and collaborate on innovative projects, particularly those involving Cairo.

How I plan on tackling this issue

To address the issue of code examples with the ignore attribute, first review all examples in Markdown files and code documentation to determine their relevance and necessity. Next, classify the examples into two categories: those that should retain the ignore attribute due to specific requirements and those that are outdated and need to be either removed or updated. Change the ignore attribute to should_panic where appropriate and remove examples that no longer provide value. Finally, ensure that all code examples are executable and that the documentation accurately reflects the updates.

@kunalrosaili05
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a blockchain developer honing skills from past 3 years

How I plan on tackling this issue

My approach would be :

  1. Project Overview: Review the project structure, focusing on the documentation and codebase where examples are used.

  2. Documentation Review: Identify all code examples in the markdown files within the docs folder and in-code documentation. Categorize them based on their current ignore attribute usage.

  3. Code Validation: Test each code example. If the example runs correctly, change ignore to no_run or should_panic where appropriate. Remove the ignore attribute if it's unnecessary.

  4. Stale Examples: Update any stale examples to reflect the current codebase. If examples are outdated, rewrite or remove them as needed.

  5. Ownership Transfer: Upon completion of the review, I will document changes and provide a detailed summary. I'll ensure a smooth handover by familiarizing myself with all aspects of the project, and offering continued support during the transition.

@ShantelPeters
Copy link

Hi @igaray i will love to work on this

@igaray
Copy link
Collaborator Author

igaray commented Aug 28, 2024

Hello everyone! @adrianvrj @kunalrosaili05 @ShantelPeters @ScottyDavies
While we are happy to review contributions, I just wanted to make sure you are aware we are not (at the moment) participating in OnlyDust hackathons .

@adrianvrj
Copy link
Contributor

Hi @igaray I am aware, I actually did not see the issue on OD 😅

@RuneRogue
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a blockchain and DeFi developer . I am having experience of 8 months . I am currently working as a Blockchain Researcher and Developer. My Experience in programming language like Go , Rust , Java will help me to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants