I’m looking for suggestions/approaches on using
nbdev to create python packages with variants, e.g.:
Lets say I have a main package named
foo which combines the functionalities of
collab modules plus some core functionalities that come with the
Now I want to offer subsets of the
foo package such as
foo[audio] which only contain the functionalities/modules of the core functionality plus the particular domain (ie. vision, audio, text, etc) - with the goal being able to reduce the size of the variant packages plus reduce the number of dependencies of the required packages for each variant (e.g. if I was using
foo[vision], I don’t want to have to install the dependencies required by the
I know that based on this discussion, each of these subsetted modules (e.g.
foo[vision] ) are actually separate packages from each other and its only a convention that isn’t enforced by any tooling (i.e.
foo[vision] can be totally unrelated packages).
But I was wondering if there was anything in nbdev (or something related) that could assist me in maintaining the main module and probably doing something to sync it across different nbdev projects.
The ideal scenario would be I would have a
foo.core set of notebooks (which have a
default_exp set to
foo.core and I would have another set of notebooks in another nbdev project that have a
default_exp set to
foo.vision.* modules and another nbdev project for
foo.audio and so on and so forth. Then I just run some make commands to build them and release them to pypi automagically…
As for the documentation, I could just have the main
foo package automagically include the submodules into 1 nicely packaged doc site…
Any ideas on how this could be done? I’m thinking stuff like using symbolic links to connect different subdirectories across nbdev projects might work but suggestions are welcome!