[
https://issues.apache.org/jira/browse/BEAM-9547?focusedWorklogId=561243&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-561243
]
ASF GitHub Bot logged work on BEAM-9547:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Mar/21 01:07
Start Date: 05/Mar/21 01:07
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on a change in pull request
#14140:
URL: https://github.com/apache/beam/pull/14140#discussion_r587949924
##########
File path: sdks/python/apache_beam/dataframe/doctests.py
##########
@@ -666,3 +658,53 @@ def _run_patched(func, *args, **kwargs):
*args, extraglobs=extraglobs, optionflags=optionflags, **kwargs)
finally:
doctest.DocTestRunner = original_doc_test_runner
+
+
+def with_run_patched_docstring(target=None):
+ assert target is not None
+ def wrapper(fn):
+ fn.__doc__ = f"""Run all pandas doctests in the specified {target}.
+
+ Arguments `skip`, `wont_implement_ok`, `not_implemented_ok` are all in the
+ format::
+
+ {{
+ "module.Class.method": ['*'],
+ "module.Class.other_method": [
+ 'instance.other_method(bad_input)',
+ 'observe_result_of_bad_input()',
+ ],
+ }}
+
+ `'*'` indicates all examples should be matched, otherwise the list is a
list
+ of specific input strings that should be matched.
+
+ All arguments are kwargs.
+
+ Args:
+ optionflags (int): Passed through to doctests.
+ extraglobs (Dict[str,Any]): Passed through to doctests.
+ use_beam (bool): If true, run a Beam pipeline with partitioned input to
+ verify the examples, else use PartitioningSession to simulate
+ distributed execution.
+ skip (Dict[str,str]): A set of examples to skip entirely.
+ wont_implement_ok (Dict[str,str]): A set of examples that are allowed to
+ raise WontImplementError.
+ not_implemented_ok (Dict[str,str]): A set of examples that are allowed to
+ raise NotImplementedError.
+
+ Returns:
+ ~doctest.TestResult: A doctest result describing the passed/failed tests.
+ """
+ return fn
+ return wrapper
+
+
+@with_run_patched_docstring(target="file")
Review comment:
They correspond to the
[doctest](https://docs.python.org/3/library/doctest.html) methods of the same
name. It looks like we don't actually use testfile at the moment
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 561243)
Time Spent: 47h 10m (was: 47h)
> Implement all pandas operations (or raise WontImplementError)
> -------------------------------------------------------------
>
> Key: BEAM-9547
> URL: https://issues.apache.org/jira/browse/BEAM-9547
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: Brian Hulette
> Assignee: Robert Bradshaw
> Priority: P2
> Labels: dataframe-api
> Time Spent: 47h 10m
> Remaining Estimate: 0h
>
> We should have an implementation for every DataFrame, Series, and GroupBy
> method. Everything that's not possible to implement should get a default
> implementation that raises WontImplementError
> SeeĀ https://github.com/apache/beam/pull/10757#discussion_r389132292
> Progress at the individual operation level is tracked in a
> [spreadsheet|https://docs.google.com/spreadsheets/d/1hHAaJ0n0k2tw465ORs5tfdy4Lg0DnGWIQ53cLjAhel0/edit],
> consider requesting edit access if you'd like to help out.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)