def main(fail=False):
    try:
        if compat.python_major == 3:
            print('Running Python 3, will not use Sumatra.')
            sumatra_project = None
        else:
            sumatra_project = '.'

        if fail:
            print('There better be not any diffs.')

        # Create an environment that handles running
        with Environment(trajectory='Example1_Quick_And_Not_So_Dirty',
                         filename=os.path.join('experiments',
                                               'HDF5',),
                          file_title='Example1_Quick_And_Not_So_Dirty',
                          comment='The first example!',
                          complib='blosc',
                          small_overview_tables=False,
                          git_repository='.', git_message='Im a message!',
                          git_fail=fail,
                          sumatra_project=sumatra_project, sumatra_reason='Testing!') as env:

            # Get the trajectory from the environment
            traj = env.v_trajectory

            # Add both parameters
            traj.f_add_parameter('x', 1, comment='Im the first dimension!')
            traj.f_add_parameter('y', 1, comment='Im the second dimension!')

            # Explore the parameters with a cartesian product:
            traj.f_explore(cartesian_product({'x':[1,2,3], 'y':[6,7,8]}))

            # Run the simulation
            env.f_run(multiply)

            # Check that git information was added to the trajectory
            assert 'config.git.hexsha' in traj
            assert 'config.git.committed_date' in traj
            assert 'config.git.message' in traj
            assert 'config.git.name_rev' in traj

            print("Python git test successful")

            # traj.f_expand({'x':[3,3],'y':[42,43]})
            #
            # env.f_run(multiply)
    except Exception as exc:
        print(repr(exc))
        sys.exit(1)
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/tests/integration/git_check.py/main/original