Move to src layout
Instead of the "flat" layout, we should use the "src" layout.
More here: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html#the-src-layout-and-testing
is that it ensures tests are run against the installed version of your package rather than the files in your package working directory
I'm not opposed to it, but I find this is rather debatable, and most Python packages don't do this. For packages that don't have c-extensions (like this one) it's not really an issue that needs solving IMO. Also it obfuscates the list of files on github. Like if I go to https://github.com/numpy/numpy the source code is somewhere in the numpy folder. If it's moved in src/numpy, I have one extra useless dir to go though before ending up on the file I need. Same in an IDE.
For pyodide src makes sense because it's a complex project. But for simple python projects the simpler it is the better.
I really appreciate you doing the maintenance though! So if you want to do it, go for it :)
Thanks, @rth. It is usually recommended that if one were to start a new package today, they should almost always go with this format rather than a flat one. However, I agree with your point about the src/ dir being redundant! Also, not being a compiled package does help not require it.
BTW, I would say that NumPy here isn't the best example. The reason it hasn't migrated (or been able to migrate, rather) to an src/ layout has been its popularity and corresponding inertia owing to its big contributor base—it has almost 200 open PRs at any time, and switching a bunch of files overnight would cause disruptions on virtually every open PR, and troubles with beginner contributors as it's difficult for them to (and can't be expected of them to) address conflicts that span across moved files.
So, I'll leave this issue open in the meantime, and we can consider choosing the option where the vote sways to in case anyone else from our team has any thoughts. :)