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
We successfully used importlib.metadata.version in avid-cli to extract version from pyproject.toml? I don't know why it works now, but it does. Should we gradually try it out in the repos that use acautils.version_handler() or just leave it?
The text was updated successfully, but these errors were encountered:
acautils.version_handler() is not working as intented right now, and it has proven a hard challenge to make a generel version handler for our (few) tools. I have tried to find out how importlib.metadata.version finds the version info (docu for importlib & realpython walkthrough), but i have not been able to find any detailed explanation.
I have talked with Mads about it and it appears that if you use poetry to make a tool, poetry conforms to the standards of the importlib and importlib.metadata.version is able to find the version info.
I think it is a good idea to try it out and hope that most of our tools are simple enough for the metadata.version call to work. I can't see why it shouldn't work, and i think it would be a good idea to try to implement it on some of our tools and then stop our own version handler project.
We have tried before with importlib.metadata.version, but I think the reason we made our own version_handler is that importlib.metadata.version wasn't implemented before version 3.8, and the "version"-key was hidden under the [poetry.tool]-table in pyproject.toml! This might work today bacause we only (?) use 3.8 above and/or poetry has since made sure, that it exposes the version-metadata even though it requires it to be hidden under [poetry.tool] instead of the recommendation of the spec, which is under [project]. In short, let's go with importlib.metadata.version.
We successfully used importlib.metadata.version in
avid-cli
to extract version from pyproject.toml? I don't know why it works now, but it does. Should we gradually try it out in the repos that use acautils.version_handler() or just leave it?The text was updated successfully, but these errors were encountered: