tpgillam / mt2

Stransverse mass computation, compatible with numpy.
MIT License
4 stars 3 forks source link

fix: correct packaging issues #56

Closed henryiii closed 2 weeks ago

henryiii commented 3 weeks ago

Should fix #55.

tpgillam commented 2 weeks ago

Thanks for looking at this!

I was initially surprised as I had hoped that the cibuildwheel option to test the wheels that we are using would have caught this, but it did not. We’ll need to figure out how to add a check that would have caught this.

henryiii commented 2 weeks ago

The problem is that you aren't using src structure. This is a good idea for all code, but an especially good idea for compiled code. See https://learn.scientific-python.org/development/guides/packaging-simple/#package-structure. So you are often picking up the local "mt2" directory and not noticing that it's not in the wheel.

tpgillam commented 2 weeks ago

The problem is that you aren't using src structure.

I can certainly believe that might be a fix.

But why must it be the only fix? Another option would be for the tests to be run in an isolated environment in which we install the generated wheel explicitly. This seems less sensitive to future changes.