Closed nilssass closed 1 month ago
We should be careful with changing the name of functions in Particle.
These are just some thoughts coming to my mind after seeing the comment of your PR. Haven't had time to look at the code and the new names yet.
Absolutely, the Changelog needs of course to be adjusted, this I will add. Besides that I have carefully checked for all occurrences of the functions in the entire code base and made sure that all tests pass. I see the point that renaming function names will potentially break user scripts. That's why I want to clean them up all together once, especially for version 2.0, where a user might expect some bigger changes. With this PR we should be done with name changes and all names are such that they are easily findable if an user works with an IDE.
@NGoetz this PR is ready for a second review
@Hendrik1704 @NGoetz Once Niklas reviewed the PR, please, do not yet merge it. I am just modifying the open PR #264 as I realized how many code duplications we have in Filters.py. I am just cleaning it up and I think it will be more efficient to first merge #264 once it is ready
In this PR I do two things:
1. Renaming Member Functions
In Particle we have chosen function names that are suboptimal and not intuitive to find or they contained parts in their name that do not contain any useful information. I have renamed them to make them more precise and easier to find. They are:
2. Introducing Helper Functions
In tests/test_JetAnalysis.py we were comparing two nested lists using
However, this fails on different machines because of numerical precision when comparing floats. I have introduced a new file tests/HelperFunctions.py that contains a function to compare two lists taking into account the limits of numerical precision. This function is now used