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

Enable doctest #2069

Merged
merged 5 commits into from Aug 7, 2020
Merged

Enable doctest #2069

merged 5 commits into from Aug 7, 2020

Conversation

WindQAQ
Copy link
Member

@WindQAQ WindQAQ commented Aug 4, 2020

Description

Replacement of #667. Should be merged after #2068.

Type of change

Checklist:

  • I've properly formatted my code according to the guidelines
    • By running Black + Flake8
    • By running pre-commit hooks
  • This PR addresses an already submitted issue for TensorFlow Addons
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • This PR contains modifications to C++ custom-ops

How Has This Been Tested?

If you're adding a bugfix or new feature please describe the tests that you ran to verify your changes:
*

@@ -1,2 +1,3 @@
[pytest]
addopts = -ra
doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL DONT_ACCEPT_BLANKLINE
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -20,7 +20,8 @@ RUN python configure.py
RUN pip install -e ./
RUN --mount=type=cache,id=cache_bazel,target=/root/.cache/bazel \
bash tools/install_so_files.sh
RUN pytest -v -n auto --durations=25 --cov=tensorflow_addons ./tensorflow_addons/
RUN pytest -v -n auto --durations=25 --doctest-modules ./tensorflow_addons \
--cov=tensorflow_addons ./tensorflow_addons/
Copy link
Member Author

@WindQAQ WindQAQ Aug 4, 2020

Choose a reason for hiding this comment

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

I think it makes sense to also run doctest in cpu_tests as docstring is also a part of codes.

Copy link
Member

Choose a reason for hiding this comment

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

Agree

@WindQAQ
Copy link
Member Author

WindQAQ commented Aug 4, 2020

Tests pass successfully on my local 😃

image

@WindQAQ WindQAQ mentioned this pull request Aug 4, 2020
10 tasks
@WindQAQ WindQAQ requested a review from a team August 4, 2020 06:39
@WindQAQ WindQAQ changed the title Doc/enable doctest Enable doctest Aug 4, 2020
@boring-cyborg boring-cyborg bot added the metrics label Aug 5, 2020
Copy link
Member

@seanpmorgan seanpmorgan left a comment

Choose a reason for hiding this comment

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

LGTM Thanks!

@@ -20,7 +20,8 @@ RUN python configure.py
RUN pip install -e ./
RUN --mount=type=cache,id=cache_bazel,target=/root/.cache/bazel \
bash tools/install_so_files.sh
RUN pytest -v -n auto --durations=25 --cov=tensorflow_addons ./tensorflow_addons/
RUN pytest -v -n auto --durations=25 --doctest-modules ./tensorflow_addons \
--cov=tensorflow_addons ./tensorflow_addons/
Copy link
Member

Choose a reason for hiding this comment

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

Agree

@seanpmorgan seanpmorgan merged commit 4b50b94 into tensorflow:master Aug 7, 2020
jrruijli pushed a commit to jrruijli/addons that referenced this pull request Dec 23, 2020
* Enable doctest
* Fix GeometricMean docstring
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.

None yet

4 participants