Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
b67d65d4
Commit
b67d65d4
authored
Jun 02, 2017
by
Paul McCarthy
🚵
Browse files
Merge branch 'master' into 'master'
Make ready for public release See merge request !18
parents
c50ace78
76789c43
Pipeline
#526
canceled with stage
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
MANIFEST.in
View file @
b67d65d4
...
...
@@ -2,5 +2,7 @@ include LICENSE
include COPYRIGHT
include README.md
include requirements.txt
recursive-include doc *
recursive-include tests *
include pytest.ini
recursive-include doc *
recursive-exclude doc/html *
recursive-include tests *
README.md
View file @
b67d65d4
...
...
@@ -20,8 +20,7 @@ Documentation
-------------
`fslpy`
is documented using
[
sphinx
](
http://http://sphinx-doc.org/
)
. You can
build the API documentation by installing
`sphinx`
and
`sphinx-rtd-theme`
, and
running:
build the API documentation by running:
python setup.py doc
...
...
@@ -35,8 +34,7 @@ guide](doc/contributing.rst).
Tests
-----
To run the tests, install
`mock`
,
`pytest`
,
`pytest-runner`
,
`pytest-html`
,
and
`pytest-cov`
, and then run:
Run the test suite via:
python setup.py test
...
...
fsl/version.py
View file @
b67d65d4
...
...
@@ -32,7 +32,7 @@ which roughly obeys the Semantic Versioning conventions (http://semver.org/):
import
string
__version__
=
'
1.0.0
'
__version__
=
'
dev
'
"""Current version number, as a string. """
...
...
@@ -44,6 +44,9 @@ def parseVersionString(versionString):
An error is raised if the ``versionString`` is invalid.
"""
if
versionString
==
'dev'
:
return
9999
,
9999
,
9999
components
=
versionString
.
split
(
'.'
)
# Major, minor, and point
...
...
setup.cfg
View file @
b67d65d4
[aliases]
test=pytest
[bdist_wheel]
universal=1
\ No newline at end of file
setup.py
View file @
b67d65d4
...
...
@@ -8,11 +8,8 @@
from
__future__
import
print_function
import
os
import
os.path
as
op
import
subprocess
as
sp
import
shutil
import
pkgutil
import
os.path
as
op
import
shutil
from
setuptools
import
setup
from
setuptools
import
find_packages
...
...
@@ -38,6 +35,7 @@ with open(op.join(basedir, "fsl", "version.py")) as f:
if
line
.
startswith
(
'__version__'
):
exec
(
line
,
version
)
break
version
=
version
[
'__version__'
]
with
open
(
op
.
join
(
basedir
,
'README.md'
),
'rt'
)
as
f
:
readme
=
f
.
read
()
...
...
@@ -62,34 +60,37 @@ class doc(Command):
if
op
.
exists
(
destdir
):
shutil
.
rmtree
(
destdir
)
env
=
dict
(
os
.
environ
)
dirname
=
pkgutil
.
get_loader
(
'fsl'
).
get_filename
()
dirname
=
op
.
dirname
(
dirname
)
dirname
=
op
.
abspath
(
op
.
join
(
dirname
,
'..'
))
ppath
=
[
dirname
]
print
(
'Building documentation [{}]'
.
format
(
destdir
))
env
[
'PYTHONPATH'
]
=
op
.
pathsep
.
join
(
ppath
)
import
sphinx
print
(
'Building documentation [{}]'
.
format
(
destdir
))
try
:
import
unittest.mock
as
mock
except
:
import
mock
sp
.
call
([
'sphinx-build'
,
docdir
,
destdir
],
env
=
env
)
mockedModules
=
[
'nibabel'
,
'nibabel.fileslice'
,
'numpy'
,
'numpy.linalg'
]
mockobj
=
mock
.
MagicMock
()
mockedModules
=
{
m
:
mockobj
for
m
in
mockedModules
}
setup
(
with
mock
.
patch
.
dict
(
'sys.modules'
,
**
mockedModules
):
sphinx
.
main
([
'sphinx-build'
,
docdir
,
destdir
])
name
=
'fslpy'
,
version
=
version
[
'__version__'
],
setup
(
name
=
'fslpy'
,
version
=
version
,
description
=
'FSL Python library'
,
long_description
=
readme
,
url
=
'https://git.fmrib.ox.ac.uk/fsl/fslpy'
,
author
=
'Paul McCarthy'
,
author_email
=
'pauldmccarthy@gmail.com'
,
license
=
'Apache License Version 2.0'
,
classifiers
=
[
...
...
@@ -101,10 +102,9 @@ setup(
'Topic :: Software Development :: Libraries :: Python Modules'
],
packages
=
packages
,
install_requires
=
install_requires
,
setup_requires
=
[
'pytest-runner'
,
'sphinx'
,
'sphinx-rtd-theme'
,
'mock'
],
setup_requires
=
[
'pytest-runner'
],
tests_require
=
[
'mock'
,
'pytest-cov'
,
'pytest-html'
,
...
...
@@ -113,11 +113,4 @@ setup(
test_suite
=
'tests'
,
cmdclass
=
{
'doc'
:
doc
},
entry_points
=
{
'console_scripts'
:
[
'fslpy_imcp = fsl.scripts.imcp:main'
,
'fslpy_immv = fsl.scripts.immv:main'
]
}
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment