-
Notifications
You must be signed in to change notification settings - Fork 13
Renaming the computation of number of module type such that it make sense #150
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
Renaming the computation of number of module type such that it make sense #150
Conversation
Although I would agree that it makes more sense to replace "numberOfReplicatedModules" with "numberOfModuleTypes", it is not quite intuitiuve to declare: numberOfModuleTypes: size(replicatedModules) |
I think this would be a sensible thing to do, but maybe best left for later, and adding it to #121 @MaxTousss I suggest to keep the original computedField as well, such that we don't break backwards compatibility, and can just merge. good idea? |
will need a search-and-replace of |
Some context if other people come here and they haven't taken a read of the PETSIRD model: Thus, I do not feel that renaming For the same reason, I believe that declaring As for backward compatibility, I think that we are still early on enough and that it is small enough that we should do these changes for our future self. Not saying that it must be now, but that it should not be dismissed for that reason. Thus, I still believe that the proposed change is for the best. @KrisThielemans I am confuse about "'keep the original computedField' (...) and can just merge (...)". The modification in this PR is, currently, only about changing the computedField, thus there is nothing to merge if we keep the original computedField, right? Also, good catch about the python case. I looked at the cpp helper and found it was not used, so assumed it was also not used in python. I would do the modification soon. |
…/matlab; Also, made use of that computing field in the cpp helpers
Python and matlab call to the modified computed field were modified accordingly. |
I certainly agree, but have had the feedback that people are annoyed to have to change their code so often...
Sorry, I meant, "keeping both the new and original computedField, ... and can just merge this PR (without affecting any use-cases), i.e. ScannerGeometry: !record
fields:
# your stuff
computedFields:
# Warning: this function will be removed in the near future
numberOfReplicatedModules: size(replicatedModules)
numberOfModuleTypes: size(replicatedModules) With that, we can merge the PR safely. |
Hahahaha, it is true that I only work on PETSIRD twice per year so, in my eye, it is normal that a v0.x.y changes each time I use it XD I do not mind to have both of them, but does Yardl has a "Deprecated" keyword for this kinds of situation? Like |
not really, This one is for @naegelejd. However, I'm 99.99% sure yardl doesn't have it yet. (You can read up on their version evolution plans on https://microsoft.github.io/yardl/cpp/evolution.html, but I certainly don't want to go there yet) |
Meanwhile, we have C++ compilation errors
(The naming of the generated computed fields is a bit unpredictable, see microsoft/yardl#93) |
@MaxTousss if you do these 2 things, I suggest I squash-merge.
such that I won't forget to remove it later... |
… cpp helpers to the proposed computed field
The two things are done. Sorry about the cpp: I still use DevContainer for cpp compilation and thus testing the cpp part is done copying the modifications... Squash away! |
Summary
Title say it all XD
Testing performed
Compilation, eye and vs-code "Replace all".
Related issues
n/a
Checklist before requesting a review
Contribution Notes
This is only basic renaming, no need to bother everyone.
Please tick the following: