rcsb.workflow 0.71__tar.gz → 0.72__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 (40) hide show
  1. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/HISTORY.txt +1 -0
  2. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/PKG-INFO +1 -1
  3. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/pyproject.toml +1 -1
  4. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/cli/ExDbExec.py +2 -15
  5. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testExDbWorkflow.py +2 -24
  6. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/wuw/ExDbWorkflow.py +3 -85
  7. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/.gitignore +0 -0
  8. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/LICENSE +0 -0
  9. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/README.md +0 -0
  10. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/__init__.py +0 -0
  11. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/__init__.py +0 -0
  12. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/bcif/__init__.py +0 -0
  13. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/bcif/task_functions.py +0 -0
  14. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/chem/ChemCompFileWorkflow.py +0 -0
  15. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/chem/ChemCompImageWorkflow.py +0 -0
  16. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/chem/ChemCompSearchIndexWorkflow.py +0 -0
  17. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/chem/__init__.py +0 -0
  18. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/cli/BcifExec.py +0 -0
  19. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/cli/ChemSearchIndexExec.py +0 -0
  20. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/cli/ImgExec.py +0 -0
  21. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/cli/__init__.py +0 -0
  22. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/refstats/LigandQualityReferenceGenerator.py +0 -0
  23. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/refstats/ResidueRsccReferenceGenerator.py +0 -0
  24. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/refstats/__init__.py +0 -0
  25. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/targets/ProteinTargetSequenceExecutionWorkflow.py +0 -0
  26. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/targets/ProteinTargetSequenceWorkflow.py +0 -0
  27. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/targets/__init__.py +0 -0
  28. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/__init__.py +0 -0
  29. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/fixturePdbxLoader.py +0 -0
  30. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testBcifWorkflow.py +0 -0
  31. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testChemCompFileWorkflow.py +0 -0
  32. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testChemCompImageWorkflow.py +0 -0
  33. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testChemCompSearchIndexWorkflow.py +0 -0
  34. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testLigandQualityReferenceGenerator.py +0 -0
  35. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testProteinTargetSequenceWorkflow.py +0 -0
  36. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/tests/testResidueRsccReferenceGenerator.py +0 -0
  37. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/wuw/BcifWorkflow.py +0 -0
  38. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/wuw/PdbCsmImageWorkflow.py +0 -0
  39. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/wuw/WuwUtils.py +0 -0
  40. {rcsb_workflow-0.71 → rcsb_workflow-0.72}/rcsb/workflow/wuw/__init__.py +0 -0
@@ -66,3 +66,4 @@
66
66
  17-Jul-2026 - V0.69 Add shortlink support for bcif generation
67
67
  21-Jul-2026 - V0.70 Bcif hash support for extended ids
68
68
  19-Aug-2026 - V0.71 Support s3 stash and s3/minio for chem search
69
+ 22-Oct-2026 - V0.72 Remove unused reference sequence operations (upd_ref_seq, etl_uniprot_core) from ExDbWorkflow and exdb_wf_cli
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: rcsb.workflow
3
- Version: 0.71
3
+ Version: 0.72
4
4
  Summary: RCSB Python data processing and ETL/ELT workflow entry points
5
5
  Project-URL: Homepage, https://github.com/rcsb/py-rcsb_workflow
6
6
  Author-email: John Westbrook <john.westbrook@rcsb.org>
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
  [project]
6
6
  name = "rcsb.workflow"
7
7
  description = "RCSB Python data processing and ETL/ELT workflow entry points"
8
- version = "0.71"
8
+ version = "0.72"
9
9
  readme = "README.md"
10
10
  authors = [
11
11
  { name="John Westbrook", email="john.westbrook@rcsb.org" }
@@ -15,6 +15,7 @@
15
15
  # (latter will only be used briefly, as will stop generating SDF and Mol2 files in Dec 2024)
16
16
  # 31-Jan-2025 mjt Moved this script from rcsb.exdb (to remove circluar dependencies)
17
17
  # 10-Jan-2025 cs Add ligand_quality_ref_gen and residue_rscc_ref_gen operations
18
+ # 22-Oct-2026 dwp Remove unused reference sequence operations ('upd_ref_seq', 'etl_uniprot_core') and their arguments
18
19
  ##
19
20
  __docformat__ = "google en"
20
21
  __author__ = "John Westbrook"
@@ -46,9 +47,7 @@ def main():
46
47
  help="Loading operation to perform",
47
48
  choices=[
48
49
  "etl_chemref", # ETL integrated chemical reference data
49
- "etl_uniprot_core", # ETL UniProt core reference data
50
50
  "etl_tree_node_lists", # ETL tree node lists
51
- "upd_ref_seq", # Update reference sequence assignments
52
51
  "upd_neighbor_interactions",
53
52
  "upd_uniprot_taxonomy",
54
53
  "upd_targets",
@@ -80,7 +79,6 @@ def main():
80
79
  parser.add_argument("--document_limit", default=None, help="Load document limit for testing")
81
80
  #
82
81
  parser.add_argument("--rebuild_cache", default=False, action="store_true", help="Rebuild cached resource files")
83
- parser.add_argument("--rebuild_sequence_cache", default=False, action="store_true", help="Rebuild cached resource files for reference sequence updates")
84
82
  parser.add_argument("--provider_types_exclude", default=None, help="Resource provider types to exclude")
85
83
  parser.add_argument("--use_filtered_tax_list", default=False, action="store_true", help="Use filtered list for taxonomy tree loading")
86
84
  parser.add_argument("--disable_read_back_check", default=False, action="store_true", help="Disable read back check on all documents")
@@ -88,12 +86,6 @@ def main():
88
86
  parser.add_argument("--mock", default=False, action="store_true", help="Use MOCK repository configuration for testing")
89
87
  parser.add_argument("--log_file_path", default=None, help="Path to runtime log file output.")
90
88
  #
91
- # Arguments specific for op == 'upd_ref_seq'
92
- parser.add_argument("--ref_chunk_size", default=10, help="Max chunk size for reference sequence updates (for op 'upd_ref_seq')")
93
- parser.add_argument("--min_missing", default=0, help="Minimum number of allowed missing reference sequences (for op 'upd_ref_seq')")
94
- parser.add_argument("--min_match_primary_percent", default=None, help="Minimum reference sequence match percentage (for op 'upd_ref_seq')")
95
- parser.add_argument("--test_mode", default=False, action="store_true", help="Test mode for reference sequence updates (for op 'upd_ref_seq')")
96
- #
97
89
  # Arguments specific for op == 'ccd_img_gen' or 'ccd_file_gen'
98
90
  parser.add_argument("--cc_output_path", default=None, help="The base local directory path where chemical component files (image, coordinates) are written (for op 'ccd_img_gen')")
99
91
  parser.add_argument("--cc_cache_path", default=None, help="The base local directory path where chemical component cache data are written (for op 'ccd_img_gen')")
@@ -121,7 +113,7 @@ def main():
121
113
  # Run the operation
122
114
  okR = False
123
115
  exWf = ExDbWorkflow(**commonD)
124
- if op in ["etl_chemref", "etl_uniprot_core", "etl_tree_node_lists", "upd_ref_seq"]:
116
+ if op in ["etl_chemref", "etl_tree_node_lists"]:
125
117
  okR = exWf.load(op, **loadD)
126
118
  elif op in [
127
119
  "upd_neighbor_interactions",
@@ -219,12 +211,7 @@ def processArguments(args):
219
211
  "dbType": args.db_type,
220
212
  "documentLimit": int(args.document_limit) if args.document_limit else None,
221
213
  "readBackCheck": not args.disable_read_back_check,
222
- "rebuildSequenceCache": args.rebuild_sequence_cache,
223
214
  "useFilteredLists": args.use_filtered_tax_list,
224
- "refChunkSize": int(args.ref_chunk_size),
225
- "minMissing": int(args.min_missing),
226
- "minMatchPrimaryPercent": float(args.min_match_primary_percent) if args.min_match_primary_percent else None,
227
- "testMode": args.test_mode,
228
215
  "rebuildAllNeighborInteractions": args.rebuild_all_neighbor_interactions,
229
216
  "ccFileNamePrefix": args.cc_file_prefix,
230
217
  "ccUrlTarget": args.cc_url_target,
@@ -6,6 +6,7 @@
6
6
  #
7
7
  # Updates:
8
8
  # 31-Jan-2025 mjt Moved this script from rcsb.exdb (to remove circluar dependencies)
9
+ # 22-Oct-2026 dwp Remove skipped 'upd_ref_seq' test (operation removed)
9
10
  #
10
11
  ##
11
12
  """
@@ -62,7 +63,7 @@ class ExDbWorkflowTests(unittest.TestCase):
62
63
  "restoreUseGit": True,
63
64
  "restoreUseStash": False,
64
65
  }
65
- self.__loadCommonD = {"readBackCheck": True, "numProc": 2, "chunkSize": 5, "refChunkSize": 5, "loadType": "full", "useFilteredLists": True}
66
+ self.__loadCommonD = {"readBackCheck": True, "numProc": 2, "chunkSize": 5, "loadType": "full", "useFilteredLists": True}
66
67
  self.__startTime = time.time()
67
68
  logger.debug("Starting %s at %s", self.id(), time.strftime("%Y %m %d %H:%M:%S", time.localtime()))
68
69
 
@@ -93,33 +94,10 @@ class ExDbWorkflowTests(unittest.TestCase):
93
94
  logger.exception("Failing with %s", str(e))
94
95
  self.fail()
95
96
 
96
- @unittest.skip("Troubleshooting test")
97
- def testExDbLoaderWorkflowsWithCacheCheck(self):
98
- """Test run sequence reference data update workflow step ..."""
99
- #
100
- try:
101
- self.__commonD["rebuildCache"] = False
102
- rlWf = ExDbWorkflow(**self.__commonD)
103
- #
104
- ok = rlWf.load("upd_ref_seq", minMatchPrimaryPercent=50.0, **self.__loadCommonD)
105
- logger.info("Cache status is %r", ok)
106
- self.assertTrue(ok)
107
- if ok:
108
- self.__commonD["rebuildCache"] = False
109
- rlWf = ExDbWorkflow(**self.__commonD)
110
- ok1 = rlWf.load("upd_ref_seq", **self.__loadCommonD)
111
- self.assertTrue(ok1)
112
- ok3 = rlWf.load("etl_tree_node_lists", **self.__loadCommonD)
113
- self.assertTrue(ok3)
114
- except Exception as e:
115
- logger.exception("Failing with %s", str(e))
116
- self.fail()
117
-
118
97
 
119
98
  def workflowLoadSuite():
120
99
  suiteSelect = unittest.TestSuite()
121
100
  suiteSelect.addTest(ExDbWorkflowTests("testExDbLoaderWorkflows"))
122
- suiteSelect.addTest(ExDbWorkflowTests("testExDbLoaderWorkflowsWithCacheCheck"))
123
101
  return suiteSelect
124
102
 
125
103
 
@@ -11,6 +11,8 @@
11
11
  # 20-Aug-2024 dwp Add LoadTargetCofactors step; change name of UpdateTargetsCofactors step to UpdateTargetsData
12
12
  # 31-Jan-2025 mjt Moved this script from rcsb.exdb (to remove circluar dependencies)
13
13
  # 10-Jan-2026 cs Added ligand quality and residue RSCC reference data generation workflows
14
+ # 22-Oct-2026 dwp Remove unused reference sequence operations ('upd_ref_seq', 'etl_uniprot_core') and
15
+ # doReferenceSequenceUpdate(), whose rcsb.exdb modules are being removed
14
16
  ##
15
17
  __docformat__ = "google en"
16
18
  __author__ = "John Westbrook"
@@ -32,11 +34,7 @@ from rcsb.workflow.chem.ChemCompFileWorkflow import ChemCompFileWorkflow
32
34
  from rcsb.workflow.refstats.LigandQualityReferenceGenerator import LigandQualityReferenceGenerator
33
35
  from rcsb.workflow.refstats.ResidueRsccReferenceGenerator import ResidueRsccReferenceGenerator
34
36
  from rcsb.exdb.chemref.ChemRefEtlWorker import ChemRefEtlWorker
35
- from rcsb.exdb.seq.ReferenceSequenceAnnotationAdapter import ReferenceSequenceAnnotationAdapter
36
- from rcsb.exdb.seq.ReferenceSequenceAnnotationProvider import ReferenceSequenceAnnotationProvider
37
- from rcsb.exdb.seq.UniProtCoreEtlWorker import UniProtCoreEtlWorker
38
37
  from rcsb.exdb.tree.TreeNodeListWorker import TreeNodeListWorker
39
- from rcsb.exdb.utils.ObjectTransformer import ObjectTransformer
40
38
  from rcsb.exdb.wf.EntryInfoEtlWorkflow import EntryInfoEtlWorkflow
41
39
  from rcsb.exdb.wf.GlycanEtlWorkflow import GlycanEtlWorkflow
42
40
  from rcsb.exdb.wf.PubChemEtlWorkflow import PubChemEtlWorkflow
@@ -81,31 +79,22 @@ class ExDbWorkflow(object):
81
79
  logger.info("Starting operation %r\n", op)
82
80
  #
83
81
  # argument processing
84
- if op not in ["etl_tree_node_lists", "etl_chemref", "etl_uniprot_core", "upd_ref_seq", "upd_ref_seq_comp_models", "refresh_pubchem"]:
82
+ if op not in ["etl_tree_node_lists", "etl_chemref", "refresh_pubchem"]:
85
83
  logger.error("Unsupported operation %r - exiting", op)
86
84
  return False
87
85
  if not self.__cacheStatus:
88
86
  raise ValueError("Failed to rebuild CACHE in ExDBWorkflow - exiting")
89
87
  try:
90
- # test mode and UniProt accession primary match minimum count for doReferenceSequenceUpdate()
91
- testMode = kwargs.get("testMode", False)
92
- minMatchPrimaryPercent = kwargs.get("minMatchPrimaryPercent", None)
93
- minMissing = kwargs.get("minMissing", 0)
94
- #
95
88
  readBackCheck = kwargs.get("readBackCheck", True)
96
89
  numProc = int(kwargs.get("numProc", 1))
97
90
  chunkSize = int(kwargs.get("chunkSize", 10))
98
91
  maxStepLength = int(kwargs.get("maxStepLength", 500))
99
- refChunkSize = int(kwargs.get("refChunkSize", 10))
100
92
  documentLimit = kwargs.get("documentLimit", None)
101
93
  documentLimit = int(documentLimit) if documentLimit else None
102
94
  loadType = kwargs.get("loadType", "full") # or replace
103
95
  dbType = kwargs.get("dbType", "mongo")
104
96
  tU = TimeUtil()
105
97
  dataSetId = kwargs.get("dataSetId") if "dataSetId" in kwargs else tU.getCurrentWeekSignature()
106
- # Rebuild or reuse reference sequence cache
107
- rebuildSequenceCache = kwargs.get("rebuildSequenceCache", False)
108
- useSequenceCache = not rebuildSequenceCache
109
98
  #
110
99
  useFilteredLists = kwargs.get("useFilteredLists", False)
111
100
  treeCollectionList = kwargs.get("treeCollectionList", None)
@@ -147,39 +136,6 @@ class ExDbWorkflow(object):
147
136
  )
148
137
  ok = crw.load(dataSetId, extResource="DrugBank", loadType=loadType)
149
138
  okS = self.loadStatus(crw.getLoadStatus(), readBackCheck=readBackCheck)
150
-
151
- elif op == "etl_uniprot_core":
152
- crw = UniProtCoreEtlWorker(
153
- self.__cfgOb,
154
- self.__cachePath,
155
- numProc=numProc,
156
- chunkSize=chunkSize,
157
- maxStepLength=maxStepLength,
158
- documentLimit=documentLimit,
159
- verbose=self.__debugFlag,
160
- readBackCheck=readBackCheck,
161
- useCache=self.__useCache,
162
- )
163
- ok = crw.load(dataSetId, extResource="UniProt", loadType=loadType)
164
- okS = self.loadStatus(crw.getLoadStatus(), readBackCheck=readBackCheck)
165
-
166
- elif op == "upd_ref_seq":
167
- databaseName = "pdbx_core"
168
- collectionName = "pdbx_core_polymer_entity"
169
- polymerType = "Protein"
170
- ok = self.doReferenceSequenceUpdate(
171
- databaseName,
172
- collectionName,
173
- polymerType,
174
- fetchLimit=documentLimit,
175
- useSequenceCache=useSequenceCache,
176
- testMode=testMode,
177
- minMatchPrimaryPercent=minMatchPrimaryPercent,
178
- minMissing=minMissing,
179
- refChunkSize=refChunkSize,
180
- numProc=numProc
181
- )
182
- okS = ok
183
139
  logger.info("Completed operation %r with status %r\n", op, ok and okS)
184
140
  return ok and okS
185
141
 
@@ -224,44 +180,6 @@ class ExDbWorkflow(object):
224
180
  logger.exception("Failing with %s", str(e))
225
181
  return ret
226
182
 
227
- def doReferenceSequenceUpdate(
228
- self,
229
- databaseName,
230
- collectionName,
231
- polymerType,
232
- fetchLimit=None,
233
- useSequenceCache=False,
234
- testMode=False,
235
- minMatchPrimaryPercent=None,
236
- minMissing=0,
237
- refChunkSize=10,
238
- numProc=2,
239
- **kwargs
240
- ):
241
- try:
242
- _ = kwargs
243
- _ = testMode
244
- ok = False
245
- # -------
246
- rsaP = ReferenceSequenceAnnotationProvider(
247
- self.__cfgOb, databaseName, collectionName, polymerType, useCache=useSequenceCache, cachePath=self.__cachePath, maxChunkSize=refChunkSize, numProc=numProc
248
- )
249
- ok = rsaP.testCache(minMatchPrimaryPercent=minMatchPrimaryPercent, minMissing=minMissing)
250
- if ok:
251
- logger.info("Cached reference data count is %d", rsaP.getRefDataCount())
252
- rsa = ReferenceSequenceAnnotationAdapter(rsaP)
253
- obTr = ObjectTransformer(self.__cfgOb, objectAdapter=rsa)
254
- ok = obTr.doTransform(
255
- databaseName=databaseName, collectionName=collectionName, fetchLimit=fetchLimit, selectionQuery={"entity_poly.rcsb_entity_polymer_type": polymerType}
256
- )
257
- else:
258
- logger.error("Reference sequence data cache build failing")
259
- return False
260
- return ok
261
- except Exception as e:
262
- logger.exception("Failing with %s", str(e))
263
- return False
264
-
265
183
  def generateCcdFiles(self, op, **kwargs):
266
184
  logger.info("Starting operation %r\n", op)
267
185
  #
File without changes
File without changes
File without changes