pynbody / tangos

The Agile Numerical Galaxy Organisation System
BSD 3-Clause "New" or "Revised" License
19 stars 13 forks source link

file_ignore_pattern ignored if extension is None in finding.py #251

Closed anchwr closed 9 months ago

anchwr commented 9 months ago

I'm creating a tangos db for a new set of ChaNGa runs and tried to use file_ignore_pattern in config.py to prevent timesteps located in the same parent folder, but for runs with alternate physics, from being added to the same db. However, file_ignore_pattern isn't checked against potential timesteps unless "extension" is not None in input_handlers/finding.py's find:

https://github.com/pynbody/tangos/blob/6358013d987d6ee8b87c8598bd0f61cd653d5dd6/tangos/input_handlers/finding.py#L19-L32

I ended up altering the above to move ln 25 out of the if statement. Is there a reason that it's placed there? If not, I'm happy to submit a pull request to change this.

apontzen commented 9 months ago

Thanks! As far as I can see it should be fine to make this change.

anchwr commented 9 months ago

Awesome! Just made a pull request.