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

[JOSS Review] Tests #12

Closed
rmorgan10 opened this issue Aug 24, 2021 · 9 comments
Closed

[JOSS Review] Tests #12

rmorgan10 opened this issue Aug 24, 2021 · 9 comments

Comments

@rmorgan10
Copy link

This issue is part of the JOSS review going on in openjournals/joss-reviews#3635.

The tests/ directory contains 122 tests, but lacks organization. Suggested changes are:

  1. Split the test file into several individual files such that each sub-module has its own test file with just a few tests. This change is optional since JOSS doesn't require a specific structure to the test suite, but it may help users.
  2. When I ran the tests, 32 failed. I suggest looking into the failures or skipping them at runtime with a provided reason. The test summary from my run is attached below. To verify that all the functionalities of the software are working properly, I would like to get to the bottom of why the tests don't pass.
FAILED all_test.py::TestSettings::test_data_selection_check_config_load_level_no_load_config - FileNotFoundError: [Errno 2]...
FAILED all_test.py::TestDashboards::test_dashboard_closing_button_check_contents[Settings] - ValueError: PNG pane cannot pa...
FAILED all_test.py::TestDashboards::test_selected_source_init_selected - _pickle.PicklingError: Can't pickle <function Colu...
FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_none_to_selected - _pickle.PicklingError: Can't...
FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_unique - _pickle.PicklingE...
FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_same_id_head - _pickle.Pic...
FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_no_id - _pickle.PicklingEr...
FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_same_id_throughout - _pick...
FAILED all_test.py::TestDashboards::test_selected_source_empty_selected_from_selected - _pickle.PicklingError: Can't pickle...
FAILED all_test.py::TestDashboards::test_selected_source_check_valid_select_from_selected_is_valid - _pickle.PicklingError:...
FAILED all_test.py::TestDashboards::test_selected_source_search_valid_id - _pickle.PicklingError: Can't pickle <function Co...
FAILED all_test.py::TestDashboards::test_selected_source_search_deselect - _pickle.PicklingError: Can't pickle <function Co...
FAILED all_test.py::TestDashboards::test_selected_source_update_default_images - _pickle.PicklingError: Can't pickle <funct...
FAILED all_test.py::TestDashboards::test_selected_source_update_custom_images - _pickle.PicklingError: Can't pickle <functi...
FAILED all_test.py::TestDashboards::test_settings_dashboard_init - ValueError: PNG pane cannot parse string that is not a f...
FAILED all_test.py::TestDashboards::test_settings_dashboard_close_settings - ValueError: PNG pane cannot parse string that ...
FAILED all_test.py::TestDashboards::test_settings_dashboard_pipeline_previous - ValueError: PNG pane cannot parse string th...
FAILED all_test.py::TestDashboards::test_settings_dashboard_pipeline_next - ValueError: PNG pane cannot parse string that i...
FAILED all_test.py::TestDashboards::test_settings_dashboard_close_button_check_disabled - ValueError: PNG pane cannot parse...
FAILED all_test.py::TestDashboards::test_settings_dashboard_get_settings - ValueError: PNG pane cannot parse string that is...
FAILED all_test.py::TestDashboards::test_AL_dashboard_labels_to_train_single - ValueError: No plotting extension is current...
FAILED all_test.py::TestDashboards::test_AL_dashboard_labels_to_train_multiple - ValueError: No plotting extension is curre...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_init - ValueError: No plotting extension is currently loaded. ...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_single_matching_value_in_region - ValueError: No plottin...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_multiple_matching_values_in_region - ValueError: No plot...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_combined_matching_values_in_region - ValueError: No plot...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_removing_sample_criteria - ValueError: No plotting extension i...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_looping_through_labelled - ValueError: No plotting exten...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_new_button_with_single_match - ValueError: No plotting e...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_zero_matching - ValueError: No plotting extension is cur...
FAILED all_test.py::TestDashboards::test_labelling_dashboard_save_assigned_label - ValueError: No plotting extension is cur...
FAILED all_test.py::TestUtils::test_save_config_save_config_file - ValueError: PNG pane cannot parse string that is not a f...
======================================== 32 failed, 90 passed, 19 warnings in 16.04s =========================================
@grant-m-s
Copy link
Owner

Split the test file into several individual files such that each sub-module has its own test file with just a few tests.

I will absolutely do that.

When I ran the tests, 32 failed.

Whenever I run pytest I run it within the repo's main directory (so one dir above tests/). This is how I have done it throughout AstronomicAL's development (and what the Travis-CI is set up to do on pushing too). I just ran pytest within tests/and got a similar output to you so I'm assuming that is what you did.

Could you rerun the tests from within the top level directory? This should then give you all the passing tests.

Thanks again!

@rmorgan10
Copy link
Author

When I run from the top-level directory, I get 12 failures:

============================= test session starts ==============================
platform darwin -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/rmorgan/garb/astronomicAL
collected 122 items                                                            

tests/all_test.py ...................................................... [ 44%]
..........FFFFFF.F.F........F..FFF..................................                                                                                                  [100%]

================================================================================= FAILURES ==================================================================================
_____________________________________________________________ TestDashboards.test_selected_source_init_selected _____________________________________________________________

self = <all_test.TestDashboards object at 0x143120760>

    def test_selected_source_init_selected(self):
    
        data = self._create_test_df()
        config.main_df = data
        data = data.iloc[5]
        src = ColumnDataSource({str(c): [v] for c, v in data.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1275: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-1' parent=53369 initial>, file = <_io.BytesIO object at 0x142feff40>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
__________________________________________________ TestDashboards.test_selected_source_check_history_from_none_to_selected __________________________________________________

self = <all_test.TestDashboards object at 0x143314640>

    def test_selected_source_check_history_from_none_to_selected(self):
        data = self._create_test_df()
        config.main_df = data
        src = ColumnDataSource()
        selected_source = SelectedSourceDashboard(src=src, close_button=None)
    
        assert selected_source.selected_history == []
    
        data_selected = data.iloc[72]
>       src.data = {str(c): [v] for c, v in data_selected.items()}

tests/all_test.py:1311: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/has_props.py:278: in __setattr__
    super().__setattr__(name, value)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:978: in __set__
    self._internal_set(obj, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:763: in _internal_set
    self._real_set(obj, old, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:832: in _real_set
    self._trigger(obj, old, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:909: in _trigger
    obj.trigger(self.name, old, value, hint, setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/model.py:664: in trigger
    super().trigger(attr, old, new, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/util/callback_manager.py:159: in trigger
    invoke()
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/util/callback_manager.py:155: in invoke
    callback(attr, old, new)
astronomicAL/dashboard/selected_source.py:182: in _panel_cb
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-2' parent=53369 initial>, file = <_io.BytesIO object at 0x1431b0400>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
____________________________________________ TestDashboards.test_selected_source_check_history_from_selected_to_selected_unique _____________________________________________

self = <all_test.TestDashboards object at 0x143551be0>

    def test_selected_source_check_history_from_selected_to_selected_unique(self):
        data = self._create_test_df()
        data_selected = data.iloc[72]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1319: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-3' parent=53369 initial>, file = <_io.BytesIO object at 0x143b699f0>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
_________________________________________ TestDashboards.test_selected_source_check_history_from_selected_to_selected_same_id_head __________________________________________

self = <all_test.TestDashboards object at 0x1439bdd30>

    def test_selected_source_check_history_from_selected_to_selected_same_id_head(self):
        data = self._create_test_df()
        config.main_df = data
        data_selected = data.iloc[72]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-4' parent=53369 initial>, file = <_io.BytesIO object at 0x1431e6cc0>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
_____________________________________________ TestDashboards.test_selected_source_check_history_from_selected_to_selected_no_id _____________________________________________

self = <all_test.TestDashboards object at 0x14325bb80>

    def test_selected_source_check_history_from_selected_to_selected_no_id(self):
        data = self._create_test_df()
        config.main_df = data
        data_selected = data.iloc[72]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1347: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-5' parent=53369 initial>, file = <_io.BytesIO object at 0x142f81590>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
______________________________________ TestDashboards.test_selected_source_check_history_from_selected_to_selected_same_id_throughout _______________________________________

self = <all_test.TestDashboards object at 0x14398bc40>

    def test_selected_source_check_history_from_selected_to_selected_same_id_throughout(
        self,
    ):
        data = self._create_test_df()
        config.main_df = data
        data_selected = data.iloc[72]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1364: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-6' parent=53369 initial>, file = <_io.BytesIO object at 0x142f81950>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
_____________________________________________________ TestDashboards.test_selected_source_empty_selected_from_selected ______________________________________________________

self = <all_test.TestDashboards object at 0x143b2a460>

    def test_selected_source_empty_selected_from_selected(self):
        data = self._create_test_df()
        config.main_df = data
        data_selected = data.iloc[72]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1394: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-7' parent=53369 initial>, file = <_io.BytesIO object at 0x14321d2c0>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
_______________________________________________ TestDashboards.test_selected_source_check_valid_select_from_selected_is_valid _______________________________________________

self = <all_test.TestDashboards object at 0x1439bfb80>

    def test_selected_source_check_valid_select_from_selected_is_valid(self):
        data = self._create_test_df()
        config.main_df = data
        data_selected = data.iloc[72]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1417: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-8' parent=53369 initial>, file = <_io.BytesIO object at 0x142e56900>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
____________________________________________________________ TestDashboards.test_selected_source_search_valid_id ____________________________________________________________

self = <all_test.TestDashboards object at 0x143176550>

    def test_selected_source_search_valid_id(self):
        data = self._create_test_df()
        config.main_df = data
        src = ColumnDataSource()
        selected_source = SelectedSourceDashboard(src=src, close_button=None)
    
        event = Event("5", "")
>       selected_source._change_selected(event)

tests/all_test.py:1582: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:175: in _change_selected
    self.src.data = selected_dict
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/has_props.py:278: in __setattr__
    super().__setattr__(name, value)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:978: in __set__
    self._internal_set(obj, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:763: in _internal_set
    self._real_set(obj, old, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:832: in _real_set
    self._trigger(obj, old, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:909: in _trigger
    obj.trigger(self.name, old, value, hint, setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/model.py:664: in trigger
    super().trigger(attr, old, new, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/util/callback_manager.py:159: in trigger
    invoke()
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/util/callback_manager.py:155: in invoke
    callback(attr, old, new)
astronomicAL/dashboard/selected_source.py:182: in _panel_cb
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-9' parent=53369 initial>, file = <_io.BytesIO object at 0x143292770>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
____________________________________________________________ TestDashboards.test_selected_source_search_deselect ____________________________________________________________

self = <all_test.TestDashboards object at 0x143cd8c10>

    def test_selected_source_search_deselect(self):
        data = self._create_test_df()
        config.main_df = data
        src = ColumnDataSource()
        selected_source = SelectedSourceDashboard(src=src, close_button=None)
    
        event = Event("5", "")
>       selected_source._change_selected(event)

tests/all_test.py:1617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:175: in _change_selected
    self.src.data = selected_dict
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/has_props.py:278: in __setattr__
    super().__setattr__(name, value)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:978: in __set__
    self._internal_set(obj, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:763: in _internal_set
    self._real_set(obj, old, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:832: in _real_set
    self._trigger(obj, old, value, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/core/property/descriptors.py:909: in _trigger
    obj.trigger(self.name, old, value, hint, setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/model.py:664: in trigger
    super().trigger(attr, old, new, hint=hint, setter=setter)
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/util/callback_manager.py:159: in trigger
    invoke()
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/bokeh/util/callback_manager.py:155: in invoke
    callback(attr, old, new)
astronomicAL/dashboard/selected_source.py:182: in _panel_cb
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-10' parent=53369 initial>, file = <_io.BytesIO object at 0x143270400>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
_________________________________________________________ TestDashboards.test_selected_source_update_default_images _________________________________________________________

self = <all_test.TestDashboards object at 0x143de29d0>

    def test_selected_source_update_default_images(self):
        data = self._create_test_df_with_image_data()
        config.main_df = data
        data_selected = data.iloc[72]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1630: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-11' parent=53369 initial>, file = <_io.BytesIO object at 0x1431c02c0>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
_________________________________________________________ TestDashboards.test_selected_source_update_custom_images __________________________________________________________

self = <all_test.TestDashboards object at 0x143d4ae20>

    def test_selected_source_update_custom_images(self):
        data = self._create_test_df_with_image_data()
        config.main_df = data
    
        config.settings = {
            "id_col": "A",
            "label_col": "B",
            "default_vars": ["C", "D"],
            "labels": [0, 1, 2],
            "label_colours": {0: "#ffad0e", 1: "#0057ff", 2: "#a2a2a2"},
            "labels_to_strings": {"0": "0", "1": "1", "2": "2"},
            "strings_to_labels": {"0": 0, "1": 1, "2": 2},
            "extra_info_cols": [
                "C",
            ],
            "labels_to_train": ["1"],
            "features_for_training": ["C", "D"],
            "exclude_unknown_labels": False,
            "exclude_labels": True,
            "unclassified_labels": ["0", "2"],
            "scale_data": False,
            "feature_generation": [["subtract (a-b)", 2]],
            "extra_image_cols": ["png_path_DR16"],
        }
    
        data_selected = data.iloc[71]
        src = ColumnDataSource({str(c): [v] for c, v in data_selected.items()})
>       selected_source = SelectedSourceDashboard(src=src, close_button=None)

tests/all_test.py:1671: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astronomicAL/dashboard/selected_source.py:83: in __init__
    self._add_selected_info()
astronomicAL/dashboard/selected_source.py:153: in _add_selected_info
    self.panel()
astronomicAL/dashboard/selected_source.py:455: in panel
    Process(target=self._update_default_images).start()
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/process.py:121: in start
    self._popen = self._Popen(self)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:224: in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/context.py:284: in _Popen
    return Popen(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:32: in __init__
    super().__init__(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_fork.py:19: in __init__
    self._launch(process_obj)
../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/popen_spawn_posix.py:47: in _launch
    reduction.dump(process_obj, fp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <Process name='Process-12' parent=53369 initial>, file = <_io.BytesIO object at 0x14346e450>, protocol = None

    def dump(obj, file, protocol=None):
        '''Replacement for pickle.dump() using ForkingPickler.'''
>       ForkingPickler(file, protocol).dump(obj)
E       _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: attribute lookup ColumnDataSource.<lambda> on bokeh.models.sources failed

../../anaconda3/envs/astronomical/lib/python3.9/multiprocessing/reduction.py:60: PicklingError
============================================================================= warnings summary ==============================================================================
../../anaconda3/envs/astronomical/lib/python3.9/site-packages/holoviews/operation/datashader.py:5
  /Users/rmorgan/anaconda3/envs/astronomical/lib/python3.9/site-packages/holoviews/operation/datashader.py:5: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    from collections import Callable

tests/all_test.py: 21 warnings
  /Users/rmorgan/garb/astronomicAL/tests/../astronomicAL/settings/data_selection.py:239: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    if dtype == np.object:  # Only process byte object columns.

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================== short test summary info ==========================================================================
FAILED tests/all_test.py::TestDashboards::test_selected_source_init_selected - _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: at...
FAILED tests/all_test.py::TestDashboards::test_selected_source_check_history_from_none_to_selected - _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambd...
FAILED tests/all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_unique - _pickle.PicklingError: Can't pickle <function ColumnDataSo...
FAILED tests/all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_same_id_head - _pickle.PicklingError: Can't pickle <function Column...
FAILED tests/all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_no_id - _pickle.PicklingError: Can't pickle <function ColumnDataSou...
FAILED tests/all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_same_id_throughout - _pickle.PicklingError: Can't pickle <function ...
FAILED tests/all_test.py::TestDashboards::test_selected_source_empty_selected_from_selected - _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0...
FAILED tests/all_test.py::TestDashboards::test_selected_source_check_valid_select_from_selected_is_valid - _pickle.PicklingError: Can't pickle <function ColumnDataSource....
FAILED tests/all_test.py::TestDashboards::test_selected_source_search_valid_id - _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: ...
FAILED tests/all_test.py::TestDashboards::test_selected_source_search_deselect - _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a60>: ...
FAILED tests/all_test.py::TestDashboards::test_selected_source_update_default_images - _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5...
FAILED tests/all_test.py::TestDashboards::test_selected_source_update_custom_images - _pickle.PicklingError: Can't pickle <function ColumnDataSource.<lambda> at 0x10dcd5a...
=============================================================== 12 failed, 110 passed, 22 warnings in 21.77s ================================================================

@rmorgan10
Copy link
Author

Seems like all the remaining issues are pickle related. Maybe this hints at some sort of platform dependence in the pickling?

@grant-m-s
Copy link
Owner

Ah right so this seems like a python versioning issue after I noticed you are using python 3.9. (according to a similar issue here ).

I am using 3.6 so I will need to do some testing for how to get around this change to allow all these versions

@rmorgan10
Copy link
Author

You can specify the python version in the conda environment creation command to help with that. For example, I think you could just add python==3.6 to your requirements.txt file.

However, I tried this and it led to package conflicts in the create env command, so I think you may need to specify the exact python 3.6 version you have.

On the other hand, this might force your users to use python 3.6, so I'll leave it up to you to decide if you want to make the python version a specification of the environment or find some other workaround for the pickling.

@grant-m-s
Copy link
Owner

so I tried with python3.9 and I was only able to reproduce the issue when using macOS (i normally use linux and i still get all passes with 3.9). So I think the issue I linked above may be actually more useful than I originally thought as I am going to take an informed guess that you're using a mac?

adding the suggested lines:

import multiprocessing
multiprocessing.set_start_method("fork")

to the top of all_tests.py and the test do now pass although there is the issue of the reported crashing of the processes so that is definitely something to be wary about.

@rmorgan10
Copy link
Author

Gotcha. Yeah I tried two things:

  1. Python 3.7 + not adding the lines above
  2. Python 3.9 + adding the lines above

Both resulted in all tests passing, and in the second case I see the reported crashing of processes. Personally, I think the safest thing to do is to add python==3.7 to the requirements.txt file, but as long as your tests pass I'm not too worried about crashing processes that only occur when tests are run.

So two options:

  1. Add python==3.7 to requirements.txt, or
  2. Add something like the following to the top of your test modules:
if sys.version_info >= (3, 8):
    # Account for python version dependence in the default multiprocessing 
    # starting of processes: https://github.com/pytest-dev/pytest-flask/issues/104
    import multiprocessing
    multiprocessing.set_start_method("fork")

grant-m-s added a commit that referenced this issue Aug 30, 2021
@grant-m-s
Copy link
Owner

Awesome, glad its now working. I decided on going for option 2.
Are you happy for this now to be closed?

@rmorgan10
Copy link
Author

Yup! This one looks good to me now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants