Skip to content

Commit

Permalink
Merge pull request #10 from AMYPAD/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl authored Dec 29, 2020
2 parents 931ab4d + eed2723 commit d11fb64
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 55 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['2.7', '3.7']
python: [2.7, 3.6, 3.9]
name: Check py${{ matrix.python }}
steps:
- uses: actions/checkout@v2
Expand All @@ -27,9 +27,7 @@ jobs:
- uses: reviewdog/action-setup@v1
- if: github.event_name != 'schedule'
run: |
set -o pipefail
pre-commit run -a flake8 | \
reviewdog -f=pep8 -name=flake8 -tee -reporter=github-check -filter-mode nofilter
pre-commit run -a flake8 | reviewdog -f=pep8 -name=flake8 -tee -reporter=github-check -filter-mode nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: startsWith(matrix.python, '3')
Expand All @@ -44,7 +42,7 @@ jobs:
with:
fetch-depth: 0
- run: pip install -U .[dev]
- run: python -m tests --cov-report=term-missing --cov-report=xml
- run: pytest
- run: codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ write_to = "spm12/_dist_ver.py"
write_to_template = "__version__ = '{version}'\n"

[tool.black]
target-version = ['py27', 'py36']
target_version = ["py27", "py36", "py38"]
59 changes: 31 additions & 28 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[metadata]
name = spm12
description = Statistical Parametric Mapping
long_description = file: README.rst
long_description_content_type = text/x-rst
license = Apache 2.0
license_file = LICENCE.md
url = https://github.com/AMYPAD/SPM12
project_urls =
name=spm12
description=Statistical Parametric Mapping
long_description=file: README.rst
long_description_content_type=text/x-rst
license=Apache 2.0
license_file=LICENCE.md
url=https://github.com/AMYPAD/SPM12
project_urls=
Changelog = https://github.com/AMYPAD/SPM12/releases
Documentation = https://github.com/AMYPAD/SPM12/#SPM12
Upstream Project = https://www.fil.ion.ucl.ac.uk/spm
maintainer = Casper da Costa-Luis
maintainer_email = casper.dcl@physics.org
keywords = fMRI, PET, SPECT, EEG, MEG
platforms = any
provides = spm12
classifiers =
Upstream Project=https://www.fil.ion.ucl.ac.uk/spm
maintainer=Casper da Costa-Luis
maintainer_email=casper.dcl@physics.org
keywords=fMRI, PET, SPECT, EEG, MEG
platforms=any
provides=spm12
classifiers=
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: Education
Expand All @@ -38,18 +38,18 @@ classifiers =
Topic :: System :: Installation/Setup
[options]
zip_safe = False
setup_requires = setuptools>=42; setuptools_scm[toml]>=3.4
install_requires =
setup_requires=setuptools>=42; wheel; setuptools_scm[toml]>=3.4
install_requires=
argopt
miutil[nii]>=0.1.0,!=0.4.0,!=0.4.1
setuptools # pkg_resources
brainweb>=1.6.2
numpy
scipy
include_package_data = True
packages = find:
include_package_data=True
packages=find:
[options.extras_require]
dev =
dev=
pre-commit
twine
wheel
Expand All @@ -58,23 +58,26 @@ dev =
pytest-timeout
pytest-xdist
codecov
demo =
demo=
miutil[plot]>=0.3.0
matplotlib
[options.entry_points]
console_scripts =
spm12 = spm12.cli:main
spm12=spm12.cli:main
[options.package_data]
* = *.md, *.rst, *.m
*=*.md, *.rst, *.m

[bdist_wheel]
universal = 1

[flake8]
max_line_length = 88
extend-ignore = E203,P1
exclude = .git,__pycache__,build,dist,.eggs
max_line_length=88
extend-ignore=E203,P1
exclude=.git,__pycache__,build,dist,.eggs

[isort]
profile = black
known_first_party = spm12,tests
profile=black
known_first_party=spm12,tests

[tool:pytest]
addopts=-v --tb=short -rxs -W=error --log-level=debug -n=auto --durations=0 --durations-min=1 --cov=spm12 --cov-report=term-missing --cov-report=xml
21 changes: 0 additions & 21 deletions tests/__main__.py

This file was deleted.

5 changes: 5 additions & 0 deletions tests/test_regseg.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"""
% HOME,
)
no_matlab_warn = pytest.mark.filterwarnings(
"ignore:.*collections.abc:DeprecationWarning"
)


def assert_equal_arrays(x, y, nmse_tol=0, denan=True):
Expand All @@ -58,6 +61,7 @@ def assert_equal_arrays(x, y, nmse_tol=0, denan=True):


@skip_no_data
@no_matlab_warn
def test_resample():
with tmpdir() as outpath:
res = regseg.resample_spm(PET, MRI, MRI2PET, outpath=outpath)
Expand All @@ -68,6 +72,7 @@ def test_resample():


@skip_no_data
@no_matlab_warn
def test_coreg():
with tmpdir() as outpath:
res = regseg.coreg_spm(PET, MRI, outpath=outpath)
Expand Down

0 comments on commit d11fb64

Please sign in to comment.