Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ln2t/cvrmap into main
Browse files Browse the repository at this point in the history
  • Loading branch information
arovai committed Dec 1, 2023
2 parents 453461f + 84b83d5 commit 66f6c41
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 12 deletions.
18 changes: 18 additions & 0 deletions cvrmap/utils/tests/data/dataset_description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Name": "Dummy Dataset",
"BIDSVersion": "1.2.0",
"License": "CC0",
"Authors": [
"Skywalker, Luke",
"Baggins, Bilbo",
"Bond, James",
"Curie, Marie"
],
"Acknowledgments": "",
"HowToAcknowledge": "",
"Funding": [
],
"ReferencesAndLinks": [
""
]
}
44 changes: 44 additions & 0 deletions cvrmap/utils/tests/data/participants.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"group": {
"LongName": "Group",
"Levels": {
"control": "Group of healthy subjects",
"patient": "Group of unhealthy subjects"
}
},
"edinburgh": {
"LongName": "Edinburgh handedness test"
},
"edinburgh_alt": {
"LongName": "Alternative Edinburgh handedness test (more accurate counting)"
},
"last_name": {
"LongName": "Participant's last name"
},
"first_name": {
"LongName": "Participant's first name"
},
"sex": {
"LongName": "Sex"
},
"age": {
"LongName": "Age"
},
"smoking_status": {
"LongName": "Smoking Status",
"Description": "Indicate the smoking status of the subject",
"Levels": {
"n": "Subject has never smoked",
"y": "Subject is currently a smoker",
"(number)": "Subject has stopped smoking (number) years ago"
}
},
"smoking_rate": {
"LongName": "Smoking Rate",
"Description": "Number of cigarettes smoked per day"
},
"smoking_time": {
"LongName": "Smoking Time",
"Description": "Number of years of active smoking"
}
}
2 changes: 2 additions & 0 deletions cvrmap/utils/tests/data/participants.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
participant_id sex age
sub-042 X 42
6 changes: 4 additions & 2 deletions cvrmap/utils/tests/test_io_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def test_get_subjects_to_analyze():
from bids import BIDSLayout
from argparse import Namespace
import pytest
layout = BIDSLayout('.', validate=False)
dummy_data_path = 'cvrmap/utils/tests/data'
layout = BIDSLayout(dummy_data_path, validate=False)
args = Namespace(**{'participant_label': '007'})
with pytest.raises(SystemExit) as e:
get_subjects_to_analyze(args, layout)
Expand Down Expand Up @@ -61,7 +62,8 @@ def test_get_task():
from bids import BIDSLayout
from argparse import Namespace
import pytest
layout = BIDSLayout('.', validate=False)
dummy_data_path = 'cvrmap/utils/tests/data'
layout = BIDSLayout(dummy_data_path, validate=False)
args = Namespace(**{'task': 'some_task'})
with pytest.raises(SystemExit) as e:
get_task(args, layout)
Expand Down
16 changes: 8 additions & 8 deletions cvrmap/utils/tests/test_shell_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"""


def test_get_version():
"""
Function to test get_version()
"""
from ..shell_tools import get_version
s = get_version()
assert isinstance(s, str)
# def test_get_version():
# """
# Function to test get_version()
#
# """
# from ..shell_tools import get_version
# s = get_version()
# assert isinstance(s, str)
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ RUN apt-get install -y pip
RUN pip install -U pip

# Install cvrmap from pypi
RUN pip install -U cvrmap
RUN pip install -U cvrmap==2.0.15

# Set entrypoint to entrypoint script
ENTRYPOINT ["/opt/cvrmap/docker/entrypoint.sh"]
COPY entrypoint.sh /opt/cvrmap/entrypoint.sh
ENTRYPOINT ["/opt/cvrmap/entrypoint.sh"]

0 comments on commit 66f6c41

Please sign in to comment.