fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.92k stars 487 forks source link

nbdev testing documentation #517

Closed cedarmora closed 2 years ago

cedarmora commented 3 years ago

I had a pretty hard time figuring out that the documentation for the nbdev tests (e.g. test_eq) is actually in fastcore, could there be some link or some bold sentence near the top of the nbdev test documentation explaining this?

yegeniy commented 3 years ago

@cedarmora - see the tip in https://nbdev.fast.ai/example.html#Where-The-Magic-Happens:-Write-Documentation-And-Tests and https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md

That might be a good way to get started.

image
cedarmora commented 3 years ago

I hadn't seen those two links, thank you for pointing them out.

As somebody who is just learning nbdev, that's not where I would have expected to learn about the tests, I would have expected to find this information on this page since it's the only tab in the nbdev documentation that has the word "tests" in it.

I'll see if I can whip up a PR

yegeniy commented 3 years ago

Good luck. I'm just learning this system as well.

I've found https://nbdev.fast.ai/nbdev_comments.html to be a great reference, once you're really diving in beyond the tutorials.

You may find a typo or two there as well. 😉

On Thu, Aug 12, 2021 at 8:46 PM Cedar Mora @.***> wrote:

Ok I see those two, thank you for pointing that out.

But as somebody who is just learning nbdev, that's not where I would have expected to learn about the tests, I would have expected to find this information on this page https://nbdev.fast.ai/test.html since it's the only tab in the nbdev documentation that has the word "tests" in it.

I'll see if I can whip up a PR

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fastai/nbdev/issues/517#issuecomment-898068451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHPQUTT3W4SBJTDWBU2NDT4RTM7ANCNFSM5CCF3SPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

yegeniy commented 3 years ago

I see the source of your confusion, but just to help you clarify it:

https://nbdev.fast.ai/test.html is actually part of the documentation for the source code of nbdev itself.

Specifically, it documents the module called test:

As the documentation there says, the test module is there to let nbdev "extract tests".

image
cedarmora commented 3 years ago

Ok I made a PR, let me know if it needs any changes.