-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous Integration - part 2 (#47)
* [LINT] cleaning some files following PEP8 * [REFAC] moving description and results to narps_open/data/ [REFAC] creating narps_open.data.participants * Rebasing branch to main * [TEST] modifying helpers for pipeline testing & correlation values comparison * [ENH] runner can use a number of subjects from a fixed list * [ENH] sorting participant list so that it alternates participants from the equalRange and the equalIndifference groups * [BUG] artifacts in pylint action * [REFAC] participants infos from TSV * [TEST] 2T6S test_execution * [TEST] new pipeline test helper, with a number of trials * [ENH] adding a configuration parameter for results using the neurovault naming * [TEST] import issue in test * [TEST] consider unthresholded maps only [skip ci] * [2T6S] issue with hypo names [skip ci] * [TEST] consider unthresholded maps only [skip ci] * Rebasing branch on main * [TEST] refac + change hypothesis order + change correlation score thresholds [skip ci] * [TEST] refac + change hypothesis order + change correlation score thresholds [skip ci] * [TEST] execution with 20 subjects [skip ci] * [TEST] test pipeline output file formatting [skip ci] * [TEST][CI] displaying test results in GitHub Actions summary [skip ci] * [TEST] remove previous results before testing pipeline [skip ci] * [TEST] issue with keys of results [skip ci] * [2T6S] adjusting use of contrasts [skip ci] * [2T6S] adjusting use of contrasts [skip ci] * [2T6S] adjusting use of contrasts [skip ci] * [2T6S] adjusting use of contrasts [skip ci] * [TEST] correlation values are now configurable [skip ci] * [LINT] conform to PEP8 * [CI] git diff exclude deleted files * [CI] some actions run on self-hosted runner * [CI] installing python and cache mechanism are not needed in the self-hosted runner * [CI] Regex for pipeline files search * Resolving conflicts * Resolving conflicts * [CI] self-hosted runner config * [CI] self-hosted runner config * [CI] self-hosted runner config * [CI] pipeline_tests and change_tests only run on PR events * [CI] pipeline_tests and change_tests only run on PR events * [CI] pipeline_tests and change_tests only run on PR events * [CI] pipeline_tests and change_tests only run on PR events * [CI] skip testing if test list is empty * [CI] skip testing if test list is empty * [CI] git checkout strategy * [CI] git checkout strategy * [CI] git checkout strategy * [CI] git checkout strategy * [CI] git checkout strategy * [CI] git checkout strategy * [CI] git checkout strategy
- Loading branch information
Showing
31 changed files
with
1,194 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
|
||
# to avoid commiting data | ||
data/ | ||
tests/data/ | ||
./data/ | ||
|
||
# neuro user in docker image | ||
neuro | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
narps_open/utils/description/__main__.py → narps_open/data/description/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/python | ||
# coding: utf-8 | ||
|
||
""" A set of functions to get the participants data for the narps_open package """ | ||
|
||
from os.path import join | ||
|
||
from pandas import read_csv | ||
|
||
from narps_open.data.description import TeamDescription | ||
from narps_open.utils.configuration import Configuration | ||
|
||
def get_participants_information(): | ||
""" Get a list of participants information from the tsv file from NARPS """ | ||
return read_csv(join(Configuration()['directories']['dataset'], 'participants.tsv'), sep='\t') | ||
|
||
def get_all_participants() -> list: | ||
""" Return a list of all participants included in NARPS. | ||
This list is ordered so that subsets of 20, 40, 60, 80, 108 participants | ||
are balanced in terms of belonging to the equal indifference and equal | ||
range groups. | ||
""" | ||
return [ | ||
'020', '001', '070', '013', '120', '109', '118', '035', '002', '025', | ||
'018', '053', '046', '073', '066', '121', '098', '011', '116', '087', | ||
'008', '069', '106', '095', '004', '113', '104', '115', '092', '089', | ||
'090', '045', '016', '117', '124', '093', '088', '021', '094', '041', | ||
'062', '017', '040', '083', '084', '107', '056', '119', '064', '103', | ||
'044', '057', '060', '061', '112', '085', '050', '027', '082', '059', | ||
'022', '019', '052', '047', '030', '039', '100', '029', '108', '067', | ||
'096', '009', '058', '055', '024', '015', '080', '077', '006', '003', | ||
'076', '072', '014', '102', '010', '074', '038', '114', '026', '079', | ||
'054', '071', '032', '051', '110', '081', '036', '037', '068', '099', | ||
'105', '063', '075', '033', '049', '123', '043', '005'] | ||
|
||
def get_participants(team_id: str) -> list: | ||
""" Return a list of participants that were taken into account by a given team | ||
Args: | ||
team_id: str, the ID of the team. | ||
Returns: a list of participants labels | ||
""" | ||
description = TeamDescription(team_id) | ||
excluded_participants = description.derived['excluded_participants'].replace(' ','').split(',') | ||
|
||
return [p for p in get_all_participants() if p not in excluded_participants] | ||
|
||
def get_participants_subset(nb_participants: int = 108) -> list: | ||
""" Return a list of participants of length nb_participants """ | ||
return get_all_participants()[0:nb_participants] |
Oops, something went wrong.