Skip to content

Conversation

@killianrochet
Copy link
Collaborator

This is the new version of the PR for the creation of descriptor files.

The goal is to create descriptor files from a data csv file. Each line corresponds to a different descriptor file
The goal is to create descriptor files from a data csv file. Each line corresponds to a different descriptor file
@killianrochet
Copy link
Collaborator Author

@JuliaSprenger new PR ! i think i did a mistake with the version so i have change it ...

@JuliaSprenger JuliaSprenger added the safe to test Required label for GH action to run testsuite label Jul 18, 2023
read_file = pd.read_csv(csv_file, na_filter=False, dtype='str')
read_file.to_excel(r'Path', index=None, header=True)

def conversion_to_odml_table_descriptor(full_elabbook_csv, session_number):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a keyword argument to automatically save this to a csv file if a filename is provided?


df_melted = df_melted.rename(columns={'variable': 'Property name'})

print(df_melted.to_string())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a set of mandatory columns for odmltables csv files. Can you check that all of them are present after the conversion and have values that are accepted by odmltables? E.g. the data type colum can only contain specific values that are understood by odmltables...

def test_conversion_to_odml_table_descriptor(initialize_test_dir):
test_dir = test_directory / 'testfiles_redcap' / 'descriptors'

conversion_to_odml_table_descriptor(test_dir / 'Vision4Action_DATA_2023-04-13_1110.csv', session_number=5)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is only checking if the code runs into an error so far. Could you extend this and also test the content of the converted file? Maybe you will need to add an odmltables reference test file to compare against.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will change the test in priority

@@ -1 +1 @@
0.0.2
0.0.3-a.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this change should not be part of this PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating from the latest master should fix this.

@SylvainTakerkart
Copy link
Collaborator

Comment: the goal of this PR is to create a new descriptor file so that it can be integrated in the V4A pipeline in the future... The BIDS-ification of the V4A pipeline will then follow...

@JuliaSprenger
Copy link
Collaborator

The goal is to be compatible with:odmltables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Required label for GH action to run testsuite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants