Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pep Covas Vidal
PyFstat
Commits
ae60804c
Commit
ae60804c
authored
5 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Run black
parent
4fdfc028
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pyfstat/__init__.py
+1
-0
1 addition, 0 deletions
pyfstat/__init__.py
pyfstat/helper_functions.py
+3
-2
3 additions, 2 deletions
pyfstat/helper_functions.py
setup.py
+17
-16
17 additions, 16 deletions
setup.py
with
21 additions
and
18 deletions
pyfstat/__init__.py
+
1
−
0
View file @
ae60804c
...
...
@@ -29,4 +29,5 @@ from .grid_based_searches import (
from
.helper_functions
import
get_version_information
__version__
=
get_version_information
()
This diff is collapsed.
Click to expand it.
pyfstat/helper_functions.py
+
3
−
2
View file @
ae60804c
...
...
@@ -394,9 +394,10 @@ def match_commandlines(cl1, cl2, be_strict_about_full_executable_path=False):
def
get_version_information
():
version_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)),
'
pyfstat/.version
'
)
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)),
"
pyfstat/.version
"
)
try
:
with
open
(
version_file
,
'
r
'
)
as
f
:
with
open
(
version_file
,
"
r
"
)
as
f
:
return
f
.
readline
().
rstrip
()
except
EnvironmentError
:
print
(
"
No version information file
'
.version
'
found
"
)
This diff is collapsed.
Click to expand it.
setup.py
+
17
−
16
View file @
ae60804c
...
...
@@ -22,24 +22,25 @@ def write_version_file(version):
"""
try
:
git_log
=
subprocess
.
check_output
(
[
'
git
'
,
'
log
'
,
'
-1
'
,
'
--pretty=%h %ai
'
]).
decode
(
'
utf-8
'
)
git_diff
=
(
subprocess
.
check_output
([
'
git
'
,
'
diff
'
,
'
.
'
])
+
subprocess
.
check_output
(
[
'
git
'
,
'
diff
'
,
'
--cached
'
,
'
.
'
])).
decode
(
'
utf-8
'
)
if
git_diff
==
''
:
git_status
=
'
(CLEAN)
'
+
git_log
[
"
git
"
,
"
log
"
,
"
-1
"
,
"
--pretty=%h %ai
"
]
).
decode
(
"
utf-8
"
)
git_diff
=
(
subprocess
.
check_output
([
"
git
"
,
"
diff
"
,
"
.
"
])
+
subprocess
.
check_output
([
"
git
"
,
"
diff
"
,
"
--cached
"
,
"
.
"
])
).
decode
(
"
utf-8
"
)
if
git_diff
==
""
:
git_status
=
"
(CLEAN)
"
+
git_log
else
:
git_status
=
'
(UNCLEAN)
'
+
git_log
git_status
=
"
(UNCLEAN)
"
+
git_log
except
Exception
as
e
:
print
(
"
Unable to obtain git version information, exception: {}
"
.
format
(
e
))
git_status
=
''
print
(
"
Unable to obtain git version information, exception: {}
"
.
format
(
e
))
git_status
=
""
version_file
=
'
.version
'
version_file
=
"
.version
"
if
path
.
isfile
(
version_file
)
is
False
:
with
open
(
'
pyfstat/
'
+
version_file
,
'
w+
'
)
as
f
:
f
.
write
(
'
{}: {}
'
.
format
(
version
,
git_status
))
print
(
'
Done
'
,
version_file
,
version
,
git_status
)
with
open
(
"
pyfstat/
"
+
version_file
,
"
w+
"
)
as
f
:
f
.
write
(
"
{}: {}
"
.
format
(
version
,
git_status
))
print
(
"
Done
"
,
version_file
,
version
,
git_status
)
return
version_file
...
...
@@ -61,7 +62,7 @@ here = path.abspath(path.dirname(__file__))
with
open
(
path
.
join
(
here
,
"
README.md
"
),
encoding
=
"
utf-8
"
)
as
f
:
long_description
=
f
.
read
()
VERSION
=
'
1.3
'
VERSION
=
"
1.3
"
version_file
=
write_version_file
(
VERSION
)
setup
(
...
...
@@ -79,7 +80,7 @@ setup(
"
pyfstat
"
:
[
"
pyCUDAkernels/cudaTransientFstatExpWindow.cu
"
,
"
pyCUDAkernels/cudaTransientFstatRectWindow.cu
"
,
version_file
version_file
,
]
},
python_requires
=
"
>=%s.%s.%s
"
%
min_python_version
[:
3
],
...
...
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