cairo_native icon indicating copy to clipboard operation
cairo_native copied to clipboard

Improve doctests

Open igaray opened this issue 1 year ago • 14 comments

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 avatar Aug 21 '24 16:08 igaray

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

  • first, this depends on #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

igaray avatar Aug 21 '24 19:08 igaray

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

adrianvrj avatar Aug 21 '24 19:08 adrianvrj

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.

MatiasAchucarro avatar Aug 22 '24 07:08 MatiasAchucarro

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.

kunalrosaili05 avatar Aug 24 '24 11:08 kunalrosaili05

Hi @igaray i will love to work on this

ShantelPeters avatar Aug 25 '24 11:08 ShantelPeters

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 .

igaray avatar Aug 28 '24 12:08 igaray

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

adrianvrj avatar Aug 28 '24 13:08 adrianvrj

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.

RuneRogue avatar Oct 12 '24 06:10 RuneRogue

Can I take this from here?

knownothing10 avatar Dec 10 '24 23:12 knownothing10

I'd like to handle this task.

cryptogru725 avatar Jan 04 '25 14:01 cryptogru725

Could I try solving this?

josexx96 avatar Jan 10 '25 17:01 josexx96

I'd be happy to do this.

chiscookeke11 avatar Jan 21 '25 20:01 chiscookeke11

Let me handle this issue! ETA - 3days!

emarc99 avatar Feb 04 '25 10:02 emarc99

Can I take care of this issue? first time contributor

Supa-mega avatar Feb 06 '25 14:02 Supa-mega