Coverage for rivapy/instruments/__init__.py: 100%
17 statements
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-05 14:27 +0000
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-05 14:27 +0000
1from rivapy.instruments.factory import _factory
2from rivapy.instruments.specifications import *
3from rivapy.instruments.components import Issuer
4from rivapy.instruments.cds_specification import CDSSpecification
5from rivapy.instruments.ppa_specification import PPASpecification, GreenPPASpecification
6from rivapy.instruments.bond_specifications import ZeroCouponBondSpecification, FixedRateBondSpecification, PlainVanillaCouponBondSpecification, FloatingRateNoteSpecification, FixedToFloatingRateNoteSpecification
7from rivapy.instruments.energy_futures_specifications import EnergyFutureSpecifications
10def _add_to_factory(cls):
11 factory_entries = _factory()
12 factory_entries[cls.__name__] = cls
15_add_to_factory(Issuer)
16_add_to_factory(PPASpecification)
17_add_to_factory(GreenPPASpecification)
18_add_to_factory(ZeroCouponBondSpecification)
19_add_to_factory(FixedRateBondSpecification)
20_add_to_factory(PlainVanillaCouponBondSpecification)
21_add_to_factory(EnergyFutureSpecifications)