Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
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
Show more breadcrumbs
FSL
fslpy
Commits
12e9b081
Commit
12e9b081
authored
5 years ago
by
Taylor Hanayik
Committed by
Paul McCarthy
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ENH: update fslversion call for the future :hash version
parent
430bba8b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AUTHOR
+2
-1
2 additions, 1 deletion
AUTHOR
fsl/utils/platform.py
+4
-1
4 additions, 1 deletion
fsl/utils/platform.py
tests/test_platform.py
+2
-2
2 additions, 2 deletions
tests/test_platform.py
with
8 additions
and
4 deletions
AUTHOR
+
2
−
1
View file @
12e9b081
...
...
@@ -2,4 +2,5 @@ Paul McCarthy <pauldmccarthy@gmail.com>
Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Matthew Webster <matthew.webster@ndcn.ox.ac.uk>
Sean Fitzgibbon <sean.fitzgibbon@ndcn.ox.ac.uk>
Martin Craig <martin.craig@eng.ox.ac.uk>
\ No newline at end of file
Martin Craig <martin.craig@eng.ox.ac.uk>
Taylor Hanayik <taylor.hanayik@ndcn.ox.ac.uk>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
fsl/utils/platform.py
+
4
−
1
View file @
12e9b081
...
...
@@ -287,7 +287,10 @@ class Platform(notifier.Notifier):
if
op
.
exists
(
versionFile
):
with
open
(
versionFile
,
'
rt
'
)
as
f
:
self
.
__fslVersion
=
f
.
read
().
strip
()
# split string at colon for new hash style versions
# first object in list is the non-hashed version string (e.g. 6.0.2)
# if no ":hash:" then standard FSL version string is still returned
self
.
__fslVersion
=
f
.
read
().
strip
().
split
(
"
:
"
)[
0
]
self
.
notify
(
value
=
value
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_platform.py
+
2
−
2
View file @
12e9b081
...
...
@@ -161,7 +161,7 @@ def test_fsldir():
def
makeFSL
():
os
.
makedirs
(
op
.
join
(
fsldir
,
'
etc
'
))
with
open
(
op
.
join
(
fsldir
,
'
etc
'
,
'
fslversion
'
),
'
wt
'
)
as
f
:
f
.
write
(
'
Dummy FSL
\n
'
)
f
.
write
(
'
6.0.2:7606e0d8
\n
'
)
try
:
...
...
@@ -182,7 +182,7 @@ def test_fsldir():
assert
os
.
environ
[
'
FSLDIR
'
]
==
fsldir
assert
newFSLDir
[
0
]
==
fsldir
assert
p
.
fsldir
==
fsldir
assert
p
.
fslVersion
==
'
Dummy FSL
'
assert
p
.
fslVersion
==
'
6.0.2
'
finally
:
shutil
.
rmtree
(
testdir
)
...
...
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