metacore icon indicating copy to clipboard operation
metacore copied to clipboard

spec_to_metacore("Metadata/ADaM_Specifications_TEST.xlsx") incorrectly detect the type by_ds

Open cpiraux opened this issue 1 year ago • 6 comments

image

The input excel file follow the p21 structure with extra sheets and columns. In this case, I think the function, detect DM in the sheet README and consider the type by_ds

cpiraux avatar Apr 25 '23 06:04 cpiraux

Can you please provide an example of the spec you tried to use

statasaurus avatar Jul 24 '23 08:07 statasaurus

Sorry for my late reply, I was on vacation. I was able to generate the issue by adding a sheet ‘README’ in the mock_spec.xlsx file from this package.

image

And got this message after running spec_to_metacore("Metadata/mock_spec.xlsx")

image

cpiraux avatar Aug 21 '23 07:08 cpiraux

In my excel file, there are also some sheets with more details for derivation with domain name in it.

image

Would it be possible to have the possibility to exclude the sheets that should not be read to create the metacore object?

cpiraux avatar Aug 21 '23 08:08 cpiraux

@cpiraux I see the logic in the feature you're asking for, but does this vignette address your questions? It gives you more granular control over tabs and variables that you're referencing for importing to the specific metacore fields.

https://atorus-research.github.io/metacore/articles/Building_Specification_Readers.html

mstackhouse avatar Aug 21 '23 12:08 mstackhouse

Thanks @mstackhouse! I had a look to the vignette and indeed each function allows to select sheets individually, so there might not be a need to exclude them. I was just thinking it could be useful to avoid the message from spec_to_metacore () saying “Error: This specification format is not currently supported. You will need to write your own reader” when the spec type is not by_DS. There are probably other solutions to avoid this message 😊.

cpiraux avatar Aug 25 '23 08:08 cpiraux

@cpiraux definitely agree it would be easier and a good addition to add the ability to make sheet exclusions. Just wanted to make sure you weren't completely road blocked!

mstackhouse avatar Aug 25 '23 15:08 mstackhouse