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

WIP: Expand docs on unstructuring #515

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

td-anne
Copy link

@td-anne td-anne commented Mar 4, 2024

I ran into some confusing situations trying to unstructure some objects I had defined (#513 ) and it was suggested I create a PR clarifying the docs. This PR attempts to do this.

I should say, my understanding of how cattrs works, and of how cattrs is meant to be used, is a little shaky, so feedback on this documentation is highly welcome.

I am also totally new to cattrs development, so I'm not sure where anything goes. In particular, is there a place for demo code that will be executed? Should I add tests to verify that the behaviour I am describing in the docs is really what happens? I'm not sure how to run the doctests, particularly in the docs/ directory.

@td-anne td-anne marked this pull request as draft March 5, 2024 11:12
@Tinche
Copy link
Member

Tinche commented Jul 19, 2024

Hi!

I completely dropped the ball on this and I apologize for that, I got sidetracked by other things and forgot about this.

I will try to integrate this into cattrs soon as the last thing I do before releasing the next version.

In particular, is there a place for demo code that will be executed?

I assume you mean is the code in the documentation tested? We use doctests extensively so those can be used for this purpose. I don't insist on them though.

Should I add tests to verify that the behaviour I am describing in the docs is really what happens?

If you feel like they'd be valuable and feel confident enough to write them. Otherwise I'd skip em.

I'm not sure how to run the doctests, particularly in the docs/ directory.

I believe our tox setup can run the docs. Otherwise, I go into the docs directory and run make doctest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants