This stands in stark contrast to other nbdev autogenerated documents and files which allow for the user to edit them without overwriting their edits (e.g. in __init__.py files of your package.
If for whatever reason, whatsoever Conda's test environment can not make your package run (even if it passes conda verify locally), your release with nbdev will fail and all of your configuration options required to make the test pass are locked out. Of course you can make your own meta.yml file and build it independently, but the point is that this line makes nbdev_conda a very frustrating API.
While commenting out the test section may be in poor form, looking through the official conda-archive/conda-recipes one can find no shortage or examples just commenting out the test section (e.g. this one).
Proposed solutions
immediate fix: add a --meta argument to nbdev_conda that lets users point to a custom meta.yml file.
short term: have that file serve as a template i.e. merge dictionary keys, so that way things like "version" still get updated automatically
long term: make meta.yml consistent with other autogenerated docs.
Resources and References
Some key functions inside nbdev can be found here:
Crux of the issue
In
nbdev.release._get_conda_meta
lines220-233
we have the following:This stands in stark contrast to other
nbdev
autogenerated documents and files which allow for the user to edit them without overwriting their edits (e.g. in__init__.py
files of your package.Why is this a problem?
Line 224
If for whatever reason, whatsoever Conda's test environment can not make your package run (even if it passes conda verify locally), your release with
nbdev
will fail and all of your configuration options required to make the test pass are locked out. Of course you can make your ownmeta.yml
file and build it independently, but the point is that this line makesnbdev_conda
a very frustrating API.While commenting out the
test
section may be in poor form, looking through the officialconda-archive/conda-recipes
one can find no shortage or examples just commenting out thetest
section (e.g. this one).Proposed solutions
--meta
argument tonbdev_conda
that lets users point to a custommeta.yml
file.meta.yml
consistent with other autogenerated docs.Resources and References
Some key functions inside
nbdev
can be found here:release_conda(...)
write_conda_meta(path='conda')
_get_conda_meta()