Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT] Renamed examples files #608

Merged
merged 5 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe("to annotate an assessment ", () => {

/* ==== Generated with Cypress Studio ==== */
cy.get('[data-cy="data-dictionary-selector"] > .row > form > .file-selector-button').click();
cy.get('[data-cy="data-dictionary-selector"] > .row > form > .file-selector-button > input').selectFile('cypress/fixtures/examples/good/example_synthetic.json', { force: true });
cy.get('[data-cy="data-dictionary-selector"] > .row > form > .file-selector-button > input').selectFile('cypress/fixtures/examples/good/example_synthetic_participants.json', { force: true });
/* ==== End Cypress Studio ==== */
cy.get("[data-cy='button-nextpage']").click();

Expand Down Expand Up @@ -105,7 +105,7 @@ describe("to annotate an assessment ", () => {
cy.task("downloads", "cypress/downloads").then(folderStateAfter => {
cy.readFile('cypress/downloads/' + folderStateAfter[folderStateAfter.length - 1]).then((outputContent) => {

const expectedOutput = require('../../fixtures/examples/good/example_synthetic_expected_output.json');
const expectedOutput = require('../../fixtures/examples/good/example_synthetic.json');
expect(outputContent).to.deep.equal(expectedOutput);
});
});
Expand Down
147 changes: 122 additions & 25 deletions cypress/fixtures/examples/good/example_synthetic.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,131 @@
{
"participant_id":{
"Description":"A participant ID"
"participant_id": {
"Description": "A participant ID",
"Annotations": {
"IsAbout": {
"TermURL": "nb:ParticipantID",
"Label": "Subject Unique Identifier"
},
"Identifies": "participant"
}
},
"session_id":{
"Description":"A session ID"
"session_id": {
"Description": "A session ID"
},
"pheno_age":{
"Description":"Age of the participant"
"pheno_age": {
"Description": "Age of the participant",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Age",
"Label": "Age"
},
"Transformation": {
"TermURL": "nb:FromEuro",
"Label": "european decimal value"
},
"MissingValues": [
"NA"
]
}
},
"pheno_sex":{
"Description":"Sex variable",
"Levels":{
"M":"Male",
"F":"Female"
}
"pheno_sex": {
"Description": "Sex variable",
"Levels": {
"M": "Male",
"F": "Female"
},
"Annotations": {
"IsAbout": {
"TermURL": "nb:Sex",
"Label": "Sex"
},
"Levels": {
"M": {
"TermURL": "snomed:248153007",
"Label": "Male"
},
"F": {
"TermURL": "snomed:248152002",
"Label": "Female"
}
},
"MissingValues": [
"missing"
]
}
},
"pheno_group":{
"Description":"Group variable",
"Levels":{
"PAT":"Patient",
"CTRL":"Control subject"
}
"pheno_group": {
"Description": "Group variable",
"Levels": {
"PAT": "Patient",
"CTRL": "Control subject"
},
"Annotations": {
"IsAbout": {
"TermURL": "nb:Diagnosis",
"Label": "Diagnosis"
},
"Levels": {
"PAT": {
"TermURL": "snomed:406506008",
"Label": "Attention deficit hyperactivity disorder"
},
"CTRL": {
"TermURL": "ncit:C94342",
"Label": "Healthy Control"
}
},
"MissingValues": [
"NA"
]
}
},
"tool1_item1":{
"Description":"item 1 scores for tool1"
"tool1_item1": {
"Description": "item 1 scores for tool1",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Assessment",
"Label": "Assessment tool"
},
"IsPartOf": {
"TermURL": "cogatlas:trm_57964b8a66aed",
"Label": "Montreal Cognitive Assessment"
},
"MissingValues": [
"missing"
]
}
},
"tool1_item2":{
"Description":"item 2 scores for tool1"
"tool1_item2": {
"Description": "item 2 scores for tool1",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Assessment",
"Label": "Assessment tool"
},
"IsPartOf": {
"TermURL": "cogatlas:trm_57964b8a66aed",
"Label": "Montreal Cognitive Assessment"
},
"MissingValues": [
"missing"
]
}
},
"tool2_item1":{
"Description":"item 1 scores for tool2"
"tool2_item1": {
"Description": "item 1 scores for tool2",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Assessment",
"Label": "Assessment tool"
},
"IsPartOf": {
"TermURL": "cogatlas:tsk_4a57abb949ece",
"Label": "Unified Parkinson's Disease Rating Scale"
},
"MissingValues": [
"not completed"
]
}
}
}
}
131 changes: 0 additions & 131 deletions cypress/fixtures/examples/good/example_synthetic_expected_output.json

This file was deleted.

34 changes: 34 additions & 0 deletions cypress/fixtures/examples/good/example_synthetic_participants.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"participant_id": {
"Description": "A participant ID"
},
"session_id": {
"Description": "A session ID"
},
"pheno_age": {
"Description": "Age of the participant"
},
"pheno_sex": {
"Description": "Sex variable",
"Levels": {
"M": "Male",
"F": "Female"
}
},
"pheno_group": {
"Description": "Group variable",
"Levels": {
"PAT": "Patient",
"CTRL": "Control subject"
}
},
"tool1_item1": {
"Description": "item 1 scores for tool1"
},
"tool1_item2": {
"Description": "item 2 scores for tool1"
},
"tool2_item1": {
"Description": "item 1 scores for tool2"
}
}
Loading