Skip to content

Fix: Fix OS

Fix: Fix OS #16

GitHub Actions / JUnit Test Report failed Nov 11, 2024 in 0s

30 tests run, 17 passed, 11 skipped, 2 failed.

Annotations

Check failure on line 30 in tests/test_vacuum_workflow.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_vacuum_workflow.test_ValidateVacuumSynthesis@group_vacuum

AssertionError: The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out/validation/morphometrics/morphometrics_apical_dendrite.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out/validation/morphometrics/morphometrics_apical_dendrite.pdf' are different:
Exception raised: (FileNotFoundError) 2
No such file or directory


The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out/validation/morphometrics/morphometrics_basal_dendrite.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out/validation/morphometrics/morphometrics_basal_dendrite.pdf' are different:
Exception raised: (FileNotFoundError) 2
No such file or directory


The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out/validation/score_matrix_reports.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out/validation/score_matrix_reports.pdf' are different:
Exception raised: (FileNotFoundError) 2
No such file or directory
Raw output
vacuum_working_directory = (PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out'), PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out'))
data_dir = PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data')

    @pytest.mark.xdist_group("group_vacuum")
    def test_ValidateVacuumSynthesis(vacuum_working_directory, data_dir):
        """Test the synthesis workflow in vacuum."""
        np.random.seed(0)
    
        # Run the workflow
        assert luigi.build([ValidateVacuumSynthesis()], local_scheduler=True)
    
        result_dir, expected_dir = vacuum_working_directory
    
        data_dir_pattern = str(data_dir) + "/?"
        result_dir_pattern = str(result_dir) + "/?"
    
        # Check the results
>       assert_equal_trees(
            expected_dir,
            result_dir,
            specific_args={
                "morphs_df/vacuum_synth_morphs_df.csv": {
                    "format_data_kwargs": {
                        "replace_pattern": {(result_dir_pattern, ""): ["vacuum_synth_morphologies"]}
                    }
                },
                "morphs_df/substituted_morphs_df.csv": {
                    "format_data_kwargs": {
                        "replace_pattern": {(data_dir_pattern, ""): ["path", "morphology_path"]}
                    }
                },
                "morphs_df/morphs_df.csv": {
                    "format_data_kwargs": {
                        "replace_pattern": {(data_dir_pattern, ""): ["path", "morphology_path"]}
                    }
                },
                "synthesis/neurots_input/tmd_distributions.json": {
                    "tolerance": 2e-3,
                    "absolute_tolerance": 1e-15,
                },
            },
        )

/home/runner/work/synthesis-workflow/synthesis-workflow/tests/test_vacuum_workflow.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

export_formatted_files = '_FORMATTED'
args = (PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out'), PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out'))
kwargs = {'specific_args': {'morphs_df/morphs_df.csv': {'format_data_kwargs': {'replace_pattern': {('/home/runner/work/synthesi...orphologies']}}}, 'synthesis/neurots_input/tmd_distributions.json': {'absolute_tolerance': 1e-15, 'tolerance': 0.002}}}
different_files = {'validation/morphometrics/morphometrics_apical_dendrite.pdf': "The files '/home/runner/work/synthesis-workflow/synthe...lidation/score_matrix_reports.pdf' are different:\nException raised: (FileNotFoundError) 2\nNo such file or directory"}
sorted_items = [('validation/morphometrics/morphometrics_apical_dendrite.pdf', "The files '/home/runner/work/synthesis-workflow/synth...idation/score_matrix_reports.pdf' are different:\nException raised: (FileNotFoundError) 2\nNo such file or directory")]

    def assert_equal_trees(*args, export_formatted_files=False, **kwargs):
        """Raise an :class:`AssertionError` if differences are found in the two directory trees.
    
        .. note::
            This function has a specific behavior when run with pytest. See the doc of the
            :mod:`dir_content_diff.pytest_plugin`.
    
        Args:
            *args: passed to the :func:`compare_trees` function.
            export_formatted_files (bool, or str): If set to ``True``, the formatted files are exported
                to the directory with the default suffix. If set to a string, it is used as suffix for
                the new directory.
            **kwargs: passed to the :func:`compare_trees` function.
    
        Returns:
            (bool) ``True`` if the trees are equal. If they are not, an :class:`AssertionError` is
            raised.
        """
        # If run with pytest, get the trigger to export formatted data from it
        if export_formatted_files is False and hasattr(
            assert_equal_trees, "_pytest_export_formatted_data"
        ):
            # pylint: disable=no-member
            # pylint: disable=protected-access
            export_formatted_files = assert_equal_trees._pytest_export_formatted_data
            if export_formatted_files is True and assert_equal_trees._pytest_export_suffix:
                export_formatted_files = assert_equal_trees._pytest_export_suffix
    
        different_files = compare_trees(*args, export_formatted_files=export_formatted_files, **kwargs)
    
        # Sort the files according to their relative paths
        sorted_items = sorted(different_files.items(), key=lambda x: x[0])
        # Test that all files are equal and raise the formatted messages if there are differences
        if len(sorted_items) > 0:
>           raise AssertionError("\n\n\n".join([i[1] for i in sorted_items]))
E           AssertionError: The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out/validation/morphometrics/morphometrics_apical_dendrite.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out/validation/morphometrics/morphometrics_apical_dendrite.pdf' are different:
E           Exception raised: (FileNotFoundError) 2
E           No such file or directory
E           
E           
E           The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out/validation/morphometrics/morphometrics_basal_dendrite.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out/validation/morphometrics/morphometrics_basal_dendrite.pdf' are different:
E           Exception raised: (FileNotFoundError) 2
E           No such file or directory
E           
E           
E           The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_vacuum/out/validation/score_matrix_reports.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw1/test_ValidateVacuumSynthesis0/out/validation/score_matrix_reports.pdf' are different:
E           Exception raised: (FileNotFoundError) 2
E           No such file or directory

/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/lib/python3.11/site-packages/dir_content_diff/__init__.py:385: AssertionError

Check failure on line 25 in tests/test_O1_workflow.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_O1_workflow.test_ValidateSynthesis@group_O1

AssertionError: The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_small_O1/out/validation/path_distance_fit.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out/validation/path_distance_fit.pdf' are different:
Exception raised: (FileNotFoundError) 2
No such file or directory


The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_small_O1/out/validation/scales/statistics.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out/validation/scales/statistics.pdf' are different:
Exception raised: (FileNotFoundError) 2
No such file or directory


The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_small_O1/out/validation/score_matrix_reports.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out/validation/score_matrix_reports.pdf' are different:
Exception raised: (FileNotFoundError) 2
No such file or directory
Raw output
small_O1_working_directory = (PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/o...h('/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/small_O1'))
data_dir = PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data')

    @pytest.mark.xdist_group("group_O1")
    def test_ValidateSynthesis(small_O1_working_directory, data_dir):
        """Test the synthesis workflow in simple atlas."""
        np.random.seed(0)
    
        # Run the workflow
        assert luigi.build([ValidateSynthesis()], local_scheduler=True)
    
        result_dir, expected_dir, _ = small_O1_working_directory
    
        data_dir_pattern = str(data_dir) + "/?"
        result_dir_pattern = str(result_dir) + "/?"
    
        # Check the results
>       assert_equal_trees(
            expected_dir,
            result_dir,
            specific_args={
                "morphs_df/synth_morphs_df.csv": {
                    "format_data_kwargs": {
                        "replace_pattern": {(result_dir_pattern, ""): ["synth_morphology_path"]}
                    }
                },
                "morphs_df/substituted_morphs_df.csv": {
                    "format_data_kwargs": {
                        "replace_pattern": {(data_dir_pattern, ""): ["path", "morphology_path"]}
                    }
                },
                "morphs_df/morphs_df.csv": {
                    "format_data_kwargs": {
                        "replace_pattern": {(data_dir_pattern, ""): ["path", "morphology_path"]}
                    }
                },
                "morphs_df/axon_morphs_df.csv": {
                    "format_data_kwargs": {
                        "replace_pattern": {(data_dir_pattern, ""): ["path", "clone_path"]}
                    }
                },
                "synthesis/neurots_input/tmd_distributions.json": {
                    "tolerance": 2e-3,
                    "absolute_tolerance": 1e-15,
                },
                "validation/morphology_validation_reports/validation_results.json": {
                    "tolerance": 2e-3,
                    "absolute_tolerance": 1e-12,
                },
            },
        )

/home/runner/work/synthesis-workflow/synthesis-workflow/tests/test_O1_workflow.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

export_formatted_files = '_FORMATTED'
args = (PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_small_O1/out'), PosixPath('/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out'))
kwargs = {'specific_args': {'morphs_df/axon_morphs_df.csv': {'format_data_kwargs': {'replace_pattern': {('/home/runner/work/syn...ow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out/?', ''): ['synth_morphology_path']}}}, ...}}
different_files = {'validation/path_distance_fit.pdf': "The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in...lidation/score_matrix_reports.pdf' are different:\nException raised: (FileNotFoundError) 2\nNo such file or directory"}
sorted_items = [('validation/path_distance_fit.pdf', "The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/i...idation/score_matrix_reports.pdf' are different:\nException raised: (FileNotFoundError) 2\nNo such file or directory")]

    def assert_equal_trees(*args, export_formatted_files=False, **kwargs):
        """Raise an :class:`AssertionError` if differences are found in the two directory trees.
    
        .. note::
            This function has a specific behavior when run with pytest. See the doc of the
            :mod:`dir_content_diff.pytest_plugin`.
    
        Args:
            *args: passed to the :func:`compare_trees` function.
            export_formatted_files (bool, or str): If set to ``True``, the formatted files are exported
                to the directory with the default suffix. If set to a string, it is used as suffix for
                the new directory.
            **kwargs: passed to the :func:`compare_trees` function.
    
        Returns:
            (bool) ``True`` if the trees are equal. If they are not, an :class:`AssertionError` is
            raised.
        """
        # If run with pytest, get the trigger to export formatted data from it
        if export_formatted_files is False and hasattr(
            assert_equal_trees, "_pytest_export_formatted_data"
        ):
            # pylint: disable=no-member
            # pylint: disable=protected-access
            export_formatted_files = assert_equal_trees._pytest_export_formatted_data
            if export_formatted_files is True and assert_equal_trees._pytest_export_suffix:
                export_formatted_files = assert_equal_trees._pytest_export_suffix
    
        different_files = compare_trees(*args, export_formatted_files=export_formatted_files, **kwargs)
    
        # Sort the files according to their relative paths
        sorted_items = sorted(different_files.items(), key=lambda x: x[0])
        # Test that all files are equal and raise the formatted messages if there are differences
        if len(sorted_items) > 0:
>           raise AssertionError("\n\n\n".join([i[1] for i in sorted_items]))
E           AssertionError: The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_small_O1/out/validation/path_distance_fit.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out/validation/path_distance_fit.pdf' are different:
E           Exception raised: (FileNotFoundError) 2
E           No such file or directory
E           
E           
E           The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_small_O1/out/validation/scales/statistics.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out/validation/scales/statistics.pdf' are different:
E           Exception raised: (FileNotFoundError) 2
E           No such file or directory
E           
E           
E           The files '/home/runner/work/synthesis-workflow/synthesis-workflow/tests/data/in_small_O1/out/validation/score_matrix_reports.pdf' and '/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/tmp/popen-gw0/test_ValidateSynthesis0/out/validation/score_matrix_reports.pdf' are different:
E           Exception raised: (FileNotFoundError) 2
E           No such file or directory

/home/runner/work/synthesis-workflow/synthesis-workflow/.tox/py311/lib/python3.11/site-packages/dir_content_diff/__init__.py:385: AssertionError