-
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
Optional link in multireader #472
base: master
Are you sure you want to change the base?
Conversation
Could we have this as default behavior without an extra annotation? What's stopping us from having this as default? If something cannot be linked, especially in the same file cuz this can be checked like you do here, then it should be removed anyways, no? |
Yeah, that makes total sense, I implemented that. For links, there was however anyway still a problem still with the
and if the However, this happens before all other keys are touched. For links, we would like to have it that it removes the group if no link is found after the dict has been filled (using e.g. Also tagging here @rettigl since he is using that notation a lot. |
So a tradeoff would be, that we have to scan it a second time, to make it automatically. The option itself sounds useful. Not sure, if you want to add it as default (without a potential future user being aware of that), as it add an additional "rule", you just have to know. Not sure if otherwise some people woul be wondering why some stuff is now disappearing? If the ! notation is used extremely frequently, then one could make this automatically, otherwise not immedeately necessary? Not sure, just my thaughts on this. As I just begin to work with all this, maybe my way to think does not make sense for this case. |
@RonHildebrandt so the idea is here the following:
I think this double looping over the template is fine, I doubt this |
46b043e
to
f7e0853
Compare
This allows to write something like"ENTRY/SAMPLE[sample]/temperature_env/"temperature_sensorsample_heater":"@link:!/entry/instrument/manipulator/sample_heater",
in the config file. The!
before the link target tells the reader that this is an optional link to another concept within the file, i.e., if the pathentry/instrument/manipulator/sample_heater
(entry may be replaced on the way) does not exist, the link will be removed from the Template and there will not be aBrokenLink Validation
error and no warning in the writer.EDIT: see below, the finally implemented functionality is slightly different