sapiopycommons 2025.4.15a483__tar.gz → 2025.4.16a485__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.

Potentially problematic release.


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

Files changed (86) hide show
  1. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/PKG-INFO +1 -1
  2. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/pyproject.toml +1 -1
  3. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/experiment_cache.py +23 -8
  4. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/step_creation.py +1 -0
  5. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/.gitignore +0 -0
  6. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/LICENSE +0 -0
  7. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/README.md +0 -0
  8. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/__init__.py +0 -0
  9. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/callbacks/__init__.py +0 -0
  10. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/callbacks/callback_util.py +0 -0
  11. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/callbacks/field_builder.py +0 -0
  12. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/chem/IndigoMolecules.py +0 -0
  13. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/chem/Molecules.py +0 -0
  14. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/chem/__init__.py +0 -0
  15. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/customreport/__init__.py +0 -0
  16. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/customreport/auto_pagers.py +0 -0
  17. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/customreport/column_builder.py +0 -0
  18. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/customreport/custom_report_builder.py +0 -0
  19. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/customreport/term_builder.py +0 -0
  20. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/datatype/__init__.py +0 -0
  21. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/datatype/attachment_util.py +0 -0
  22. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/datatype/data_fields.py +0 -0
  23. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/datatype/pseudo_data_types.py +0 -0
  24. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/__init__.py +0 -0
  25. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/experiment_handler.py +0 -0
  26. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/experiment_report_util.py +0 -0
  27. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/experiment_step_factory.py +0 -0
  28. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/experiment_tags.py +0 -0
  29. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/eln/plate_designer.py +0 -0
  30. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/__init__.py +0 -0
  31. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/complex_data_loader.py +0 -0
  32. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/file_bridge.py +0 -0
  33. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/file_bridge_handler.py +0 -0
  34. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/file_data_handler.py +0 -0
  35. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/file_util.py +0 -0
  36. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/file_validator.py +0 -0
  37. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/files/file_writer.py +0 -0
  38. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/flowcyto/flow_cyto.py +0 -0
  39. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/flowcyto/flowcyto_data.py +0 -0
  40. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/__init__.py +0 -0
  41. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/accession_service.py +0 -0
  42. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/aliases.py +0 -0
  43. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/audit_log.py +0 -0
  44. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/custom_report_util.py +0 -0
  45. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/data_structure_util.py +0 -0
  46. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/directive_util.py +0 -0
  47. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/exceptions.py +0 -0
  48. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/popup_util.py +0 -0
  49. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/sapio_links.py +0 -0
  50. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/storage_util.py +0 -0
  51. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/general/time_util.py +0 -0
  52. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/multimodal/multimodal.py +0 -0
  53. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/multimodal/multimodal_data.py +0 -0
  54. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/processtracking/__init__.py +0 -0
  55. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/processtracking/custom_workflow_handler.py +0 -0
  56. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/processtracking/endpoints.py +0 -0
  57. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/recordmodel/__init__.py +0 -0
  58. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/recordmodel/record_handler.py +0 -0
  59. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/rules/__init__.py +0 -0
  60. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/rules/eln_rule_handler.py +0 -0
  61. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/rules/on_save_rule_handler.py +0 -0
  62. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/samples/aliquot.py +0 -0
  63. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/sftpconnect/__init__.py +0 -0
  64. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/sftpconnect/sftp_builder.py +0 -0
  65. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/webhook/__init__.py +0 -0
  66. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/webhook/webhook_context.py +0 -0
  67. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/webhook/webhook_handlers.py +0 -0
  68. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/src/sapiopycommons/webhook/webservice_handlers.py +0 -0
  69. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/AF-A0A009IHW8-F1-model_v4.cif +0 -0
  70. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/_do_not_add_init_py_here +0 -0
  71. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/accession_test.py +0 -0
  72. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/aliquot_test.py +0 -0
  73. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/bio_reg_test.py +0 -0
  74. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/chem_test.py +0 -0
  75. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/chem_test_curation_queue.py +0 -0
  76. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/curation_queue_test.sdf +0 -0
  77. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/data_type_models.py +0 -0
  78. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/flowcyto/101_DEN084Y5_15_E01_008_clean.fcs +0 -0
  79. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/flowcyto/101_DEN084Y5_15_E03_009_clean.fcs +0 -0
  80. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/flowcyto/101_DEN084Y5_15_E05_010_clean.fcs +0 -0
  81. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/flowcyto/8_color_ICS.wsp +0 -0
  82. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/flowcyto/COVID19_W_001_O.fcs +0 -0
  83. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/flowcyto_test.py +0 -0
  84. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/kappa.chains.fasta +0 -0
  85. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/mafft_test.py +0 -0
  86. {sapiopycommons-2025.4.15a483 → sapiopycommons-2025.4.16a485}/tests/test.gb +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sapiopycommons
3
- Version: 2025.4.15a483
3
+ Version: 2025.4.16a485
4
4
  Summary: Official Sapio Python API Utilities Package
5
5
  Project-URL: Homepage, https://github.com/sapiosciences
6
6
  Author-email: Jonathan Steck <jsteck@sapiosciences.com>, Yechen Qiao <yqiao@sapiosciences.com>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sapiopycommons"
7
- version='2025.04.15a483'
7
+ version='2025.04.16a485'
8
8
  authors = [
9
9
  { name="Jonathan Steck", email="jsteck@sapiosciences.com" },
10
10
  { name="Yechen Qiao", email="yqiao@sapiosciences.com" },
@@ -63,7 +63,7 @@ class ExperimentCacheManager:
63
63
  self._predefined_fields = {}
64
64
 
65
65
  def get_experiment_template(self, name: str, active: bool = True, version: int | None = None,
66
- first_match: bool = False) -> ElnTemplate:
66
+ first_match: bool = False, public: bool | None = True) -> ElnTemplate:
67
67
  """
68
68
  Get the experiment template with the given information.
69
69
 
@@ -71,6 +71,10 @@ class ExperimentCacheManager:
71
71
  :param active: Whether the template is marked as active.
72
72
  :param version: The version of the template to get. If None, the latest version will be returned.
73
73
  :param first_match: If true, returns the first match found. If false, raises an exception.
74
+ :param public: Whether the template is public. If true, only pubic templates will be queried. If false, only
75
+ private templates will be queried. If None, both public and private templates will be queried. Non-public
76
+ templates do not have a version number, so this will always fail if public is false and a version number is
77
+ provided.
74
78
  :return: The experiment template with the given information.
75
79
  """
76
80
  if not hasattr(self, "_templates"):
@@ -78,11 +82,11 @@ class ExperimentCacheManager:
78
82
  query.active_templates_only = False
79
83
  query.latest_version_only = False
80
84
  self._templates = self.eln_man.get_template_experiment_list(query)
81
- return self._find_template(self._templates, name, active, version, first_match)
85
+ return self._find_template(self._templates, name, active, version, first_match, public)
82
86
 
83
87
 
84
88
  def get_protocol_template(self, name: str, active: bool = True, version: int | None = None,
85
- first_match: bool = False) -> ProtocolTemplateInfo:
89
+ first_match: bool = False, public: bool | None = True) -> ProtocolTemplateInfo:
86
90
  """
87
91
  Get the protocol template with the given information. Will throw an exception if multiple templates match
88
92
  the given information.
@@ -91,6 +95,10 @@ class ExperimentCacheManager:
91
95
  :param active: Whether the template is marked as active.
92
96
  :param version: The version of the template to get. If None, the latest version will be returned.
93
97
  :param first_match: If true, returns the first match found. If false, raises an exception.
98
+ :param public: Whether the template is public. If true, only pubic templates will be queried. If false, only
99
+ private templates will be queried. If None, both public and private templates will be queried. Non-public
100
+ templates do not have a version number, so this will always fail if public is false and a version number is
101
+ provided.
94
102
  :return: The protocol template with the given information.
95
103
  """
96
104
  if not hasattr(self, "_protocols"):
@@ -98,11 +106,11 @@ class ExperimentCacheManager:
98
106
  query.active_templates_only = False
99
107
  query.latest_version_only = False
100
108
  self._protocols = self.eln_man.get_protocol_template_info_list(query)
101
- return self._find_template(self._protocols, name, active, version, first_match)
109
+ return self._find_template(self._protocols, name, active, version, first_match, public)
102
110
 
103
111
  @staticmethod
104
112
  def _find_template(templates: list[ElnTemplate] | list[ProtocolTemplateInfo], name: str, active: bool,
105
- version: int, first_match: bool) -> ElnTemplate | ProtocolTemplateInfo:
113
+ version: int, first_match: bool, public: bool | None) -> ElnTemplate | ProtocolTemplateInfo:
106
114
  """
107
115
  Find the experiment or protocol template with the given information.
108
116
  """
@@ -114,15 +122,22 @@ class ExperimentCacheManager:
114
122
  continue
115
123
  if version is not None and template.template_version != version:
116
124
  continue
125
+ if public is True and template.template_version is None:
126
+ continue
127
+ if public is False and template.template_version is not None:
128
+ continue
117
129
  matches.append(template)
118
130
  if not matches:
119
131
  raise SapioException(f"No template with the name \"{name}\"" +
120
132
  ("" if version is None else f" and the version {version}") +
121
133
  f" found.")
122
- if not version:
123
- return max(matches, key=lambda x: x.template_version)
134
+ # Only filter for the max version number if any of the matches actually have a version number.
135
+ versioned_matches = [x for x in matches if x.template_version is not None]
136
+ if version is None and versioned_matches:
137
+ return max(versioned_matches, key=lambda x: x.template_version)
124
138
  if len(matches) > 1 and not first_match:
125
- raise SapioException(f"Multiple templates with the name \"{name}\" found.")
139
+ raise SapioException(f"Multiple templates with the name \"{name}\" found. Consider setting first_match to "
140
+ f"true, or restrict your search criteria further.")
126
141
  return matches[0]
127
142
 
128
143
  def get_predefined_field(self, field_name: str, data_type: ElnBaseDataType) -> AbstractVeloxFieldDefinition:
@@ -185,6 +185,7 @@ class GlobalDtTableStepCreation(StepCreation):
185
185
  self.layout_name = None
186
186
  self.extension_types = None
187
187
  self.table_columns = None
188
+ self.field_names = None
188
189
  self.show_key_fields = None
189
190
 
190
191