lambdaclass / cairo_native

A compiler to convert Cairo's intermediate representation "Sierra" code to MLIR.
https://lambdaclass.github.io/cairo_native/cairo_native
Apache License 2.0
121 stars 43 forks source link

Improve doctests #764

Open igaray opened 2 months ago

igaray commented 2 months ago

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.

adrianvrj commented 2 months ago

hey @igaray can I work on this one?

It would probably take me around a day to upload a PR for this

igaray commented 2 months ago

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

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 commented 2 months ago

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

MatiasAchucarro commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

Hi @igaray i will love to work on this

igaray commented 2 months ago

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 commented 2 months ago

Hi @igaray I am aware, I actually did not see the issue on OD šŸ˜…

RuneRogue commented 3 weeks ago

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.