transientskp / pyse

Python Source Extractor
BSD 2-Clause "Simplified" License
11 stars 5 forks source link

Can the ObjectContainer class be removed? #56

Open HannoSpreeuw opened 4 months ago

HannoSpreeuw commented 4 months ago

@suvayu noticed that the ObjectContainer class has little more than a closest_to method which raises the question if this class could be removed.

I will try to find out what breaks in PySE and in TraP if we remove it.

HannoSpreeuw commented 1 month ago

I investigated TraP wrt the ObjectContainer class. It can be removed there and will be after this PR is merged.

HannoSpreeuw commented 1 month ago

The only two problems remaining are lines 56 and 92 in test_L15_12h_const.py.

There the closest_to method is tested.

But if we remove the closest_to method, we do not need to test it, i.e. we can remove those two unit tests, I would think.

HannoSpreeuw commented 1 month ago

An easy solution may be to add the closest_to method to the L15_12hConstObs class and to the L15_12hConstCor class.

Downside is that you have to add the same method twice.

HannoSpreeuw commented 3 weeks ago

Why is this closed? I mean, the ObjectContainer class is still there.

suvayu commented 3 weeks ago

Not sure, I think it got closed automatically, or maybe I mistook it for another issue.