vocalpy / crowsetta

A tool to work with any format for annotating animal sounds
https://crowsetta.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
51 stars 3 forks source link

remove entry points #94

Closed NickleDave closed 2 years ago

NickleDave commented 3 years ago

following up on #92 -- rewriting tests and realizing it's not easy to test formats.show

the one unit test as written now could pass even if formats.show does not return any installed formats. i.e. it would "pass" but actually be failing silently, because formats.show would return nothing and then we would assert that nothing is in whatever formats.show returned.

as described in #92 we could change crowsetta.formats.show to return e.g. a list of strings

the issue here is: how do we test that output is correct?

not sure what a better way would be. The problem is that currently the plugin entry points for the package are specified in the pyproject.toml. Might be worth thinking about other ways to specify the format plugins, e.g. a namespace package? https://packaging.python.org/guides/creating-and-discovering-plugins/

which would then make it more possible? to test plugins like formats dynamically, with some approach like this https://stackoverflow.com/questions/40514205/how-to-dynamically-add-and-load-entry-points

NickleDave commented 2 years ago

I think entry points are actually more trouble than they're worth. Most people that are not devs are not going to use this way of adding a format.

Changing this issue to "remove entry points"