Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 6c7ee3f

Browse files
authored
Merge pull request #209 from umccr/dev
Ensure gspread is less than version 6.0.0
2 parents 0f016fc + 962d813 commit 6c7ee3f

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

deploy/cttso-ica-to-pieriandx-cdk/Changelog.md

+9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
Changes in this log refer only to changes that make it to the 'main' branch and
44
are nested under deploy/cttso-ica-to-pieriandx-cdk.
55

6+
## 2024-02-02
7+
8+
> Author: Alexis Lucattini
9+
> Email: [Alexis.Lucattini@umccr.org](mailto:alexis.lucattini@umccr.org)
10+
11+
### Dependencies
12+
* Ensure gspread is less than version 6.0.0 (https://github.com/umccr/cttso-ica-to-pieriandx/pull/208)
13+
14+
615
## 2023-11-27
716

817
> Author: Alexis Lucattini

deploy/cttso-ica-to-pieriandx-cdk/lambdas/layers/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ aws_requests_auth==0.4.3
22
boto3==1.26.68
33
botocore==1.29.68
44
gspread_pandas==3.2.2
5+
gspread<6.0.0
56
mypy_boto3_lambda==1.26.55
67
mypy_boto3_secretsmanager==1.26.49
78
mypy_boto3_ssm==1.26.43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
from lambda_utils.gspread_helpers import set_google_secrets
2+
from gspread_pandas import Spread
3+
import pandas as pd
4+
5+
# Set google secrets
6+
set_google_secrets()
7+
8+
# Create the new spreadsheet
9+
new_spread = Spread(spread="ctTSO LIMS",
10+
sheet="Sheet1",
11+
create_spread=True)
12+
13+
new_headers = [
14+
"subject_id",
15+
"library_id",
16+
"in_glims",
17+
"in_portal",
18+
"in_redcap",
19+
"in_pieriandx",
20+
"glims_project_owner",
21+
"glims_project_name",
22+
"glims_panel",
23+
"glims_sample_type",
24+
"glims_is_identified",
25+
"glims_default_snomed_term",
26+
"glims_needs_redcap",
27+
"redcap_sample_type",
28+
"redcap_is_complete",
29+
"portal_wfr_id",
30+
"portal_wfr_end",
31+
"portal_wfr_status",
32+
"portal_sequence_run_name",
33+
"portal_is_failed_run",
34+
"pieriandx_submission_time",
35+
"pieriandx_case_id",
36+
"pieriandx_case_accession_number",
37+
"pieriandx_case_creation_date",
38+
"pieriandx_case_identified",
39+
"pieriandx_assignee",
40+
"pieriandx_disease_code",
41+
"pieriandx_disease_label",
42+
"pieriandx_panel_type",
43+
"pieriandx_sample_type",
44+
"pieriandx_workflow_id",
45+
"pieriandx_workflow_status",
46+
"pieriandx_report_status"
47+
]
48+
49+
headers_df = pd.DataFrame(columns=new_headers)
50+
51+
new_spread.df_to_sheet(headers_df, headers=True, index=False, replace=True)
52+
53+
# Auth update
54+
# Allow users to read
55+
new_spread.add_permission(
56+
"all@umccr.org|reader"
57+
)
58+
59+
# Allow yourself to edit
60+
# You may need to manually add extra rows as some point
61+
new_spread.add_permission(
62+
"alexis.lucattini@umccr.org|writer"
63+
)
64+
65+
# Show url - to set ssm parameter
66+
print(new_spread.url)

0 commit comments

Comments
 (0)