-
Notifications
You must be signed in to change notification settings - Fork 10
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
601 fixing nightly build #606
Conversation
…nits into MoBi Units
… 601_fixing_nightly_build
…nferable units to act as synonyms
can you rebase on develop? I have merged the changes from #599 but I feel they are also in this branch? |
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.
Please rebase on develop
I merged develop into this branch. I am used to merge to solve conflicts. Now I cannot rebase anymore, sorry. I will check though that the merge did not change anything critical. |
@abdelr Sorry. Rebase, merge...same stuff on a feature branch. I just did not want to see the noise of other PR so that I could review the actual changes :) |
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.
can be merged as is or we can remove the interface that is not really required
|
||
public void Initialize() | ||
{ | ||
_functionDefinitions.Clear(); |
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.
is this class FunctionDefinitionImporter singleton? Why isn't it done in constructor?
We have a IStartable interface also... maybe that should be enough?
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.
It is a singleton yes. Then if you load a file and load a second file, it will remember all the units and functions defined so you need to clearly trigger "this is a new file" and reset to a clean state. This is why for example tests were failing.
@@ -136,6 +138,11 @@ public double[] ToMobiBaseUnit(string unit, IEnumerable<double> value) | |||
var convertionData = _unitConvertionDictionary[unit]; | |||
return convertionData.Dimension.UnitValuesToBaseUnitValues(convertionData.Unit, value.Select(v => v * convertionData.Rate)); | |||
} | |||
|
|||
public void Initialize() |
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.
same question here
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.
Didn't know about IStartable... already committed.
Fixes #601 (Fix registration of ASTHandler and create entries in the unit conversion dictionary to be used as synonyms in all cases)