wwpdb.apps.msgmodule 0.180__tar.gz → 0.180.2__tar.gz

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.
Files changed (43) hide show
  1. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/PKG-INFO +1 -1
  2. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/__init__.py +1 -1
  3. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/PdbxMessageIo.py +5 -0
  4. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/io/CompatIo.py +5 -0
  5. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/util/ExtractMessage.py +33 -1
  6. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb.apps.msgmodule.egg-info/PKG-INFO +1 -1
  7. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/README.md +0 -0
  8. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/setup.cfg +0 -0
  9. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/setup.py +0 -0
  10. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/__init__.py +0 -0
  11. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/__init__.py +0 -0
  12. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/DataAccessLayer.py +0 -0
  13. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/LockFile.py +0 -0
  14. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/MessagingDataExport.py +0 -0
  15. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/MessagingDataImport.py +0 -0
  16. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/Models.py +0 -0
  17. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/PdbxMessage.py +0 -0
  18. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/db/__init__.py +0 -0
  19. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/depict/MessagingDepict.py +0 -0
  20. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/depict/MessagingTemplates.py +0 -0
  21. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/depict/__init__.py +0 -0
  22. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/io/DateUtil.py +0 -0
  23. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/io/EmHeaderUtils.py +0 -0
  24. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/io/MessagingDataExport.py +0 -0
  25. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/io/MessagingDataImport.py +0 -0
  26. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/io/MessagingIo.py +0 -0
  27. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/io/__init__.py +0 -0
  28. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/models/Message.py +0 -0
  29. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/models/__init__.py +0 -0
  30. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/util/AutoMessage.py +0 -0
  31. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/util/DaInternalDb.py +0 -0
  32. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/util/MessagingDataRouter.py +0 -0
  33. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/util/__init__.py +0 -0
  34. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/util/dump_db_to_cif.py +0 -0
  35. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/util/list_recent_messages.py +0 -0
  36. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/webapp/MessagingWebApp.py +0 -0
  37. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/webapp/__init__.py +0 -0
  38. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb/apps/msgmodule/webapp/wsgi.py +0 -0
  39. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb.apps.msgmodule.egg-info/SOURCES.txt +0 -0
  40. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb.apps.msgmodule.egg-info/dependency_links.txt +0 -0
  41. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb.apps.msgmodule.egg-info/not-zip-safe +0 -0
  42. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb.apps.msgmodule.egg-info/requires.txt +0 -0
  43. {wwpdb_apps_msgmodule-0.180 → wwpdb_apps_msgmodule-0.180.2}/wwpdb.apps.msgmodule.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wwpdb.apps.msgmodule
3
- Version: 0.180
3
+ Version: 0.180.2
4
4
  Summary: wwPDB messaging module
5
5
  Home-page: https://github.com/rcsb/py-wwpdb_apps_ann_tasks_v2
6
6
  Author: Ezra Peisach
@@ -2,4 +2,4 @@ __docformat__ = "restructuredtext en"
2
2
  __author__ = "Ezra Peisach"
3
3
  __email__ = "ezra.peisach@rcsb.org"
4
4
  __license__ = "Apache 2.0"
5
- __version__ = "0.180"
5
+ __version__ = "0.180.2"
@@ -662,6 +662,11 @@ class PdbxMessageIo:
662
662
  """
663
663
  self._block_id = blockId
664
664
 
665
+ def getCurrentContainerId(self):
666
+ """ Return the name of current container.
667
+ """
668
+ return "message"
669
+
665
670
  # --------- Ordinal helpers (kept for API compatibility) ---------
666
671
 
667
672
  def nextMessageOrdinal(self) -> int:
@@ -78,6 +78,11 @@ class PdbxMessageIo:
78
78
  def newBlock(self, blockId: str) -> None:
79
79
  self.__impl.newBlock(blockId)
80
80
 
81
+ def getCurrentContainerId(self):
82
+ """ Return the name of current container.
83
+ """
84
+ return self.__impl.getCurrentContainerId()
85
+
81
86
  def nextMessageOrdinal(self) -> int:
82
87
  return self.__impl.nextMessageOrdinal()
83
88
 
@@ -130,8 +130,14 @@ class ExtractMessage(object):
130
130
 
131
131
  def getObj(self, category_name):
132
132
  if category_name == "pdbx_deposition_message_info":
133
+ # Only return category if messages exist
134
+ if not self._data:
135
+ return None
133
136
  return SimpleCategory(self._data)
134
137
  if category_name == "pdbx_deposition_message_file_reference":
138
+ # Only return category if file references exist
139
+ if not self._refdata:
140
+ return None
135
141
  return SimpleCategory(self._refdata, True)
136
142
  return None
137
143
 
@@ -607,23 +613,49 @@ class ExtractMessage(object):
607
613
  ret = None
608
614
  self.__readMsgFile(depid, contentType=msg_content, b_use_cache=b_use_cache, test_folder=test_folder)
609
615
 
616
+ logger.debug("Deposition %s: Message containers loaded: %d", depid, len(self.__lc))
617
+
610
618
  if len(self.__lc) >= 1:
611
619
  c0 = self.__lc[0]
612
620
  # Now check messages
613
621
 
622
+ # Debug: Let's see what categories are available
623
+ logger.debug("Deposition %s: Container type: %s", depid, type(c0))
624
+ logger.debug("Deposition %s: Container has getObj method: %s", depid, hasattr(c0, 'getObj'))
625
+
614
626
  catObj = c0.getObj("pdbx_deposition_message_info")
615
627
  if catObj is None:
616
- logger.debug("Deposition %s no pdbx_deposition_message_info category", depid)
628
+ logger.debug("Deposition %s: NO pdbx_deposition_message_info category found", depid)
629
+ # Let's try to see what's available in the container
630
+ if hasattr(c0, '_data'):
631
+ logger.debug("Deposition %s: Container _data: %s", depid, c0._data) # noqa: W02121 pylint: disable=protected-access
632
+ if hasattr(c0, '_refdata'):
633
+ logger.debug("Deposition %s: Container _refdata: %s", depid, c0._refdata) # noqa: W02121 pylint: disable=protected-access
617
634
  return None
635
+ else:
636
+ logger.debug("Deposition %s: Found pdbx_deposition_message_info category", depid)
618
637
 
619
638
  #
620
639
  # Get column name index.
621
640
  #
622
641
  itDict = {}
623
642
  itNameList = catObj.getItemNameList()
643
+ logger.debug("Deposition %s: Available item names: %s", depid, itNameList)
624
644
  for idxIt, itName in enumerate(itNameList):
625
645
  itDict[str(itName).lower()] = idxIt
626
646
  #
647
+ logger.debug("Deposition %s: itDict keys: %s", depid, list(itDict.keys()))
648
+ logger.debug("Deposition %s: Looking for timestamp key: '_pdbx_deposition_message_info.timestamp'", depid)
649
+ logger.debug("Deposition %s: Looking for send_status key: '_pdbx_deposition_message_info.send_status'", depid)
650
+
651
+ # Check if required fields exist to prevent KeyError
652
+ if "_pdbx_deposition_message_info.timestamp" not in itDict:
653
+ logger.warning("Deposition %s: timestamp field not found in message info", depid)
654
+ return None
655
+ if "_pdbx_deposition_message_info.send_status" not in itDict:
656
+ logger.warning("Deposition %s: send_status field not found in message info", depid)
657
+ return None
658
+
627
659
  idxTimeStamp = itDict["_pdbx_deposition_message_info.timestamp"]
628
660
  idxSendStatus = itDict["_pdbx_deposition_message_info.send_status"]
629
661
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wwpdb.apps.msgmodule
3
- Version: 0.180
3
+ Version: 0.180.2
4
4
  Summary: wwPDB messaging module
5
5
  Home-page: https://github.com/rcsb/py-wwpdb_apps_ann_tasks_v2
6
6
  Author: Ezra Peisach