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

Bring 3.5 compatibility to windows #535

Open
aphearin opened this issue May 31, 2016 · 1 comment
Open

Bring 3.5 compatibility to windows #535

aphearin opened this issue May 31, 2016 · 1 comment

Comments

@aphearin
Copy link
Contributor

Currently, PYTHON_VERSION=2.7 for appveyor.yml. During #531, @bsipocz discovered that halotools is not 3.5 compatible in windows environments. There is a single test failure, the test_reader_configurations function in halotools/sim_manager/tests/test_rockstar_hlist_reader.py raises a mysterious IndexError when run on AppVeyor in python 3.5. This test passes for all versions of python executed in a Unix environment, and this test also passes on AppVeyor windows environment for python 2.7.

When this test failure is resolved, and 3.5 compatibility is brought to windows, then PYTHON_VERSION should be set to 3.5 in appveyor.yml.

@bsipocz
Copy link
Member

bsipocz commented May 31, 2016

Full log is available here: https://ci.appveyor.com/project/Astropy/halotools/build/1.0.267/job/2dlreqgxgafug44r

The traceback of the failure:

================================== FAILURES =================================== 
_____________ TestRockstarHlistReader.test_reader_configurations ______________ 

self = <halotools.sim_manager.tests.test_rockstar_hlist_reader.TestRockstarHlistReader testMethod=test_reader_configurations> 

    @pytest.mark.skipif('not HAS_H5PY') 
    def test_reader_configurations(self): 
        """ 
            """ 
        num_halos = 100 
        temp_fname = os.path.join(self.tmpdir, 'temp_ascii_halo_catalog.list') 
        write_temporary_ascii(num_halos, temp_fname) 

        columns_to_keep_dict = ( 
            {'halo_spin_bullock': (0, 'f4'), 'halo_id': (1, 'i8'), 
            'halo_x': (3, 'f4'), 
            'halo_y': (4, 'f4'), 
            'halo_z': (5, 'f4'), 
            }) 

        reader = RockstarHlistReader( 
            input_fname=temp_fname, 
            columns_to_keep_dict=columns_to_keep_dict, 
            output_fname='std_cache_loc', 
            simname='bolplanck', halo_finder='rockstar', redshift=11.8008, 
            version_name='dummy', Lbox=250., particle_mass=1.35e8, 
            ) 
>       reader.read_halocat([], add_supplementary_halocat_columns=False) 

halotools\sim_manager\tests\test_rockstar_hlist_reader.py:304:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
halotools\sim_manager\rockstar_hlist_reader.py:602: in read_halocat 
    result = self._read_ascii(**kwargs) 
halotools\sim_manager\rockstar_hlist_reader.py:665: in _read_ascii 
    return TabularAsciiReader.read_ascii(self, **kwargs) 
halotools\sim_manager\tabular_ascii_reader.py:577: in read_ascii 
    self.data_chunk_generator(num_rows_in_chunk, f)), dtype=self.dt) 
halotools\sim_manager\tabular_ascii_reader.py:482: in data_chunk_generator 
    yield tuple(parsed_line[i] for i in self.column_indices_to_keep) 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <list_iterator object at 0x000000ACA79365C0> 

>   yield tuple(parsed_line[i] for i in self.column_indices_to_keep) 
E   IndexError: list index out of range 

halotools\sim_manager\tabular_ascii_reader.py:482: IndexError 
---------------------------- Captured stdout call ----------------------------- 


The information about your ascii file and the metadata about the catalog 
have been processed and no exceptions were raised. 
Use the ``read_halocat`` method to read the ascii data, 
setting the write_to_disk and update_cache_log arguments as you like. 
See the docstring of the ``read_halocat`` method
for details about these options. 


...Processing ASCII data of file: 
C:\Users\appveyor\tmp_testingdir\temp_ascii_halo_catalog.list

Total number of rows in detected data = 100
Number of rows in detected header = 4 

... working on chunk 0 of 1 
============= 1 failed, 671 passed, 53 skipped in 396.87 seconds ============== 
Command exited with code 1

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

No branches or pull requests

2 participants