nci-cidc-api-modules 1.2.19__py3-none-any.whl → 1.2.21__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.
@@ -0,0 +1,25 @@
1
+ from typing import Self
2
+
3
+ from sqlalchemy_mixins import SerializeMixin, ReprMixin
4
+
5
+ from cidc_api.config.db import db
6
+
7
+
8
+ class BaseORM(db.Model, ReprMixin, SerializeMixin):
9
+ __abstract__ = True
10
+ __repr__ = ReprMixin.__repr__
11
+
12
+ def merge(self, d: dict) -> Self:
13
+ """Merge keys and values from dict d into this model, overwriting as necessary."""
14
+ for key, value in d.items():
15
+ setattr(self, key, value)
16
+ return self
17
+
18
+ def clone(self) -> "BaseORM":
19
+ """Clones a SQLAlchemy ORM object, excluding primary keys."""
20
+ mapper = self.__mapper__
21
+ new_instance = self.__class__()
22
+ for column in mapper.columns:
23
+ if not column.primary_key:
24
+ setattr(new_instance, column.key, getattr(self, column.key))
25
+ return new_instance
@@ -439,6 +439,11 @@ assay_facets: Facets = {
439
439
  "Analysis files for all samples run on the Olink platform in the trial.",
440
440
  ),
441
441
  },
442
+ "Olink HT": {
443
+ "Batch-Level Combined File": FacetConfig(["/olink_ht/batch_level_combined_file.xlsx"]),
444
+ "Study-Level Combined File": FacetConfig(["/olink_ht/study_level_combined_file.xlsx"]),
445
+ "Npx Run File": FacetConfig(["/olink_ht/npx_run_file.xlsx"]),
446
+ },
442
447
  "IHC": {
443
448
  "Images": FacetConfig(["/ihc/ihc_image."]),
444
449
  "Combined Markers": FacetConfig(["csv|ihc marker combined"]),
cidc_api/models/types.py CHANGED
@@ -84,6 +84,7 @@ AssayType = Literal[
84
84
  "scRNAseq",
85
85
  "snRNA-Seq",
86
86
  "Visium",
87
+ "Olink HT",
87
88
  ]
88
89
 
89
90
 
cidc_api/shared/utils.py CHANGED
@@ -5,4 +5,7 @@ def strip_whitespaces(df):
5
5
  else:
6
6
  return x
7
7
 
8
- return df.map(stripper)
8
+ df.rename(columns=stripper, inplace=True)
9
+ df = df.map(stripper)
10
+
11
+ return df
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nci_cidc_api_modules
3
- Version: 1.2.19
3
+ Version: 1.2.21
4
4
  Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
5
5
  Home-page: https://github.com/NCI-CIDC/cidc-api-gae
6
6
  License: MIT license
@@ -30,7 +30,7 @@ Requires-Dist: requests>=2.32.5
30
30
  Requires-Dist: sqlalchemy>=2.0.44
31
31
  Requires-Dist: sqlalchemy-mixins~=2.0.5
32
32
  Requires-Dist: werkzeug>=3.1.3
33
- Requires-Dist: nci-cidc-schemas==0.28.8
33
+ Requires-Dist: nci-cidc-schemas==0.28.9
34
34
  Dynamic: description
35
35
  Dynamic: description-content-type
36
36
  Dynamic: home-page
@@ -8,10 +8,11 @@ cidc_api/models/data.py,sha256=evv9JJcW3U_g-74MgKdxtB_gGJBTRQjtnsVKwa3DzFE,638
8
8
  cidc_api/models/migrations.py,sha256=UlS5How3J4ryaRuZT6F5VQtAKikkl0LTv9MgMO_ltiQ,11161
9
9
  cidc_api/models/models.py,sha256=2ENATE2dbl93uaKSqveqAVuhv1SvxOkcw4pWDTolng0,148484
10
10
  cidc_api/models/schemas.py,sha256=6IE2dJoEMcMbi0Vr1V3cYKnPKU0hv9vRKBixOZHe88s,2766
11
- cidc_api/models/types.py,sha256=eDQCd-lUClxpFa3QNN7SRmcIezoqPK8IbTa9atAChn0,29912
11
+ cidc_api/models/types.py,sha256=9dInLZ6gN39zhEe3xhBXyz2xVMr11CeE1-GCOmT_OjY,29928
12
+ cidc_api/models/db/base_orm.py,sha256=EV78qFBcOR7spK_PhjbkpsGcmcP33AQItX61SidDa_8,813
12
13
  cidc_api/models/files/__init__.py,sha256=8BMTnUSHzUbz0lBeEQY6NvApxDD3GMWMduoVMos2g4Y,213
13
14
  cidc_api/models/files/details.py,sha256=sZkGM7iEV4-J6IDQCdiMV6KBDLbPxCOqUMaU3aY9rX8,65153
14
- cidc_api/models/files/facets.py,sha256=RZoe0FadRGJw8_-jzJQkc4dIVSuaYlunNrsopb2dYho,33325
15
+ cidc_api/models/files/facets.py,sha256=BGx6FeQkK-ujCs-0Y8dUlba8uOmXgAqdY5u1EQqOnFM,33612
15
16
  cidc_api/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
17
  cidc_api/shared/auth.py,sha256=PHqmVGkqDjbmUofytVFwD_9ssgUomESl3fFtFHPwZYQ,9062
17
18
  cidc_api/shared/email_layout.html,sha256=pBoTNw3ACHH-ncZFaNvcy5bXMqPwizR78usb0uCYtIc,7670
@@ -20,9 +21,9 @@ cidc_api/shared/file_handling.py,sha256=UP3KZ61Km5RNmNfk126_upKv-jGkDzpc5Pvk1s7c
20
21
  cidc_api/shared/gcloud_client.py,sha256=ovXGS2ynaBgB_23prj23H10GNN4fectiVF7Hj4LJXQk,37302
21
22
  cidc_api/shared/jose.py,sha256=-qzGzEDAlokEp9E7WtBtQkXyyfPWTYXlwYpCqVJWmqM,1830
22
23
  cidc_api/shared/rest_utils.py,sha256=RwR30WOUAYCxL7V-i2totEyeriG30GbBDvBcpLXhM9w,6594
23
- cidc_api/shared/utils.py,sha256=oDGC8MHxEf7MDuzWynZuE66OfNUnRZE8z7Yn2Q9kYO8,178
24
- nci_cidc_api_modules-1.2.19.dist-info/licenses/LICENSE,sha256=pNYWVTHaYonnmJyplmeAp7tQAjosmDpAWjb34jjv7Xs,1102
25
- nci_cidc_api_modules-1.2.19.dist-info/METADATA,sha256=6bVrQ0WH8icbydssbIQFk5FMCoHfZXP-eGEDgfeyURo,39691
26
- nci_cidc_api_modules-1.2.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- nci_cidc_api_modules-1.2.19.dist-info/top_level.txt,sha256=rNiRzL0lJGi5Q9tY9uSoMdTbJ-7u5c_D2E86KA94yRA,9
28
- nci_cidc_api_modules-1.2.19.dist-info/RECORD,,
24
+ cidc_api/shared/utils.py,sha256=FdZJiynmh6BIzWyCTcUAcUMKCAtzEyp_HLdXEticNcI,237
25
+ nci_cidc_api_modules-1.2.21.dist-info/licenses/LICENSE,sha256=pNYWVTHaYonnmJyplmeAp7tQAjosmDpAWjb34jjv7Xs,1102
26
+ nci_cidc_api_modules-1.2.21.dist-info/METADATA,sha256=ndbMwIYgzUIcilJqNFhpJ6vBkdqiy1VjoRmxidmXf7g,39691
27
+ nci_cidc_api_modules-1.2.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ nci_cidc_api_modules-1.2.21.dist-info/top_level.txt,sha256=rNiRzL0lJGi5Q9tY9uSoMdTbJ-7u5c_D2E86KA94yRA,9
29
+ nci_cidc_api_modules-1.2.21.dist-info/RECORD,,