You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docker, through setuptools-scm, may be trying to do something like
import tractolearn
tractolearn.__version__
and it is failing because the property is not defined: it does not work either if you try in the console:
AttributeError: module 'tractolearn' has no attribute 'version'
For this to exist it must be defined in tractolearn.__init__: if I put __version__ = "0.0.1", the command tractolearn.__version__ works. So to do it automatically it would be necessary to put something like
Docker is being unable to identify the version for the
tractolearn
package:The current workaround is to pretend a version for the package:
https://github.com/scil-vital/dockerfile_tractolearn/blob/main/Dockerfile#L6
Docker, through
setuptools-scm
, may be trying to do something likeand it is failing because the property is not defined: it does not work either if you try in the console:
For this to exist it must be defined in
tractolearn.__init__
: if I put__version__ = "0.0.1"
, the commandtractolearn.__version__
works. So to do it automatically it would be necessary to put something likeThe next step would be to read the name "tractolearn" automatically:
pyproject.toml
file, orTo do 1,
tomli
and the "pyproject.toml" file must be installed/locatable; to do 2.setuptools_scm
must be installed.The other option is to read the version from
tractolearn/_version.py
which is written at build time bysetuptools_scm
.Slightly related to
scil-vital/tractolearn#37 (comment)
(Adopting a single way to read the version may ease maintenance)
Probably this is required regardless of Docker to be able towards building a PEP-compliant package:
https://peps.python.org/pep-0396/
The text was updated successfully, but these errors were encountered: