wwpdb.apps.msgmodule 0.180.2__tar.gz → 0.181.1__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.
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/PKG-INFO +1 -1
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/__init__.py +1 -1
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/DataAccessLayer.py +18 -13
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/depict/MessagingTemplates.py +6 -8
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/MessagingIo.py +28 -24
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/ExtractMessage.py +7 -3
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb.apps.msgmodule.egg-info/PKG-INFO +1 -1
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/README.md +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/setup.cfg +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/setup.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/LockFile.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/MessagingDataExport.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/MessagingDataImport.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/Models.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/PdbxMessage.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/PdbxMessageIo.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/depict/MessagingDepict.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/depict/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/CompatIo.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/DateUtil.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/EmHeaderUtils.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/MessagingDataExport.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/MessagingDataImport.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/models/Message.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/models/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/AutoMessage.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/DaInternalDb.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/MessagingDataRouter.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/dump_db_to_cif.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/list_recent_messages.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/webapp/MessagingWebApp.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/webapp/__init__.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/webapp/wsgi.py +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb.apps.msgmodule.egg-info/SOURCES.txt +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb.apps.msgmodule.egg-info/dependency_links.txt +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb.apps.msgmodule.egg-info/not-zip-safe +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb.apps.msgmodule.egg-info/requires.txt +0 -0
- {wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb.apps.msgmodule.egg-info/top_level.txt +0 -0
|
@@ -81,14 +81,18 @@ def _get_or_create_engine(db_config: Dict):
|
|
|
81
81
|
echo=False # Set to True for SQL debugging
|
|
82
82
|
)
|
|
83
83
|
|
|
84
|
-
# Test connection
|
|
84
|
+
# Test connection
|
|
85
|
+
# NOTE: Disabled SET SESSION max_allowed_packet due to permission restrictions in production.
|
|
86
|
+
# Production database users typically lack SUPER privilege required for session-level settings.
|
|
87
|
+
# The application relies on the server's GLOBAL max_allowed_packet setting configured by the DBA.
|
|
88
|
+
# If large message inserts fail due to packet size, the DBA must increase GLOBAL max_allowed_packet.
|
|
85
89
|
with engine.connect() as conn:
|
|
86
90
|
conn.execute(text("SELECT 1"))
|
|
87
|
-
try:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
except Exception as e:
|
|
91
|
-
|
|
91
|
+
# try:
|
|
92
|
+
# conn.execute(text("SET SESSION max_allowed_packet=67108864"))
|
|
93
|
+
# logger.info("Set SESSION max_allowed_packet to 64MB for large messages")
|
|
94
|
+
# except Exception as e:
|
|
95
|
+
# logger.warning(f"Could not set max_allowed_packet (may require SUPER privilege): {e}") # pylint: disable=logging-fstring-interpolation
|
|
92
96
|
|
|
93
97
|
logger.info("Database connection test successful")
|
|
94
98
|
|
|
@@ -236,18 +240,19 @@ class BaseDAO(Generic[ModelType]):
|
|
|
236
240
|
Returns:
|
|
237
241
|
bool: True if creation succeeded, False otherwise
|
|
238
242
|
|
|
239
|
-
Note:
|
|
240
|
-
Automatically sets SESSION max_allowed_packet to 64MB for large messages
|
|
241
243
|
"""
|
|
242
244
|
max_retries = 3
|
|
243
245
|
for attempt in range(max_retries):
|
|
244
246
|
try:
|
|
245
247
|
with self.db_connection.get_session() as session:
|
|
246
|
-
#
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
# NOTE: SET SESSION max_allowed_packet is disabled due to permission restrictions.
|
|
249
|
+
# Production database users lack SUPER privilege. The application relies on the server's
|
|
250
|
+
# GLOBAL max_allowed_packet setting. If inserts fail due to packet size, the DBA must
|
|
251
|
+
# increase the global setting via: SET GLOBAL max_allowed_packet=...
|
|
252
|
+
# try:
|
|
253
|
+
# session.execute(text("SET SESSION max_allowed_packet=67108864"))
|
|
254
|
+
# except Exception:
|
|
255
|
+
# pass # Ignore if we can't set it
|
|
251
256
|
|
|
252
257
|
session.add(obj)
|
|
253
258
|
session.commit()
|
|
@@ -68,16 +68,14 @@ Twitter: http://twitter.com/#!/buildmodels
|
|
|
68
68
|
|
|
69
69
|
msgTmplt_site_contact_details_pdbe = """
|
|
70
70
|
--------------------------------------------------------------------------------------------------------------
|
|
71
|
-
Protein Data Bank in Europe (PDBe),
|
|
72
|
-
http://
|
|
73
|
-
|
|
71
|
+
Protein Data Bank in Europe (PDBe) and Electron Microscopy Data Bank (EMDB), wwPDB partner sites
|
|
72
|
+
http://ebi.ac.uk/pdbe | http://ebi.ac.uk/emdb
|
|
74
73
|
EMBL's European Bioinformatics Institute
|
|
75
74
|
Wellcome Trust Genome Campus
|
|
76
|
-
Hinxton
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
http://twitter.com/PDBeurope
|
|
75
|
+
Hinxton, Cambridge, CB10 1SD, UK
|
|
76
|
+
https://www.linkedin.com/company/pdbe/ | https://www.linkedin.com/company/emdatabank/
|
|
77
|
+
https://bsky.app/profile/pdbeurope.bsky.social | https://bsky.app/profile/emdatabank.bsky.social
|
|
78
|
+
https://x.com/PDBeurope | https://x.com/EMDB_EMPIAR
|
|
81
79
|
--------------------------------------------------------------------------------------------------------------"""
|
|
82
80
|
|
|
83
81
|
msgTmplt_site_contact_details_pdbj = """
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/MessagingIo.py
RENAMED
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
# 2023-10-20 CS Update release letter for pdb ids being superseded, for both autoMsg and UI, add "spr_to_replace_pdb_ids" to msg dict
|
|
121
121
|
# 2023-11-01 CS Update file attachement list process to not to append validation report files if already in workingFileRefsList
|
|
122
122
|
# 2023-11-02 CS Update to include PDB extension id in letter, add pdb_ext_id in msg dict
|
|
123
|
+
# 2026-05-20 DAOTHER-10451 Expose has_have for withdrawn subject when multiple accession IDs
|
|
123
124
|
# 2023-11-06 CS Update logic for __getDefaultMsgTmpltType(), i.e. default message pop-up for StatusMod
|
|
124
125
|
# 2023-11-20 EP Add anyUnactionApprovalWithoutCorrection() to determine if any pendingapproval without corrections that need to be acted upon
|
|
125
126
|
# 2023-11-23 EP autoMsg() add support for explicit-approved autogenerated message
|
|
@@ -491,7 +492,7 @@ class MessagingIo(object):
|
|
|
491
492
|
|
|
492
493
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
493
494
|
if self.__msgsFrmDpstrFilePath is not None and (self.__msgsFrmDpstrFilePath.startswith("/dummy") or os.access(self.__msgsFrmDpstrFilePath, os.R_OK)):
|
|
494
|
-
pdbxMsgIo_frmDpstr = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
495
|
+
pdbxMsgIo_frmDpstr = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
495
496
|
try:
|
|
496
497
|
depId = str(self.__reqObj.getValue("identifier"))
|
|
497
498
|
ok = pdbxMsgIo_frmDpstr.read(self.__msgsFrmDpstrFilePath, deposition_id=depId)
|
|
@@ -504,7 +505,7 @@ class MessagingIo(object):
|
|
|
504
505
|
pdbxMsgIo_frmDpstr.close() # Explicitly close to release database connections # pylint: disable=no-member
|
|
505
506
|
|
|
506
507
|
if self.__msgsToDpstrFilePath is not None and (self.__msgsToDpstrFilePath.startswith("/dummy") or os.access(self.__msgsToDpstrFilePath, os.R_OK)):
|
|
507
|
-
pdbxMsgIo_toDpstr = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
508
|
+
pdbxMsgIo_toDpstr = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
508
509
|
try:
|
|
509
510
|
depId = str(self.__reqObj.getValue("identifier"))
|
|
510
511
|
ok = pdbxMsgIo_toDpstr.read(self.__msgsToDpstrFilePath, deposition_id=depId)
|
|
@@ -521,7 +522,7 @@ class MessagingIo(object):
|
|
|
521
522
|
|
|
522
523
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
523
524
|
if self.__notesFilePath is not None and (self.__notesFilePath.startswith("/dummy") or os.access(self.__notesFilePath, os.R_OK)):
|
|
524
|
-
pdbxMsgIo_notes = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
525
|
+
pdbxMsgIo_notes = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
525
526
|
try:
|
|
526
527
|
depId = str(self.__reqObj.getValue("identifier"))
|
|
527
528
|
ok = pdbxMsgIo_notes.read(self.__notesFilePath, deposition_id=depId)
|
|
@@ -622,7 +623,7 @@ class MessagingIo(object):
|
|
|
622
623
|
|
|
623
624
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
624
625
|
if self.__msgsFrmDpstrFilePath is not None and (self.__msgsFrmDpstrFilePath.startswith("/dummy") or os.access(self.__msgsFrmDpstrFilePath, os.R_OK)):
|
|
625
|
-
pdbxMsgIo_frmDpstr = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
626
|
+
pdbxMsgIo_frmDpstr = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
626
627
|
depId = str(self.__reqObj.getValue("identifier"))
|
|
627
628
|
ok = pdbxMsgIo_frmDpstr.read(self.__msgsFrmDpstrFilePath, deposition_id=depId)
|
|
628
629
|
if ok:
|
|
@@ -634,7 +635,7 @@ class MessagingIo(object):
|
|
|
634
635
|
origCommsLst.extend(pdbxMsgIo_frmDpstr.getOrigCommReferenceInfo())
|
|
635
636
|
|
|
636
637
|
if self.__msgsToDpstrFilePath is not None and (self.__msgsToDpstrFilePath.startswith("/dummy") or os.access(self.__msgsToDpstrFilePath, os.R_OK)):
|
|
637
|
-
pdbxMsgIo_toDpstr = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
638
|
+
pdbxMsgIo_toDpstr = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
638
639
|
depId = str(self.__reqObj.getValue("identifier"))
|
|
639
640
|
ok = pdbxMsgIo_toDpstr.read(self.__msgsToDpstrFilePath, deposition_id=depId)
|
|
640
641
|
if ok:
|
|
@@ -659,7 +660,7 @@ class MessagingIo(object):
|
|
|
659
660
|
|
|
660
661
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
661
662
|
if self.__notesFilePath is not None and (self.__notesFilePath.startswith("/dummy") or os.access(self.__notesFilePath, os.R_OK)):
|
|
662
|
-
pdbxMsgIo_notes = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
663
|
+
pdbxMsgIo_notes = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
663
664
|
depId = str(self.__reqObj.getValue("identifier"))
|
|
664
665
|
ok = pdbxMsgIo_notes.read(self.__notesFilePath, deposition_id=depId)
|
|
665
666
|
|
|
@@ -870,7 +871,7 @@ class MessagingIo(object):
|
|
|
870
871
|
|
|
871
872
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
872
873
|
if self.__msgsFrmDpstrFilePath is not None and (self.__msgsFrmDpstrFilePath.startswith("/dummy") or os.access(self.__msgsFrmDpstrFilePath, os.R_OK)):
|
|
873
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
874
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
874
875
|
with LockFile(
|
|
875
876
|
self.__msgsFrmDpstrFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
876
877
|
) as _lf, FileSizeLogger(self.__msgsFrmDpstrFilePath, verbose=self.__verbose, log=self.__lfh) as _fsl:
|
|
@@ -882,7 +883,7 @@ class MessagingIo(object):
|
|
|
882
883
|
|
|
883
884
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
884
885
|
if self.__msgsToDpstrFilePath is not None and (self.__msgsToDpstrFilePath.startswith("/dummy") or os.access(self.__msgsToDpstrFilePath, os.R_OK)):
|
|
885
|
-
mIIo2 = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
886
|
+
mIIo2 = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
886
887
|
with LockFile(
|
|
887
888
|
self.__msgsToDpstrFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
888
889
|
) as _lf, FileSizeLogger( # noqa: F841
|
|
@@ -962,7 +963,7 @@ class MessagingIo(object):
|
|
|
962
963
|
|
|
963
964
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
964
965
|
if self.__notesFilePath is not None and (self.__notesFilePath.startswith("/dummy") or os.access(self.__notesFilePath, os.R_OK)):
|
|
965
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
966
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
966
967
|
with LockFile(
|
|
967
968
|
self.__notesFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
968
969
|
) as _lf, FileSizeLogger( # noqa: F841
|
|
@@ -1044,7 +1045,7 @@ class MessagingIo(object):
|
|
|
1044
1045
|
else:
|
|
1045
1046
|
logger.info("Using database storage - skipping file operations for: %s", outputFilePth)
|
|
1046
1047
|
#
|
|
1047
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
1048
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
1048
1049
|
with LockFile(outputFilePth, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh) as _lf, FileSizeLogger(
|
|
1049
1050
|
outputFilePth, verbose=self.__verbose, log=self.__lfh
|
|
1050
1051
|
) as _fsl: # noqa: F841
|
|
@@ -1437,10 +1438,10 @@ class MessagingIo(object):
|
|
|
1437
1438
|
elif p_tmpltType == "remind-unlocked":
|
|
1438
1439
|
msgTmplt = MessagingTemplates.msgTmplt_remindUnlocked
|
|
1439
1440
|
attachFiles = False
|
|
1440
|
-
isNote = True
|
|
1441
|
+
# isNote = True
|
|
1441
1442
|
# Need all ids
|
|
1442
1443
|
accstr = templateDict["accession_ids"]
|
|
1443
|
-
subject = "
|
|
1444
|
+
subject = "Please attend to your unlocked deposition session - " + accstr
|
|
1444
1445
|
elif p_tmpltType == "approval-impl": # CS 2024-04-04 change implicit-approved to approval-impl to match frontend drop-down
|
|
1445
1446
|
msgTmplt = MessagingTemplates.msgTmplt_approvalImplicit_em if p_isEmdbEntry else MessagingTemplates.msgTmplt_approvalImplicit
|
|
1446
1447
|
attachFiles = False
|
|
@@ -1468,14 +1469,14 @@ class MessagingIo(object):
|
|
|
1468
1469
|
elif p_tmpltType == "reminder": # CS 2024-04-04 change type from remind-feedback to reminder to match frontend drop-down
|
|
1469
1470
|
msgTmplt = MessagingTemplates.msgTmplt_reminder_em if p_isEmdbEntry else MessagingTemplates.msgTmplt_reminder
|
|
1470
1471
|
attachFiles = False
|
|
1471
|
-
isNote = True
|
|
1472
|
+
# isNote = True
|
|
1472
1473
|
# Need all ids
|
|
1473
1474
|
accstr = templateDict["accession_ids"]
|
|
1474
1475
|
subject = "REMINDER: Still awaiting feedback for " + accstr
|
|
1475
1476
|
elif p_tmpltType == "reminder-auth-to-rel": # CS 2024-09-09 add process to send reminder on AUTH entry deposited as REL
|
|
1476
1477
|
msgTmplt = MessagingTemplates.msgTmplt_reminder_auth_to_rel_em if p_isEmdbEntry else MessagingTemplates.msgTmplt_reminder_auth_to_rel
|
|
1477
1478
|
attachFiles = False
|
|
1478
|
-
isNote = True
|
|
1479
|
+
# isNote = True
|
|
1479
1480
|
accstr = templateDict["accession_ids"]
|
|
1480
1481
|
subject = "REMINDER: Upcoming release of " + accstr
|
|
1481
1482
|
else:
|
|
@@ -1581,8 +1582,8 @@ class MessagingIo(object):
|
|
|
1581
1582
|
# No files are being attached
|
|
1582
1583
|
fileRefList = []
|
|
1583
1584
|
|
|
1584
|
-
# We are archiving notes
|
|
1585
|
-
isNote =
|
|
1585
|
+
# We are archiving notes -- not any more 3/30/26
|
|
1586
|
+
isNote = False
|
|
1586
1587
|
|
|
1587
1588
|
contextType = p_tmpltType # CS 2024-04-04 record message type, following frontend message-to-depositor drop-down list, default at "other"
|
|
1588
1589
|
contextVal = None
|
|
@@ -1654,7 +1655,7 @@ class MessagingIo(object):
|
|
|
1654
1655
|
msgDI = MessagingDataImport(self.__reqObj, verbose=self.__verbose, log=self.__lfh)
|
|
1655
1656
|
self.__msgsFrmDpstrFilePath = msgDI.getFilePath(contentType="messages-from-depositor", format="pdbx")
|
|
1656
1657
|
logger.info("self.__msgsFromDpstrFilePath is: %s", self.__msgsFrmDpstrFilePath)
|
|
1657
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
1658
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
1658
1659
|
with LockFile(
|
|
1659
1660
|
self.__msgsFrmDpstrFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
1660
1661
|
) as _lf, FileSizeLogger( # noqa: F841
|
|
@@ -1726,7 +1727,7 @@ class MessagingIo(object):
|
|
|
1726
1727
|
except IOError:
|
|
1727
1728
|
pass
|
|
1728
1729
|
#
|
|
1729
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
1730
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
1730
1731
|
with LockFile(
|
|
1731
1732
|
self.__msgsToDpstrFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
1732
1733
|
) as _lf, FileSizeLogger(
|
|
@@ -1850,7 +1851,7 @@ class MessagingIo(object):
|
|
|
1850
1851
|
|
|
1851
1852
|
# For database-backed storage (dummy paths), skip file existence checks
|
|
1852
1853
|
if self.__notesFilePath is not None and (self.__notesFilePath.startswith("/dummy") or os.access(self.__notesFilePath, os.R_OK)):
|
|
1853
|
-
pdbxMsgIo_notes = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
1854
|
+
pdbxMsgIo_notes = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
1854
1855
|
depId = str(self.__reqObj.getValue("identifier"))
|
|
1855
1856
|
bGotContent = pdbxMsgIo_notes.read(self.__notesFilePath, deposition_id=depId)
|
|
1856
1857
|
|
|
@@ -1927,7 +1928,7 @@ class MessagingIo(object):
|
|
|
1927
1928
|
except IOError:
|
|
1928
1929
|
pass
|
|
1929
1930
|
#
|
|
1930
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
1931
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
1931
1932
|
msgAlreadySeen = False
|
|
1932
1933
|
with LockFile(
|
|
1933
1934
|
self.__msgsToDpstrFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
@@ -2002,8 +2003,8 @@ class MessagingIo(object):
|
|
|
2002
2003
|
msgsFrmDpstrLst = []
|
|
2003
2004
|
msgStatusLst = []
|
|
2004
2005
|
fileSizeToDpstr = 0
|
|
2005
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
2006
|
-
mIIo2 = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
2006
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
2007
|
+
mIIo2 = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
2007
2008
|
|
|
2008
2009
|
try:
|
|
2009
2010
|
# GET LIST OF IDS OF MSGS FROM DEPOSITOR
|
|
@@ -2152,7 +2153,7 @@ class MessagingIo(object):
|
|
|
2152
2153
|
if self.__msgsToDpstrFilePath and (self.__msgsToDpstrFilePath.startswith("/dummy") or os.access(self.__msgsToDpstrFilePath, os.R_OK)):
|
|
2153
2154
|
fileSizeBytes = self.__getFileSizeBytes(self.__msgsToDpstrFilePath) if not self.__msgsToDpstrFilePath.startswith("/dummy") else 1
|
|
2154
2155
|
if fileSizeBytes > 0:
|
|
2155
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
2156
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
2156
2157
|
with LockFile(
|
|
2157
2158
|
self.__msgsToDpstrFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
2158
2159
|
) as _lf, FileSizeLogger( # noqa: F841
|
|
@@ -2993,7 +2994,7 @@ class MessagingIo(object):
|
|
|
2993
2994
|
logger.info("self.__msgsToDpstrFilePath is: %s", self.__msgsToDpstrFilePath)
|
|
2994
2995
|
|
|
2995
2996
|
if self.__msgsToDpstrFilePath is not None and os.access(self.__msgsToDpstrFilePath, os.R_OK):
|
|
2996
|
-
mIIo = PdbxMessageIo(verbose=self.__verbose, log=self.__lfh)
|
|
2997
|
+
mIIo = PdbxMessageIo(site_id=self.__siteId, verbose=self.__verbose, log=self.__lfh)
|
|
2997
2998
|
with LockFile(
|
|
2998
2999
|
self.__msgsToDpstrFilePath, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__lfh
|
|
2999
3000
|
) as _lf, FileSizeLogger( # noqa: F841
|
|
@@ -3913,6 +3914,9 @@ class MsgTmpltHlpr(object):
|
|
|
3913
3914
|
p_returnDict["pdb_ext_id"] = self.__pdbExtId if (self.__pdbExtId is not None and len(self.__pdbExtId) > 0 and self.__pdbExtId != "?") else "[PDBEXTID NOT AVAIL]" # CS 2023-11-02
|
|
3914
3915
|
p_returnDict["emdb_id"] = self.__emdbId if (self.__emdbId is not None and len(self.__emdbId) > 0 and self.__emdbId != "?") else "[EMDBID NOT AVAIL]"
|
|
3915
3916
|
p_returnDict["accession_ids"] = (self.__getAccessionIdString(accessionIdList)) % p_returnDict
|
|
3917
|
+
rqstdNumber = "multi" if (len(accessionIdList) > 1) else "single"
|
|
3918
|
+
dictHasHave = {"single": "has ", "multi": "have "}
|
|
3919
|
+
p_returnDict["has_have"] = dictHasHave[rqstdNumber]
|
|
3916
3920
|
#################################################################################
|
|
3917
3921
|
|
|
3918
3922
|
p_returnDict["contact_authors_list"] = self.__contactAuths
|
|
@@ -114,7 +114,9 @@ class ExtractMessage(object):
|
|
|
114
114
|
logger.info("read message file for %s at %s", depid, filepath_msg)
|
|
115
115
|
|
|
116
116
|
try:
|
|
117
|
-
|
|
117
|
+
# Pass site_id explicitly to keep DB/file routing deterministic.
|
|
118
|
+
siteId = self.__siteId if self.__siteId is not None else getSiteId()
|
|
119
|
+
pdbxMsgIo = PdbxMessageIo(site_id=siteId, verbose=self.__verbose, log=self.__log)
|
|
118
120
|
with LockFile(filepath_msg, timeoutSeconds=self.__timeoutSeconds, retrySeconds=self.__retrySeconds, verbose=self.__verbose, log=self.__log):
|
|
119
121
|
ok = pdbxMsgIo.read(filepath_msg, deposition_id=depid)
|
|
120
122
|
if ok:
|
|
@@ -695,7 +697,9 @@ class ExtractMessage(object):
|
|
|
695
697
|
dep_fpath = self.__getMsgFilePath(depid, "messages-from-depositor", test_folder=None)
|
|
696
698
|
bio_fpath = self.__getMsgFilePath(depid, "messages-to-depositor", test_folder=None)
|
|
697
699
|
|
|
698
|
-
|
|
700
|
+
# Reuse one resolved site_id for both reads so they follow the same backend.
|
|
701
|
+
siteId = self.__siteId if self.__siteId is not None else getSiteId()
|
|
702
|
+
pdbxMsgIo_frmDpstr = PdbxMessageIo(site_id=siteId, verbose=self.__verbose, log=self.__log)
|
|
699
703
|
ok = pdbxMsgIo_frmDpstr.read(dep_fpath, deposition_id=depid)
|
|
700
704
|
if not ok:
|
|
701
705
|
return []
|
|
@@ -704,7 +708,7 @@ class ExtractMessage(object):
|
|
|
704
708
|
pdbxMsgIo_frmDpstr.getMessageInfo()
|
|
705
709
|
) # in recordSetLst we now have a list of dictionaries with item names as keys and respective data for values
|
|
706
710
|
|
|
707
|
-
pdbxMsgIo_toDpstr = PdbxMessageIo(verbose=self.__verbose, log=self.__log)
|
|
711
|
+
pdbxMsgIo_toDpstr = PdbxMessageIo(site_id=siteId, verbose=self.__verbose, log=self.__log)
|
|
708
712
|
ok = pdbxMsgIo_toDpstr.read(bio_fpath, deposition_id=depid)
|
|
709
713
|
if not ok:
|
|
710
714
|
# Assume all messages unacknowledged
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/LockFile.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/Models.py
RENAMED
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/PdbxMessage.py
RENAMED
|
File without changes
|
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/db/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/CompatIo.py
RENAMED
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/DateUtil.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/io/__init__.py
RENAMED
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/models/Message.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/util/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wwpdb_apps_msgmodule-0.180.2 → wwpdb_apps_msgmodule-0.181.1}/wwpdb/apps/msgmodule/webapp/wsgi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|