-
Notifications
You must be signed in to change notification settings - Fork 8
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
FileSystemTree additions and Payload detection #189
Conversation
- iterate through all tables instead of the first only - use ToFreeTextCell(), which is a proper conversion instead of AsFreeTextCell which is a match that can fail
yield $"{assayFoldername}/protocols/{kv.Value.AsFreeText}" // from assay root > protocols | ||
for table in a.Tables do | ||
for kv in table.Values do | ||
let textValue = kv.Value.ToFreeTextCell().AsFreeText |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Freymaurer @HLWeil is this the way to access a cells text? If that's the case, I suggest we add a convenience function for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup just tested it out. This definitely needs some convenience function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the literals. Else everything is good (according to the current state of the repository) as far as I can see!
yield $"{assayFoldername}/protocols/{kv.Value.AsFreeText}" // from assay root > protocols | ||
for table in a.Tables do | ||
for kv in table.Values do | ||
let textValue = kv.Value.ToFreeTextCell().AsFreeText |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup just tested it out. This definitely needs some convenience function.
src/ARCtrl/ARCtrl.fs
Outdated
let studyFoldername = $"studies/{s.Identifier}" | ||
|
||
set [ | ||
yield $"{studyFoldername}/isa.study.xlsx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sry I completely forgot to mention this yesterday. You can and should use the helper functions for this:
open ARCtrl.ISA
Identifier.Study.fileNameFromIdentifier "MyStudy"
->
val it: string = "studies/MyStudy/isa.study.xlsx"
Or at least (also considering there is no such helper function for the Readme
), use the provided literals:
ARCtrl.Path.StudiesFolderName
ARCtrl.Path.StudyFileName
ARCtrl.Path.READMEFileName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/// <param name="IgnoreHidden">Wether or not to ignore hidden files and folders starting with '.'. If true, no hidden files are included in the result. (default: true)</param> | ||
member this.GetRegisteredPayload(?IgnoreHidden:bool) = | ||
|
||
let isaCopy = _isa |> Option.map (fun i -> i.Copy()) // not sure if needed, but let's be safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I see it, this is not needed. But we definitely need structural equality functions @Freymaurer. So functions like this here can be tested for doing no change to the ARC itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then i guess it is better to leave it for now
closes #188:
closes #187:
GetRegisteredPayload
andGetAdditionalPayload