robertwb commented on a change in pull request #13224:
URL: https://github.com/apache/beam/pull/13224#discussion_r516175564



##########
File path: sdks/python/apache_beam/dataframe/doctests.py
##########
@@ -253,27 +251,37 @@ def sort_and_normalize(text):
 
   @property
   def _seen_error(self):
-    return self._seen_wont_implement or self._seen_not_implemented
+    return self._last_error is not None
 
   def check_output(self, want, got, optionflags):
     # When an error occurs check_output is called with want=example.exc_msg,
     # and got=exc_msg
-    if got.startswith(WONT_IMPLEMENT) and (want.startswith(WONT_IMPLEMENT) or
-                                           want.startswith(NOT_IMPLEMENTED)):
-      self._seen_wont_implement = True
-      return True
-    elif got.startswith(NOT_IMPLEMENTED) and want.startswith(NOT_IMPLEMENTED):
-      self._seen_not_implemented = True
-      return True
-    elif got.startswith('NameError') and self._seen_error:
-      # After raising WontImplementError or NotImplementError,
-      # ignore a NameError.
-      # This allows us to gracefully skip tests like
-      #    >>> res = df.unsupported_operation()
-      #    >>> check(res)
-      return True
-    else:
-      self.reset()
+

Review comment:
       Nice cleanup, this is much better. 

##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -1391,30 +1397,22 @@ def _is_associative(func):
       and func.__module__ in ('numpy', 'builtins'))
 
 
+
+@populate_not_implemented(pd.core.groupby.generic.DataFrameGroupBy)
 class _DeferredGroupByCols(frame_base.DeferredFrame):
   # It's not clear that all of these make sense in Pandas either...
   agg = aggregate = frame_base._elementwise_method('agg')
   any = frame_base._elementwise_method('any')
   all = frame_base._elementwise_method('all')
-  apply = frame_base.not_implemented_method('apply')
-  backfill = bfill = frame_base.not_implemented_method('backfill')
   boxplot = frame_base.wont_implement_method('plot')
-  corr = frame_base.not_implemented_method('corr')
-  corrwith = frame_base.not_implemented_method('corrwith')
-  cov = frame_base.not_implemented_method('cov')
-  cumcount = cummax = cummin = cumprod = cumsum = (
-      frame_base.not_implemented_method('cum*'))
   describe = frame_base.wont_implement_method('describe')
   diff = frame_base._elementwise_method('diff')
-  dtypes = frame_base.not_implemented_method('dtypes')
-  expanding = frame_base.not_implemented_method('expanding')
-  ffill = frame_base.not_implemented_method('ffill')
   fillna = frame_base._elementwise_method('fillna')
   filter = frame_base._elementwise_method('filter')
   first = frame_base.wont_implement_method('order sensitive')
   get_group = frame_base._elementwise_method('group')
   head = frame_base.wont_implement_method('order sensitive')
-  hist = frame_base.wont_implement_method('plot')
+  hist = frame_base.wont_implement_method('hist')

Review comment:
       This was intentionally 'plot' for better summarization (e.g. to see that 
x% of methods that we won't implement are due to them being plotting). A 
traceback would point to the actual method used. But if we want to be more 
specific, that's OK too.  




----------------------------------------------------------------
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]


Reply via email to