Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ymmsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
This package contains all the classes needed to represent a yMMSL file,
as well as to read and write yMMSL files.
"""
import importlib
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import importlib
import importlib.metadata

Perhaps it now works because someone (perhaps third party dependency?) already imported the metadata submodule, but in a fresh python session this gives an error:

>>> import importlib
>>> importlib.metadata
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'importlib' has no attribute 'metadata'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks, I'll fix that and test it!


from ymmsl.conversion.converter import convert_to, DowngradeError
from ymmsl.document import Document
from ymmsl.io import dump, load, load_as, save
Expand All @@ -11,7 +13,7 @@
from ymmsl.v0_2 import Operator, Settings


__version__ = '0.15.1-dev'
__version__ = importlib.metadata.version("ymmsl")
__author__ = 'Lourens Veen'
__email__ = 'l.veen@esciencecenter.nl'

Expand Down
Loading