Replies: 9 comments
-
I've discussed this with @chrisisla and he suggested to raise an issue, and highlight this with you. Can you please have a look at it, and revert? If you need any more information, just let me know. Many thanks! |
Beta Was this translation helpful? Give feedback.
-
PS: if I just add an empty observation, the validation works OK: But I don't think it is a good idea to add empty attribute(s) just to get it validated? |
Beta Was this translation helpful? Give feedback.
-
One might argue that the Python function is behaving as expected since the definition of the condition makes reference to an attribute of an optional field rather than checking whether that field is defined first. The Rosetta definition of the condition is: `condition RateOptionObservable: ...
The condition should have tested for the existence of observable first. IE
It is possible for the generator to compensate but a stronger solution would be more rigorous checking of the Rosetta. |
Beta Was this translation helpful? Give feedback.
-
How do we proceed with this? I don't think that someone should amend these conditions on a case per case basis, but changing them all at once is a massive change, which requires thorough analysis, execution and testing. Please advice. |
Beta Was this translation helpful? Give feedback.
-
Hi @RonAtCFX We've discussed this and came to the conclusion that the Python code generator should implement the same semantics as the Java code generator. In this case, that means that the Python code for the path operator |
Beta Was this translation helpful? Give feedback.
-
@SimonCockx |
Beta Was this translation helpful? Give feedback.
-
We’re in agreement to support it even though its an odd syntax.
There’s no explicit timing but we are looking into it. Will revert once there’s a plan.
From: Ron Kaim ***@***.***>
Date: Tuesday, June 20, 2023 at 9:34 AM
To: finos/common-domain-model ***@***.***>
Cc: dschwartznyc ***@***.***>, Mention ***@***.***>
Subject: Re: [finos/common-domain-model] Python: omission of Optional field leads to Attribute Error in validate_conditions (Issue #2185)
@SimonCockx<https://github.com/SimonCockx>
many thanks for your prompt response. any planning when this will be delivered?
—
Reply to this email directly, view it on GitHub<#2185 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADD3X6DH3CEUGHQNRVOZLQ3XMGRGZANCNFSM6AAAAAAZDMIRXA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @RonAtCFX I hope this message finds you well! I'm following up on your question and wanted to check if it's okay to close now and if you've received your answer. If you haven’t and want to keep it open please let me know. If you're interested in joining the Contribution Review Working Group (CRWG) meetings, we have sessions scheduled for tomorrow, February 6th at 10 am EST/3 pm GMT, and another on February 20th at the same time and we can discuss your questions directly with the maintainers. Please let me know your preferences or if you have any further questions or concerns. Looking forward to hearing from you! |
Beta Was this translation helpful? Give feedback.
-
Hi @RonAtCFX Closing this issue out because it has been open for more than 30 days with no activity. Please reopen if necessary and feel free to reach out to the CDM team if you have any questions. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm testing the recently released python libs, version dev.50
In a PriceQuantity, the attribute "observable" is optional.
so I created a PriceQuantity, without an "observable":
when calling the validate_conditions() on the PriceQuantity, python raises a AttributeError:
this is on this test instruction:
Is this something erroneous on my side, or is the generated python code incorrect of incomplete?
Beta Was this translation helpful? Give feedback.
All reactions