wbfdm 1.50.6__py2.py3-none-any.whl → 1.50.7__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wbfdm might be problematic. Click here for more details.

@@ -594,22 +594,19 @@ class Instrument(ComplexToStringMixin, TagModelMixin, ImportMixin, InstrumentPMS
594
594
 
595
595
  @property
596
596
  def identifier_repr(self) -> str:
597
- identifier_repr = ""
598
- if self.instrument_type and self.instrument_type.key == "product":
599
- # Then we prioritize ISIN over ticker
600
- identifiers = ["isin", "ticker", "refinitiv_identifier_code", "refinitiv_mnemonic_code"]
601
- elif self.is_security:
602
- identifiers = ["ticker", "refinitiv_identifier_code", "refinitiv_mnemonic_code"]
597
+ identifiers = []
598
+ if self.is_security:
599
+ identifier_labels = ["ticker", "refinitiv_identifier_code", "refinitiv_mnemonic_code"]
603
600
  else:
604
- identifiers = ["refinitiv_mnemonic_code"]
605
- for identifier in identifiers:
606
- if v := getattr(self, identifier, None):
607
- identifier_repr = v
601
+ identifier_labels = ["refinitiv_mnemonic_code"]
602
+ for label in identifier_labels:
603
+ if v := getattr(self, label, None):
604
+ identifiers.append(v)
608
605
  break
609
606
  if self.isin and self.is_security:
610
- identifier_repr += f" - {self.isin}"
607
+ identifiers.append(self.isin)
611
608
 
612
- return identifier_repr.replace(":", "-")
609
+ return " - ".join(identifiers).replace(":", "-")
613
610
 
614
611
  @property
615
612
  def valuations(self):
@@ -705,7 +702,7 @@ class Instrument(ComplexToStringMixin, TagModelMixin, ImportMixin, InstrumentPMS
705
702
  self.is_primary = not self.parent or (self.exchange is not None and self.parent.exchange == self.exchange)
706
703
  super().save(*args, **kwargs)
707
704
 
708
- def compute_str(self):
705
+ def get_compute_str(self):
709
706
  repr = self.name_repr or self.name or ""
710
707
  repr = repr.title() # we follow bloomberg instrument representation format
711
708
  if self.instrument_type and self.is_security:
@@ -718,6 +715,9 @@ class Instrument(ComplexToStringMixin, TagModelMixin, ImportMixin, InstrumentPMS
718
715
  repr += f" ({str(self.exchange)})"
719
716
  return repr
720
717
 
718
+ def compute_str(self):
719
+ return self.get_compute_str()
720
+
721
721
  def is_active_at_date(self, today: date) -> bool:
722
722
  return (
723
723
  self.inception_date is not None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbfdm
3
- Version: 1.50.6
3
+ Version: 1.50.7
4
4
  Summary: The workbench module ensures rapid access to diverse financial data (market, fundamental, forecasts, ESG), with features for storing instruments, classifying them, and conducting financial analysis.
5
5
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
6
6
  Requires-Dist: roman==4.*
@@ -231,7 +231,7 @@ wbfdm/models/instruments/instrument_lists.py,sha256=GxfFyfYxEcJS36LAarHja49TOM8f
231
231
  wbfdm/models/instruments/instrument_prices.py,sha256=WCaFMZ9sF7xeGTp9jkq7TA8RfYHrwvTjujzqgCKj9SI,22070
232
232
  wbfdm/models/instruments/instrument_relationships.py,sha256=zpCZCnt5CqIg5bd6le_6TyirsSwGV2NaqTVKw3bd5vM,10660
233
233
  wbfdm/models/instruments/instrument_requests.py,sha256=XbpofRS8WHadHlTFjvXJyd0o7K9r2pzJtnpjVQZOLdI,7832
234
- wbfdm/models/instruments/instruments.py,sha256=fXsYow-aLMJ8jFiFRJsoERDD0ouNsXMwoina0SkOAcI,40427
234
+ wbfdm/models/instruments/instruments.py,sha256=Heyk5cBJJ7ZkoDuZnTuWxB7LMmp_BZb2feW_exs1oIA,40276
235
235
  wbfdm/models/instruments/options.py,sha256=hFprq7B5t4ctz8nVqzFsBEzftq_KDUSsSXl1zJyh7tE,7094
236
236
  wbfdm/models/instruments/private_equities.py,sha256=uzwZi8IkmCKAHVTxnuFya9tehx7kh57sTlTEi1ieDaM,2198
237
237
  wbfdm/models/instruments/querysets.py,sha256=c9fbHVvIRyaFU7jm_CM90lfIVzB8beOD8YII9-FqdT4,7191
@@ -352,6 +352,6 @@ wbfdm/viewsets/statements/__init__.py,sha256=odxtFYUDICPmz8WCE3nx93EvKZLSPBEI4d7
352
352
  wbfdm/viewsets/statements/statements.py,sha256=kmtM0uZ3f7eJJe5gVmd-iVra9dHwTB9x12p7f5qTEx8,4084
353
353
  wbfdm/viewsets/technical_analysis/__init__.py,sha256=qtCIBg0uSiZeJq_1tEQFilnorMBkMe6uCMfqar6-cLE,77
354
354
  wbfdm/viewsets/technical_analysis/monthly_performances.py,sha256=O1j8CGfOranL74LqVvcf7jERaDIboEJZiBf_AbbVDQ8,3974
355
- wbfdm-1.50.6.dist-info/METADATA,sha256=IU7xZoNPg-rIJVXApGKWCf_8AlbVRfierCeYrRUf554,737
356
- wbfdm-1.50.6.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
357
- wbfdm-1.50.6.dist-info/RECORD,,
355
+ wbfdm-1.50.7.dist-info/METADATA,sha256=9UrsrlKQIHXGC3MCMbZgyw86lyMoQwcvApFlYre1olk,737
356
+ wbfdm-1.50.7.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
357
+ wbfdm-1.50.7.dist-info/RECORD,,
File without changes