-
Notifications
You must be signed in to change notification settings - Fork 0
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
Passing Calling Record Information #28
Comments
Maybe it is better to use ^.id. A "^." better identifies this as a part of
something else.
There may be possibilities of specifying something like "^.name.first" or
the like.
…On Thu, Jun 22, 2023 at 6:58 PM ptth222 ***@***.***> wrote:
This kind of goes along with nested directives, but I wanted it to have
its own issue. Basically, when a nested directive is called you usually
want to pass the record information that the calling directive was on when
it called the nested directive. For example, if you have a directive that
is looping over sample records and creating a dictionary based on the data
in the sample records and it calls another directive to fill in a header
value, you want that nested directive to have immediate access to the
sample record's information. I have already exposed this in the code, but I
think you had an issue with my initial syntax. My suggestion was to use the
'^' character to indicate that you want the field from the record that
called the directive. For example:
"studies%factors": {
"no_id_needed": {
"value_type": "section_matrix",
"required": "True",
"test": "study.id=^id",
"headers": [
***@***.***\"=\"#factor/\"id",
"\"factorName\"=id",
"\"factorType\"=/studies%factor%type",
"\"comments\"=/studies%factors%comments"
],
"table": "factor"
}
}
The "^id" in "study.id=^id" for the "test" field would indicate to fill
that in with the record's "id" value. You suggested '$' instead of '^' to
help avoid confusion with regex, but '$' is also a regex character. Also
there are no regexes in the directives currently, and if they were added I
would expect them to have a similar syntax as what's in the modification
tags, i.e r"...". I really like the caret because it is often used to
indicate something above, like it's pointing up, and in this case it would
be like pointing up the call stack.
What's the final opinion on the syntax?
—
Reply to this email directly, view it on GitHub
<#28>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADEP7B5BA3W3YZ32CHS4VQLXMTEYNANCNFSM6AAAAAAZQ22CYU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Hunter Moseley, Ph.D. -- Univ. of Kentucky
Professor, Dept. of Molec. & Cell. Biochemistry / Markey Cancer Center
/ Institute for Biomedical Informatics / UK Superfund Research Center
Not just a scientist, but a fencer as well.
My foil is sharp, but my mind sharper still.
---------------------------------------------------------------
Email: ***@***.*** (work) ***@***.***
(personal)
Phone: 859-218-2964 (office) 859-218-2965 (lab) 859-257-7715 (fax)
Web: http://bioinformatics.cesb.uky.edu/
Address: CC434 Roach Building, 800 Rose Street, Lexington, KY 40536-0093
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This kind of goes along with nested directives, but I wanted it to have its own issue. Basically, when a nested directive is called you usually want to pass the record information that the calling directive was on when it called the nested directive. For example, if you have a directive that is looping over sample records and creating a dictionary based on the data in the sample records and it calls another directive to fill in a header value, you want that nested directive to have immediate access to the sample record's information. I have already exposed this in the code, but I think you had an issue with my initial syntax. My suggestion was to use the '^' character to indicate that you want the field from the record that called the directive. For example:
The "^id" in "study.id=^id" for the "test" field would indicate to fill that in with the record's "id" value. You suggested '$' instead of '^' to help avoid confusion with regex, but '$' is also a regex character. Also there are no regexes in the directives currently, and if they were added I would expect them to have a similar syntax as what's in the modification tags, i.e r"...". I really like the caret because it is often used to indicate something above, like it's pointing up, and in this case it would be like pointing up the call stack.
What's the final opinion on the syntax?
The text was updated successfully, but these errors were encountered: