Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ICARTT Python Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MBEES
ICARTT Python Package
Commits
b310aded
Commit
b310aded
authored
3 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
__version__ from metadata
parent
1b6145af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
__version__ from package metadata
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/icartt/__init__.py
+17
-2
17 additions, 2 deletions
src/icartt/__init__.py
with
17 additions
and
2 deletions
src/icartt/__init__.py
+
17
−
2
View file @
b310aded
from
.dataset
import
Dataset
,
StandardNormalComments
,
Variable
,
Formats
,
VariableType
# TODO: add __version__ ?
# TODO: add __all__ = ("names of exported classes etc.",) ?
\ No newline at end of file
def
get_version
():
try
:
# Python >= 3.8
from
importlib
import
metadata
return
metadata
.
version
(
"
icartt
"
)
except
ImportError
:
# Python <= 3.7
import
pkg_resources
return
pkg_resources
.
get_distribution
(
"
icartt
"
).
version
__version__
=
get_version
()
# TODO: add __all__ = ("names of exported classes etc.",) ?
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment