-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We forgot to change version in __init__.py file #62
Comments
Oops, we should change this to using the from importlib.metadata import version
__version__ = version("gsw_xarray") Probably with a fallback for funny install situations (i.e. dev) |
python-poetry/poetry#144 (comment)
There seems to be an easy solution for the dev. I don't really know how to test it though... |
Other solution, that does not require to add toml as mandatory dependency (but only as dev dependency): python-poetry/poetry#144 (comment)
import toml
from pathlib import Path
import my_package
def test_versions_are_in_sync():
"""Checks if the pyproject.toml and package.__init__.py __version__ are in sync."""
path = Path(__file__).resolve().parents[2] / "pyproject.toml"
pyproject = toml.loads(open(str(path)).read())
pyproject_version = pyproject["tool"]["poetry"]["version"]
package_init_version = my_package.__version__
assert package_init_version == pyproject_version |
I like quite well this 2nd option |
@DocOtak Which option would you prefer? |
Version is still 0.2.1
I guess we just need to take care to update it next time
The text was updated successfully, but these errors were encountered: