Skip to content

Commit bddeebe

Browse files
authored
Merge pull request #184 from arokem/sleep_volunteer_master
Update to newest python / GitHub Actions
2 parents 3a19c7e + 2bb5b08 commit bddeebe

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test suite
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
python-version: [3.7, 3.8]
13+
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v1
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install .
25+
- name: Lint
26+
run: |
27+
flake8 --ignore N802,N806,W503 --select W504 `find . -name \*.py | grep -v setup.py | grep -v version.py | grep -v __init__.py | grep -v /docs/`
28+
- name: Test
29+
run: |
30+
cd && mkdir for_test && cd for_test && pytest --pyargs nitime --cov-report term-missing --cov=AFQ

nitime/timeseries.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,8 @@ def __new__(cls, f, time_unit='s'):
902902

903903
def __repr__(self):
904904

905-
return str(self) + ' Hz'
905+
return str(float(self)) + ' Hz'
906+
906907

907908
def to_period(self, time_unit=base_unit):
908909
"""Convert the value of a frequency to the corresponding period

0 commit comments

Comments
 (0)