-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(setup): refactor setup scripts
- Loading branch information
Showing
7 changed files
with
108 additions
and
49 deletions.
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"""Prometheus exporter built on top of ``nvitop``.""" | ||
|
||
__version__ = '1.3.2' | ||
__version_tuple__ = tuple(map(int, __version__.split('.'))) | ||
__license__ = 'Apache-2.0' | ||
__author__ = __maintainer__ = 'Xuehai Pan' | ||
__email__ = '[email protected]' | ||
|
@@ -28,8 +29,8 @@ | |
|
||
try: | ||
prefix, sep, suffix = ( | ||
subprocess.check_output( | ||
['git', 'describe', '--abbrev=7'], # noqa: S603,S607 | ||
subprocess.check_output( # noqa: S603 | ||
['git', 'describe', '--abbrev=7'], # noqa: S607 | ||
cwd=os.path.dirname(os.path.abspath(__file__)), | ||
stderr=subprocess.DEVNULL, | ||
text=True, | ||
|
@@ -43,10 +44,11 @@ | |
if sep: | ||
version_prefix, dot, version_tail = prefix.rpartition('.') | ||
prefix = f'{version_prefix}{dot}{int(version_tail) + 1}' | ||
__version__ = sep.join((prefix, suffix)) | ||
__version__ = f'{prefix}{sep}{suffix}' | ||
del version_prefix, dot, version_tail | ||
else: | ||
__version__ = prefix | ||
__version_tuple__ = tuple(map(int, prefix.split('.'))) | ||
del prefix, sep, suffix | ||
except (OSError, subprocess.CalledProcessError): | ||
pass | ||
|
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
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"""An interactive NVIDIA-GPU process viewer and beyond, the one-stop solution for GPU process management.""" | ||
|
||
__version__ = '1.3.2' | ||
__version_tuple__ = tuple(map(int, __version__.split('.'))) | ||
__license__ = 'GPL-3.0-only AND Apache-2.0' | ||
__author__ = __maintainer__ = 'Xuehai Pan' | ||
__email__ = '[email protected]' | ||
|
@@ -28,8 +29,8 @@ | |
|
||
try: | ||
prefix, sep, suffix = ( | ||
subprocess.check_output( | ||
['git', 'describe', '--abbrev=7'], # noqa: S603,S607 | ||
subprocess.check_output( # noqa: S603 | ||
['git', 'describe', '--abbrev=7'], # noqa: S607 | ||
cwd=os.path.dirname(os.path.abspath(__file__)), | ||
stderr=subprocess.DEVNULL, | ||
text=True, | ||
|
@@ -43,10 +44,11 @@ | |
if sep: | ||
version_prefix, dot, version_tail = prefix.rpartition('.') | ||
prefix = f'{version_prefix}{dot}{int(version_tail) + 1}' | ||
__version__ = sep.join((prefix, suffix)) | ||
__version__ = f'{prefix}{sep}{suffix}' | ||
del version_prefix, dot, version_tail | ||
else: | ||
__version__ = prefix | ||
__version_tuple__ = tuple(map(int, prefix.split('.'))) | ||
del prefix, sep, suffix | ||
except (OSError, subprocess.CalledProcessError): | ||
pass | ||
|
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