This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from umccr/dev
Ensure gspread is less than version 6.0.0
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,15 @@ | |
Changes in this log refer only to changes that make it to the 'main' branch and | ||
are nested under deploy/cttso-ica-to-pieriandx-cdk. | ||
|
||
## 2024-02-02 | ||
|
||
> Author: Alexis Lucattini | ||
> Email: [[email protected]](mailto:[email protected]) | ||
### Dependencies | ||
* Ensure gspread is less than version 6.0.0 (https://github.com/umccr/cttso-ica-to-pieriandx/pull/208) | ||
|
||
|
||
## 2023-11-27 | ||
|
||
> Author: Alexis Lucattini | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
deploy/cttso-ica-to-pieriandx-cdk/scripts/initialise_lims.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
from lambda_utils.gspread_helpers import set_google_secrets | ||
from gspread_pandas import Spread | ||
import pandas as pd | ||
|
||
# Set google secrets | ||
set_google_secrets() | ||
|
||
# Create the new spreadsheet | ||
new_spread = Spread(spread="ctTSO LIMS", | ||
sheet="Sheet1", | ||
create_spread=True) | ||
|
||
new_headers = [ | ||
"subject_id", | ||
"library_id", | ||
"in_glims", | ||
"in_portal", | ||
"in_redcap", | ||
"in_pieriandx", | ||
"glims_project_owner", | ||
"glims_project_name", | ||
"glims_panel", | ||
"glims_sample_type", | ||
"glims_is_identified", | ||
"glims_default_snomed_term", | ||
"glims_needs_redcap", | ||
"redcap_sample_type", | ||
"redcap_is_complete", | ||
"portal_wfr_id", | ||
"portal_wfr_end", | ||
"portal_wfr_status", | ||
"portal_sequence_run_name", | ||
"portal_is_failed_run", | ||
"pieriandx_submission_time", | ||
"pieriandx_case_id", | ||
"pieriandx_case_accession_number", | ||
"pieriandx_case_creation_date", | ||
"pieriandx_case_identified", | ||
"pieriandx_assignee", | ||
"pieriandx_disease_code", | ||
"pieriandx_disease_label", | ||
"pieriandx_panel_type", | ||
"pieriandx_sample_type", | ||
"pieriandx_workflow_id", | ||
"pieriandx_workflow_status", | ||
"pieriandx_report_status" | ||
] | ||
|
||
headers_df = pd.DataFrame(columns=new_headers) | ||
|
||
new_spread.df_to_sheet(headers_df, headers=True, index=False, replace=True) | ||
|
||
# Auth update | ||
# Allow users to read | ||
new_spread.add_permission( | ||
"[email protected]|reader" | ||
) | ||
|
||
# Allow yourself to edit | ||
# You may need to manually add extra rows as some point | ||
new_spread.add_permission( | ||
"[email protected]|writer" | ||
) | ||
|
||
# Show url - to set ssm parameter | ||
print(new_spread.url) |