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

doctest addons #677

Merged
merged 25 commits into from
Aug 4, 2020
Merged

doctest addons #677

merged 25 commits into from
Aug 4, 2020

Conversation

autoih
Copy link
Member

@autoih autoih commented Nov 6, 2019

Address issue 582. Use DocTest to test the Python docstrings.

EDIT (@gabrieldemarmiesse) : fix #582

@autoih autoih requested a review from a team as a code owner November 6, 2019 20:17
@autoih autoih requested a review from Squadrick as a code owner November 20, 2019 19:29
@autoih autoih changed the title [wip] doctest addons doctest addons Nov 20, 2019
@autoih autoih requested review from WindQAQ and removed request for a team December 2, 2019 18:56
Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanpmorgan Hi Sean, I wonder if we should also put the doctest on CI. My initial thought is not to do that. Maybe a neat description to ask contributors to so is enough. What do you think about it? Thank you!

@autoih Thanks for the contribution! Would you mind also making other code snippets compatible with doctest?

@seanpmorgan
Copy link
Member

@seanpmorgan Hi Sean, I wonder if we should also put the doctest on CI. My initial thought is not to do that. Maybe a neat description to ask contributors to so is enough. What do you think about it? Thank you!

@autoih Thanks for the contribution! Would you mind also making other code snippets compatible with doctest?

Hmmmm I think once we fully enforce this it could be a good idea to include in CI (depending on the runtime). But for the short-term I'm fine with this being a user ran test.

@WindQAQ
Copy link
Member

WindQAQ commented Dec 10, 2019

Hmmmm I think once we fully enforce this it could be a good idea to include in CI (depending on the runtime). But for the short-term I'm fine with this being a user ran test.

@autoih Could you share the runtime for the whole repo?

@gabrieldemarmiesse
Copy link
Member

I modified a line to make sure the tests for dostrings were actually running in the CI.

@gabrieldemarmiesse
Copy link
Member

@autoih it seems the tests were not running. I changed a number and the CI is still passing. Could you make sure the tests are running correctly? You can ping me afterwards and I'll review.

@autoih
Copy link
Member Author

autoih commented May 11, 2020

Thanks @gabrieldemarmiesse. For some reason, --doctest-modules is missing at sanity check dockerfile, put it back now.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@autoih
Copy link
Member Author

autoih commented May 11, 2020

@googlebot I fixed it.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@autoih autoih requested a review from gabrieldemarmiesse May 15, 2020 18:51
@gabrieldemarmiesse gabrieldemarmiesse removed their assignment Jun 1, 2020
@WindQAQ WindQAQ merged commit 706e22f into tensorflow:master Aug 4, 2020
@WindQAQ WindQAQ mentioned this pull request Aug 4, 2020
10 tasks
WindQAQ added a commit that referenced this pull request Aug 4, 2020
@WindQAQ WindQAQ mentioned this pull request Aug 4, 2020
seanpmorgan pushed a commit that referenced this pull request Aug 5, 2020
jrruijli pushed a commit to jrruijli/addons that referenced this pull request Dec 23, 2020
* doctest for addons

* minor sanity

* add tfa & cleanup

* doctest example

* sanity check

* files for doctest

* remove tensor id

* flake8

* use pytest

* remove tfa_doctest

* pytest for doctest

* remove section in build

* remove unsused files

* update conftest; with no option named skip_custom_ops issue

* flake8

* move np, tfa, tf to confest

* concise command

* fix docstr issue and add example

* sanity check and missing doctest modules

* reomve FloatTensorLike

Co-authored-by: Tzu-Wei Sung <[email protected]>
jrruijli pushed a commit to jrruijli/addons that referenced this pull request Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build doctest to test python docstrings
6 participants