pyiron/pyiron_base

Pulling out super small modules?

liamhuber opened this issue · 3 comments

So for pyiron_workflow I was looking at what my pyiron_base dependencies actually are, and it's really just Singleton and logger.

When it comes to extracting re-usable packages, how small should we go? For instance, singleton's are actually pretty useful, but when I looked on conda-forge for "singleton" there is really not a lot there. The implementation as a decorator is alright, but (a) I like our metaclass paradigm better, and (b) the code hasn't been touched forever so there's minor things like the CI stopping at py3.6.

Does anyone have opinions on pulling Singleton (and maybe other stuff?) out as ultra-tiny package(s)?

An alternative would be to create one package for commonly used utilities like the https://github.com/materialsvirtuallab/monty package from the materials project.

Yes, that might be really nice. It might be nice to collect all the tools and tidbits that, eg, depend exclusively on the standard library. Then they could be added to literally any project with almost zero overhead.

As of the meeting today we decided that this is a fine idea. Any bits of pieces of pyiron that

  • Depend only on the standard library
  • Get used (or want to get used right now!) in at least two other pyiron repos

Can get pulled out into a special pyiron utils repo. I'll take care of this eventually, starting with the base logger and singleton code.