Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Import version information into the module #20

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

stes
Copy link
Contributor

@stes stes commented Apr 8, 2021

One line fix to automatically import the __version__ attribute as in the main DLC package for consistency between the packages.

Steps to repro

For deeplabcutcore, run:

try:
    import deeplabcut as dlc
except ModuleNotFoundError:
    import deeplabcutcore as dlc
import tensorflow as tf
print(f"Loaded DeepLabCut {dlc.__version__} for Tensorflow {tf.__version__}")

raises

Traceback (most recent call last):                                                 
  File "test.py", line 8, in <module>                                              
    print(f"Loaded DeepLabCut {dlc.__version__} for Tensorflow {tf.__version__}")  
AttributeError: module 'deeplabcutcore' has no attribute '__version__'             

@AlexEMG
Copy link
Member

AlexEMG commented Apr 14, 2021

Good point! That was forgotten

@AlexEMG AlexEMG closed this Apr 14, 2021
@AlexEMG AlexEMG reopened this Apr 14, 2021
@AlexEMG AlexEMG merged commit 67e5037 into DeepLabCut:master Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants