-
Notifications
You must be signed in to change notification settings - Fork 75
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
test: improve commons module doctests #1033
Conversation
1a0060b
to
f4713af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @maukoquiroga! I ran the tests and everything seems to be in order :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @maukoquiroga, this is impressive documentation work! 😲 👏
How are these tests run in CI?
I would personally need the following to validate that PR:
- A review by at least one person who has extensive knowledge of the API and can double-check both the given information and that this is isofunctional in terms of tests. I'll ask for a review accordingly.
- As mentioned in a comment, that all style convention changes are extracted from this PR.
- That an explanation on how to run these tests and produce the documentation is added, at least to this PR, possibly to the doc itself, so that I can validate the changeset on my machine 🙂
How can I confirm this would fix openfisca/openfisca-doc#244? 🙂 |
Thanks for your comments @HAEKADI & @MattiSG
Good point, I'll work on it. |
I kind of was forced by the magics of test-driven documentation to fix it before openfisca/openfisca-doc#251 The idea would be to reach a point where builds fail in CI when the docs, including doctests, fail to build. |
What I intend as a first step is to make whatever exists today work, which is not the case. That includes roughly two things:
Of course, I agree with @MattiSG the aim is to automatise as much as we can, which is possible. |
7bc4933
to
54a9c75
Compare
2981356
to
c641638
Compare
That was some work! So I've:
@benjello regarding the style of docstrings specifically, do you have any preference? To resume my take on this:
In any scenario, this changeset has little to no impact on that because we're adding/completing doc and doctests rather than rewriting it to a style or the other, but as we move on documenting the whole code base (are we?) it could make sense to have a collective community discussion to choose one style and adhere to it, as it'll make contributions and maintenance easier. |
@maukoquiroga : I like Google style too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment.
My fear is the the current typing may force bool and int array conversion to float array.
Otherwise good to go.
Thanks !
2e8dc29
to
841f852
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only blocking change for me is the addition of a test coverage threshold in a PR presented as improving doctests. I believe that such a change has a potential impact on contributions acceptance processes, and should be subject to a separate discussion 🙂
I'm glad to see we've made a lot progress and are very close to shipping, notably thanks to a direct discussion with @maukoquiroga yesterday. Thanks for that!
6332e0d
to
b1dc1d8
Compare
Co-authored-by: Matti Schneider <[email protected]>
b1dc1d8
to
8e8efe4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 😭
Fixes #1250
New Features
openfisca_core.types
Bug Fixes
Documentation