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

Are you open to me adding "advice for testing your dataframes"? #46

Open
ianozsvald opened this issue Aug 4, 2019 · 8 comments
Open
Labels
Documentation help wanted Extra attention is needed

Comments

@ianozsvald
Copy link

Hello again. Prompted by a recent exchange on twitter:
https://twitter.com/ianozsvald/status/1157181430595837952
I'm revisiting my approach to testing in R&D Jupyter Notebooks.

I plan to rework many of my assert statements with use of bulwark. Would you be open to be creating several paragraphs (possibly 1 page) of advice for the README to help others spot how & where they might want to test their code?

I'm thinking of both data loading (specifying some expectations about the resulting dataframe) and data manipulation (e.g. checking for a unique index after a join...which prompted the above tweet, also to check for the introduction of NaNs etc).

I talk this advice through in one of my classes and I could turn it into a blog post, but adding it here will be more useful to users and ought to help gain visibility for bulwark.

I'd welcome any thoughts you had on it of course, I'm just checking that you're open to the idea before I start putting some notes together.

@ZaxR
Copy link
Owner

ZaxR commented Aug 6, 2019

That sounds great! The readthedocs currently has an Examples page that needs to be written (see #33), and I'm also open to a "Best Practices" page as well. Would really appreciate a PR for either/both of those.

@ZaxR ZaxR added Documentation help wanted Extra attention is needed labels Aug 6, 2019
@ianozsvald
Copy link
Author

This I can tackle, probably as a single markdown page first for critique and then we could migrate it to a more suitable destination once it matures. More on this later.

@ZaxR
Copy link
Owner

ZaxR commented Aug 6, 2019

Sounds good. The sphinx docs for Bulwark are now actually set up to take markdown files, do if you want, you can work on this file in the docs folder on Bulwark and we can collaborate via a PR.

@ianozsvald
Copy link
Author

Hey there. Here's a first draft: https://github.com/ianozsvald/bulwark/blob/master/docs/advice.md

Thoughts?

@ZaxR
Copy link
Owner

ZaxR commented Aug 22, 2019

Absolutely love it so far - I appreciate you selecting probably some of the most common use cases for each of the checks.

I view a lot of the value of bulwark as being in the decorator form, since often transformations are more complex than one-liners, so I'd like to have some detailed examples for those as well. I'd also like to showcase the use of multiple checks (the join example would also be a case where you might use has_no_nans for example).

Thinking about where this would fit into the docs, I think your first paragraph and the discussion about asserts belongs in some kind of "philosophy" page that appears before the "Design" page. The examples would fit well both within function docstrings and on the "Examples" page or even a new docs page titled like you had it, but a little shorter: "Common Uses".

How do you feel about all that?

@mlisovyi
Copy link

mlisovyi commented Jun 8, 2020

Was there a progress on this? It would be super helpful for beginners to have the Examples page populated (or Common Use-Cases- whatever you fancy as the name)

@ianozsvald
Copy link
Author

@mlisovyi hey there. So, I stalled on this. My way of using bulwark is different to Zax's, I meant to try decorating functions and I ended up doing nothing to do with data prep/validation for many months. You are very welcome to edit/chop/change my suggestions if you'd like to pick this up, I'd be happy to try to leave useful feedback if you make progress.
I'll note that I'm also unlikely to make any useful contributions beyond the odd comment, my wife & I are 2 months due to give birth, life is changing, lockdown is weird and I've got clients+community conference talks ahead in the next couple of months, so please forgive me if I'm quiet

@mlisovyi
Copy link

mlisovyi commented Jun 8, 2020

ok, makes sense. I can give it try over the next weekend. @ZaxR do you mind to specify what would you see as a minimal set of changes:

  • regarding the split into philosophy and examples: make a suggestion where do you want to see the philosophy.
  • regarding the checks vs decorators: do you see it as each existing example followed by "or using decorators: ..."?
  • regarding multicheck: how about postponing it? I have not hands-on experience, so i would prefer to converge on something minimal rather than having endless iterations and stall it at the end.

P.S. @ianozsvald congrats on the upcoming family extension :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants