-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This closes #6
- Loading branch information
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""Utility regarding version numbers.""" | ||
import __main__ as main | ||
from os.path import basename | ||
|
||
from gvar import __version__ as gvar_version | ||
from lsqfit import __version__ as lsqfit_version | ||
from lsqfitgui.version import __version__ as lsqfitgui_version | ||
|
||
|
||
def get_version_string() -> str: | ||
"""Return version string of dependencies.""" | ||
return ( | ||
"(" | ||
+ " | ".join( | ||
[ | ||
f"gvar: {gvar_version}", | ||
f"lsqfit: {lsqfit_version}", | ||
f"lsqfitgui: {lsqfitgui_version}", | ||
] | ||
) | ||
+ ")" | ||
) | ||
|
||
|
||
def get_entrypoint_string(filename_only: bool = True) -> str: | ||
"""Get name of the entry point script.""" | ||
full_name = main.__file__ | ||
name = basename(full_name) if filename_only else full_name | ||
return f"Entrypoint: {name}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""Version infos.""" | ||
|
||
__version__ = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters