-
Notifications
You must be signed in to change notification settings - Fork 613
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
Enable doctest #2069
Conversation
@@ -1,2 +1,3 @@ | |||
[pytest] | |||
addopts = -ra | |||
doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL DONT_ACCEPT_BLANKLINE |
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.
@@ -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/ |
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.
I think it makes sense to also run doctest in cpu_tests as docstring is also a part of codes.
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.
Agree
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.
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/ |
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.
Agree
* Enable doctest * Fix GeometricMean docstring
Description
Replacement of #667. Should be merged after #2068.
Type of change
Checklist:
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:
*