Skip to content

Commit

Permalink
Merge branch 'finos:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
manel-martos authored Nov 18, 2024
2 parents 6c0c868 + 7ab3505 commit e8325a1
Show file tree
Hide file tree
Showing 1,598 changed files with 443,043 additions and 455,750 deletions.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Feature Request
about: I have a suggested enhancement to the CDM
labels:
assignees:
title: Proposed change to the CDM
---

> [!NOTE]
> Any Issue must:
> - include the source of the Issue i.e. is it from the Roadmap, from a Working Group recommendation, github discussions etc
> - describe the scope of the change, work item or deliverable
> - be written in “plain English” i.e. try not to use niche business or technical terminology
> - describe the benefit to the model and/or the community
> - identify the Working Group where community members can contribute to the change, if applicable
> - include details of existing or proposed solutions in respect of this issue
> - the version of the CDM that the Issue relates to
> - be manageable i.e. larger proposals should be broken down into multiple smaller Issues to make them easier to digest
>
> Sections are provided in this template to help create the Issue with the correct level of detail.
>
> All _Tips_, _Notes_ and other alerts can be deleted from the page when you are happy with the
> content.

> [!TIP]
> The more evidence that you can provide of prior approval for the proposed change from a
> CDM Working Group the better. This will assist the CDM maintainers and participants
> when reviewing the proposal.
## Background ##

_Please provide the business context of the Issue i.e. what is required and why_

## Proposal ##

_Please put details of the proposed changes in here_
_Splitting the changes into sections will improve comprehension of the proposal_
_Use graphics where possible e.g. before/after pictures of the model enhancements_

## Compatibility ##

_If known, please describe any compatibility issues that this change may have_
_with existing versions. Please review the list of backwardly incompatible_
_changes and in the design principles for assistance._



11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/Support_question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Support Question
about: If you have a question about configuration, usage, missing functionality etc.
labels: question,help-wanted
---

## Support Question

...ask your question here.

...be sure to search existing issues since someone might have already asked something similar.
6 changes: 3 additions & 3 deletions .github/actions/maven-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ inputs:
run-tests:
description: Whether or not to run tests. The default is true.
required: false
type: boolean
default: true
# type: boolean - This is not supported (yet). All inputs are of type `string`. See https://github.com/actions/runner/issues/2238.
default: 'true'

runs:
using: "composite"
Expand All @@ -20,4 +20,4 @@ runs:
cache: maven
- name: Build with Maven
shell: bash
run: mvn -B -U clean package${{ inputs.run-tests && '' || ' -DskipTests' }}
run: mvn -B -U clean package${{ inputs.run-tests == 'false' && ' -DskipTests' || '' }}
Binary file modified .github/cdm-roadmap-2024-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/cdm-roadmap-2024-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/license-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
module-folder: ["./", "./examples", "./rosetta-source", "./rosetta-project"]
module-folder: ["./", "./examples", "./rosetta-source"]
steps:
- uses: actions/checkout@v3
- name: Install XQ
Expand Down
Binary file removed CDM Overview.pptx.pdf
Binary file not shown.
205 changes: 205 additions & 0 deletions GOVERNANCE.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Participants.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Below is the list of [participants](GOVERNANCE.md#1-roles) in CDM, who have comm
- Jean-Baptiste Ziade, Fragmos Chain, Date of enrollment: 9th Mar 2024
- Eleonora Acuna, ISDA, Date of enrollment: 11th Mar 2024
- Vernon Alden-Smith ISDA, Date of enrolement 13th Mar 2024
- Brian Lynn, Global Electronic Markets, Date of enrolement: 17 May 2024


## How to enroll as a participant
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@ Read more about project contribution guidelines, principles, frequently asked qu
The CSL specifies [three different contribution roles](https://github.com/finos/standards-project-blueprint/blob/master/governance-documents/5._Governance.md#1roles) for each specific Working Group:

* Maintainers - those who drive consensus within the working group
* Editors - those who codify ideas into a formal specification
* [Editors](https://github.com/finos/common-domain-model/blob/master/GOVERNANCE.md#1-roles) - those who codify ideas into a formal specification
* Participants - anyone who provides contributions to the project under a signed CSL CLA. A great way to sign the CLA is to open a Pull Request to add your name to the [Participants.md](https://github.com/finos/standards-project-blueprint/blob/master/governance-documents/participants.md) file.

### Active Working Groups

The following Working Groups are currently activated or about to be set up for this project:

* [Contribution Review Working Group](/website/static/pdfs/CDM.Contribution.Review.Working.Group.Terms.of.Reference.pdf)
* [Collateral Working Group](/website/static/pdfs/CDM.Collateral.WG.Book.of.Work.May.2023.pdf)
* [Technology Architecture Working Group](/website/static/pdfs/CDM.Technology.Architecture.WG.ToR.v1.pdf)
* [Structured Products Working Group](https://www.finos.org/calendar)
* [FINOS CDM Steering Working Group](https://github.com/finos/common-domain-model#2-working-groups)
* [Contribution Review Working Group](https://cdm.finos.org/docs/CDM-Contribution-Review-WG)
* [Collateral Working Group](https://cdm.finos.org/docs/CDM-Collateral-WG)
* [Technology Architecture Working Group](https://cdm.finos.org/docs/CDM-Technology-Architecture-WG)
* [Structured Products Working Group](https://cdm.finos.org/docs/CDM-Structured-Products-WG)
* [Steering Working Group](https://cdm.finos.org/docs/CDM-Steering-WG)
* [Derivative Products and Business Events Working Group](https://cdm.finos.org/docs/CDM-Derivative-Products-and-Business-Events-WG)
* [ISLA CDM Working Group (Securities Lending)](https://www.islaemea.org/working-groups/)
* [ISLA CDM Trading Working Group (Securities Lending)](https://www.islaemea.org/working-groups/)
* [ISLA Document Digitisation Working Group (GMSLA)](https://www.islaemea.org/working-groups/)
Expand Down Expand Up @@ -116,7 +117,7 @@ If you'd like to receive official updates, please send an email to [email protected]
###
**Meetings**

Finally, another great way to interact with the community is to attend the bi-weekly CDM Contribution Review Working Group, monthly Collateral Working Group, monthly FINOS CDM Structured Products Working Group, monthly Steering Technology Architecture Working Group, and/or quarterly FINOS CDM Steering Working Group: email [email protected] to be added to the meeting invites directly, or find the meeting in the [FINOS Community Calendar](https://calendar.google.com/calendar/embed?src=finos.org_fac8mo1rfc6ehscg0d80fi8jig%40group.calendar.google.com).
Finally, another great way to interact with the community is to attend the bi-weekly [ Contribution Review Working Group](https://cdm.finos.org/docs/CDM-Contribution-Review-WG), monthly [Collateral Working Group](https://cdm.finos.org/docs/CDM-Collateral-WG), monthly [FINOS Structured Products Working Group](https://cdm.finos.org/docs/CDM-Structured-Products-WG), monthly [Steering Working Group](https://cdm.finos.org/docs/CDM-Steering-WG), monthly [Technology Architecture Working Group](https://cdm.finos.org/docs/CDM-Technology-Architecture-WG), bi-weekly [Derivative Products and Business Events Working Group](https://cdm.finos.org/docs/CDM-Derivative-Products-and-Business-Events-WG), and/or quarterly [Steering Working](https://cdm.finos.org/docs/CDM-Steering-WG) Group: email [email protected] to be added to the meeting invites directly, or find the meeting in the [FINOS Community Calendar](https://calendar.google.com/calendar/embed?src=finos.org_fac8mo1rfc6ehscg0d80fi8jig%40group.calendar.google.com).


###
Expand Down Expand Up @@ -186,11 +187,12 @@ The following are the FINOS CDM maintainers and the firms they represent.
| David Shone | ISDA | OrgRep | dshoneisda |
| Adrian Dale | ISLA | OrgRep | ADaleISLA |
| Chris Rayner | ISLA | OrgRep | chrisisla |
| Ian Sloyan | Private Individual | N/A | iansloyan |
| Minesh Patel | Regnosys | OrgRep | minesh-s-patel |
| Leo Labeis | Regnosys | OrgRep | lolabeis |
| Hugo Hills | Regnosys | OrgRep | hugohills-regnosys |
| Lyteck Lynhiavu | ISDA | OrgRep | llynhiavu |
| Manuel Martos | TradeHeader | OrgRep | manel-martos |
| Marc Gratacos | TradeHeader | OrgRep | mgratacos |

If you would like to get in touch with the CDM maintainer team, contact them through their mailing list at [https://lists.finos.org/g/cdm-maintainers](https://lists.finos.org/g/cdm-maintainers). **You can do so by first subscribing at [[email protected]](mailto:[email protected]) and posting at [[email protected]](mailto:[email protected]) .**

Expand Down
19 changes: 6 additions & 13 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# _Product Model - Qualification of AssetClass_
# _CDM Model - CapacityUnit Enum_

_Background_

Issue [#2863](https://github.com/finos/common-domain-model/issues/2863) was identified with the recent change to the qualification of `AssetClass` in PR [#2840](https://github.com/finos/common-domain-model/pull/2840).
In has been seen that in the ExternalUnitOfMeasure1Code from the 2Q2024 ISO External CodeSets v1, the unity Joule is supported in the Enum. However, in CDM this is not the case, as it does not appear anywhere in the CapacityUnitEnum. Therefore, the Joule unit of measure will be added to the CapacityUnitEnum for completeness and to align with 2Q2024 ISO External CodeSets v1, for versions 5 and 6 of CDM.

_What is being released?_

This release fixes the following functions to ensure an `else` clause is specified in all nested `if` statements.

- `Qualify_AssetClass_InterestRate`
- `Qualify_AssetClass_Credit`
- `Qualify_AssetClass_ForeignExchange`
- `Qualify_AssetClass_Equity`
- `Qualify_AssetClass_Commodity`
- Updated `CapacityUnitEnum` in cdm.base.math

_Review directions_
_Enumerations_

In Rosetta, select the Textual Browser and inspect the changes identified above.
- Updated `CapacityUnitEnum` by adding 'J' to support Joule unit

The changes can be reviewed in PR: [#2864](https://github.com/finos/common-domain-model/pull/2864)
The changes can be reviewed in PR: [#3198](https://github.com/finos/common-domain-model/pull/3198)
18 changes: 17 additions & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# 2024 CDM Roadmap from FINOS, ICMA, ISDA, & ISLA

![](.github/cdm-roadmap-2024-1.png)

![](.github/cdm-roadmap-2024-2.png)

![](.github/cdm-roadmap-2024-1.png)
# 2024-5 Release schedule
![CDM Release Guidelines Task Force Summary - July 2 2024](https://github.com/finos/common-domain-model/assets/7291088/9542593d-b63e-4447-8a21-cfec1df65221)

Release States
===============
Release states are defined as follows:
* Development – versions that include new designs from the “main” branch that are still under development. All tests must pass but the model may continue to evolve before being released into production.
* Production - the "latest and greatest" stable version that ideally everyone should upgrade to, and where enhancements compatible with the existing models will be included. We should aim for a release to be in Production for around a year if we can, to alleviate upgrade costs to consumers.
* Maintenance – when a new Production version is released then the current Production will go into Maintenance. Only critical bug fixes and changes related to critical regulatory requirements should be ported to Maintenance releases. Otherwise, functional changes would not be ported to maintenance releases. The intention would be to have only 1 version at a time in maintenance, so each time a new Production version drops, the previous Maintenance release would go to Unsupported.
* Unsupported/End of Life – There will be no bug fixes or other support for the version. TBD: We may perform security scans on some more recent unsupported versions and report any identified vulnerabilities, but will not perform security remediations.


At any point we want a maximum of 1 centrally supported development version, 1 production version, and one maintenance version.


Empty file added cdm-python/test/__init__.py
Empty file.
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
import pytest
'''testing cardinality enforcement'''
import datetime
import pytest
from cdm.base.datetime.DateList import DateList
from rosetta.runtime.utils import ConditionViolationError


def test_1_many_fail():
'''DateList cannot be empty'''
dl = DateList(date=[])
with pytest.raises(ConditionViolationError):
dl.validate_conditions()


def test_1_many_fail_nopar():
def test_1_many_fail_empty_constructor():
'''DateList cannot be empty'''
dl = DateList()
with pytest.raises(ConditionViolationError):
dl.validate_conditions()


def test_1_many_pass():
'''Valid DateList'''
dl = DateList(date=[datetime.date(2020, 1, 1)])
dl.validate_conditions()


if __name__ == "__main__":
print("first one")
test_1_many_pass()
print("second one")
test_1_many_fail()
print("third one")
test_1_many_fail_nopar()


# EOF
print("test_1_many_pass")
test_1_many_pass()
print("test_1_many_fail")
test_1_many_fail()
print("test_1_many_fail_empty_constructor")
test_1_many_fail_empty_constructor()


# EOF
Original file line number Diff line number Diff line change
@@ -1,40 +1,50 @@
'''Full attribute validation - pydantic and constraints'''
import pytest
from pydantic import ValidationError
from rosetta.runtime.utils import ConditionViolationError
from cdm.base.math.NonNegativeQuantity import NonNegativeQuantity
from cdm.base.math.UnitType import UnitType
from cdm.base.datetime.Frequency import Frequency
from cdm.base.datetime.PeriodExtendedEnum import PeriodExtendedEnum

'''
def test_recursive_conds():
unit = UnitType(currency='EUR')
mq = NonNegativeQuantity(value=10, unit=unit)
mq.validate_model()

'''

def test_recursive_conds_base_fail():
def test_recursive_conditions_base_fail():
'''condition_0_AmountOnlyExists violation'''
unit = UnitType(currency='EUR')
mq = NonNegativeQuantity(unit=unit)
with pytest.raises(ConditionViolationError):
mq.validate_model()

def test_recursive_conds_direct_fail():

def test_recursive_conditions_direct_fail():
'''Negative quantity condition violation'''
unit = UnitType(currency='EUR')
mq = NonNegativeQuantity(value=-10, unit=unit)
with pytest.raises(ConditionViolationError):
mq.validate_model()


def test_attrib_validity():
def test_bad_attrib_validation():
'''Invalid attribute assigned'''
unit = UnitType(currency='EUR')
mq = NonNegativeQuantity(value=10, unit=unit)
mq.frequency = 'Blah'
with pytest.raises(ValidationError):
mq.validate_model()


def test_correct_attrib_validation():
'''Valid attribute assigned'''
unit = UnitType(currency='EUR')
mq = NonNegativeQuantity(value=10, unit=unit)
mq.frequency = Frequency(periodMultiplier=1, period=PeriodExtendedEnum.M)
mq.validate_model()


if __name__ == "__main__":
test_recursive_conds_base_fail()
test_recursive_conds_direct_fail()
test_attrib_validity()
test_recursive_conditions_base_fail()
test_recursive_conditions_direct_fail()
test_bad_attrib_validation()
test_correct_attrib_validation()

# EOF
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
import pytest
from rosetta.runtime.utils import ConditionViolationError
from rosetta.runtime.utils import if_cond
##from cdm.base.math.Measure import Measure
from cdm.base.math.QuantitySchedule import QuantitySchedule
from cdm.base.math.UnitType import UnitType
##from drr.regulation.cftc.rewrite.CFTCPart43TransactionReport import CFTCPart43TransactionReport


'''
def test_if_cond_pass():
unit = UnitType(currency='EUR')
multiplier = Measure(value=1)
qs = QuantitySchedule(value=1, unit=unit, multiplier=multiplier)
qs.validate_conditions()
def test_if_cond_fail():
unit = UnitType(currency='EUR')
multiplier = Measure(value=-1)
qs = QuantitySchedule(unit=unit, multiplier=multiplier)
with pytest.raises(ConditionViolationError):
qs.validate_conditions()
'''
def test_if_cond_literals():
class T:
def __init__(self):
Expand All @@ -48,18 +30,6 @@ def __init__(self):
self)
assert res

'''
def test_if_cond_any():
class T:
def __init__(self):
self.actionType = "TERM"
self.eventType = 'CORP'
self = T()
fnc = CFTCPart43TransactionReport.condition_0_EventTypeCondition
res = fnc(self)
assert res
'''
def test_if_direct():
class T:
def __init__(self):
Expand All @@ -75,7 +45,10 @@ def __init__(self):
'True', T())

if __name__ == "__main__":
test_if_cond_literals()
test_if_direct()
print('test_if_cond_literals',end='')
test_if_cond_literals()
print('...passed\ntest_if_direct', end='')
test_if_direct()
print('...passed')

# EOF
26 changes: 26 additions & 0 deletions cdm-python/test/semantics/test_pydantic_simple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# pylint: disable=unused-import,missing-function-docstring,invalid-name
from datetime import date
from cdm.event.common.Trade import Trade
from cdm.event.common.TradeIdentifier import TradeIdentifier
from cdm.product.template.TradableProduct import TradableProduct
from cdm.product.template.Product import Product


def test_trade():
product = Product()
tradableProduct = TradableProduct(product=product)
tradeIdentifier=[TradeIdentifier(issuer='Acme Corp')]

t = Trade(
tradeDate=date(2023, 1, 1),
tradableProduct=tradableProduct,
tradeIdentifier=tradeIdentifier
)
print(t.model_dump())
print('Done!')


if __name__ == '__main__':
test_trade()

# EOF
Loading

0 comments on commit e8325a1

Please sign in to comment.