test: improve commons module doctests#1033
Conversation
1a0060b to
f4713af
Compare
HAEKADI
left a comment
There was a problem hiding this comment.
Thank you @maukoquiroga! I ran the tests and everything seems to be in order :)
MattiSG
left a comment
There was a problem hiding this comment.
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. |
benjello
left a comment
There was a problem hiding this comment.
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 !
2afcfd7 to
8f004a9
Compare
2e8dc29 to
841f852
Compare
MattiSG
left a comment
There was a problem hiding this comment.
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 <matti.schneider@beta.gouv.fr>
b1dc1d8 to
8e8efe4
Compare
Fixes #1250
New Features
openfisca_core.typesBug Fixes
Documentation