bids-standard / BEP028_BIDSprov

Organizing and coordinating BIDS extension proposal 28 : BIDS Provenance
https://bids.neuroimaging.io/bep028
Creative Commons Attribution 4.0 International
3 stars 13 forks source link

FSL : directly parse the HTML log file #90

Closed thomasbtnfr closed 1 year ago

thomasbtnfr commented 1 year ago

The purpose of this PR is to avoid the conversion of the report_log.html file to a markdown file (related to this issue). To do this, the BeautifulSoup module was used to operate directly with the \<pre> tags in the HTML code. This avoids going through the use of regex.

In addition, this PR corrects a reading bug. Indeed, if you had the following entry:

/usr/local/packages/fsl-5.0.10/bin/fsl_sub -T 40 -l logs -N feat2_pre -j 326901  /usr/local/packages/fsl-5.0.10/bin/feat /storage/essicd/data/NIDM-Ex/BIDS_Data/RESULTS/TEST/nidmresults-examples/fsl_voxelwise_p0001.feat/design.fsf -D /storage/essicd/data/NIDM-Ex/BIDS_Data/RESULTS/TEST/nidmresults-examples/fsl_voxelwise_p0001.feat -I 1 -prestats
job
326902

/usr/local/packages/fsl-5.0.10/bin/fsl_sub -T 1 -l logs -N feat3_film -j 326902  /usr/local/packages/fsl-5.0.10/bin/feat /storage/essicd/data/NIDM-Ex/BIDS_Data/RESULTS/TEST/nidmresults-examples/fsl_voxelwise_p0001.feat/design.fsf -D /storage/essicd/data/NIDM-Ex/BIDS_Data/RESULTS/TEST/nidmresults-examples/fsl_voxelwise_p0001.feat -I 1 -stats
job
326903

only the first command was saved because of the job line which stopped the process as it was lower case and not preceded by a line break. Now, the 2 commands are saved (not including job lines and numbers) .

cmaumet commented 1 year ago

Looks good to me! Thanks!