gen3-dataops-toolkit 3.6.0__tar.gz → 3.7.0__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 (56) hide show
  1. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/PKG-INFO +9 -1
  2. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/README.md +8 -0
  3. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/pyproject.toml +1 -1
  4. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/synth.py +36 -0
  5. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/full_deploy_dd_and_synth.sh +44 -24
  6. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/__init__.py +0 -0
  7. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/__init__.py +0 -0
  8. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/__init__.py +0 -0
  9. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/dispatch.py +0 -0
  10. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/registry.py +0 -0
  11. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/resolve.py +0 -0
  12. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/runner.py +0 -0
  13. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/safety.py +0 -0
  14. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/config_cmds.py +0 -0
  15. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/delete_cmds.py +0 -0
  16. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/dict_cmds.py +0 -0
  17. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/ec2_cmds.py +0 -0
  18. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/indexd_cmds.py +0 -0
  19. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/jobs.py +0 -0
  20. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/k8s.py +0 -0
  21. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/main.py +0 -0
  22. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/metadata.py +0 -0
  23. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/pipeline_cmds.py +0 -0
  24. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/release_cmds.py +0 -0
  25. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/config.py +0 -0
  26. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/indexd/__init__.py +0 -0
  27. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/indexd/file_access.py +0 -0
  28. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/indexd/indexd_registrar.py +0 -0
  29. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/ingest/ingest.py +0 -0
  30. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/resolver.py +0 -0
  31. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/delete/delete_all_metadata_for_project.py +0 -0
  32. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/delete/delete_metadata.sh +0 -0
  33. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/delete/delete_metadata_by_guid.py +0 -0
  34. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/dictionary/deploy_dd.sh +0 -0
  35. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/dictionary/pull_dict.sh +0 -0
  36. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/dictionary/upload_dictionary.py +0 -0
  37. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/indexd/register_indexd.py +0 -0
  38. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/indexd/verify_file_access.py +0 -0
  39. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/argocd_restart_etl.sh +0 -0
  40. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/argocd_restart_ms.sh +0 -0
  41. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/argocd_restart_schema.sh +0 -0
  42. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/login_to_pod.sh +0 -0
  43. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/restart_etl_and_ms.sh +0 -0
  44. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/delete_synth_metadata_sheepdog.py +0 -0
  45. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/generate_synth_metadata.sh +0 -0
  46. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/upload_synth_metadata_sheepdog.py +0 -0
  47. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/upload/metadata/upload_all_studies.sh +0 -0
  48. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/upload/metadata/upload_metadata.py +0 -0
  49. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/__init__.py +0 -0
  50. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/metadata_deleter.py +0 -0
  51. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/metadata_submitter.py +0 -0
  52. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/upload_synthdata_s3.py +0 -0
  53. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/utils/athena_utils.py +0 -0
  54. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/utils/dbt_utils.py +0 -0
  55. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/utils/release_writer.py +0 -0
  56. {gen3_dataops_toolkit-3.6.0 → gen3_dataops_toolkit-3.7.0}/src/g3dt/validate/validate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gen3-dataops-toolkit
3
- Version: 3.6.0
3
+ Version: 3.7.0
4
4
  Summary: Gen3 DataOps toolkit (g3dt): operate SSM-published Gen3 data pipeline environments
5
5
  License: Apache-2.0
6
6
  Author: JoshuaHarris391
@@ -224,6 +224,14 @@ g3dt synth generate synthetic_dataset_1 --llm -n 100 -e test
224
224
  g3dt synth deploy -e test --studies synthetic_dataset_1 -n 100 --prev-version v1.2.0
225
225
  ```
226
226
 
227
+ `deploy --skip-dict` runs the synthetic-data-only flow (delete previous
228
+ batch, generate, upload, ETL) without re-uploading the dictionary or
229
+ restarting the schema microservices — use it when the deployed dictionary is
230
+ already current. Deleting the previous batch is the flow's one destructive
231
+ step, so it asks for confirmation (decline to skip it, or pass
232
+ `--skip-delete` to skip without prompting); on a first deploy, when no
233
+ previous batch exists locally, deletion is skipped automatically.
234
+
227
235
  `deploy` without `--studies` falls back to the original ACDC demo set
228
236
  (`AusDiab_Simulated,Baker-Biobank_Simulated,BioHeart-CT_Simulated,CAUGHT-CAD_Simulated`
229
237
  at 30,60,20,55 records, previous batch `v1.0.0`) — kept for continuity; any
@@ -190,6 +190,14 @@ g3dt synth generate synthetic_dataset_1 --llm -n 100 -e test
190
190
  g3dt synth deploy -e test --studies synthetic_dataset_1 -n 100 --prev-version v1.2.0
191
191
  ```
192
192
 
193
+ `deploy --skip-dict` runs the synthetic-data-only flow (delete previous
194
+ batch, generate, upload, ETL) without re-uploading the dictionary or
195
+ restarting the schema microservices — use it when the deployed dictionary is
196
+ already current. Deleting the previous batch is the flow's one destructive
197
+ step, so it asks for confirmation (decline to skip it, or pass
198
+ `--skip-delete` to skip without prompting); on a first deploy, when no
199
+ previous batch exists locally, deletion is skipped automatically.
200
+
193
201
  `deploy` without `--studies` falls back to the original ACDC demo set
194
202
  (`AusDiab_Simulated,Baker-Biobank_Simulated,BioHeart-CT_Simulated,CAUGHT-CAD_Simulated`
195
203
  at 30,60,20,55 records, previous batch `v1.0.0`) — kept for continuity; any
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gen3-dataops-toolkit"
3
- version = "3.6.0"
3
+ version = "3.7.0"
4
4
  description = "Gen3 DataOps toolkit (g3dt): operate SSM-published Gen3 data pipeline environments"
5
5
  authors = ["JoshuaHarris391 <harjo391@gmail.com>"]
6
6
  readme = "README.md"
@@ -226,6 +226,18 @@ def deploy(
226
226
  help="Dictionary version whose previously-uploaded synthetic batch is "
227
227
  f"deleted before uploading the new one. Default: {DEPLOY_DEFAULT_PREV_VERSION}.",
228
228
  ),
229
+ skip_dict: bool = typer.Option(
230
+ False, "--skip-dict",
231
+ help="Skip the dictionary upload and schema restarts (steps 1-2) — "
232
+ "synthetic data only: delete previous batch, generate, upload, run "
233
+ "ETL. Use when the deployed dictionary is already current.",
234
+ ),
235
+ skip_delete: bool = typer.Option(
236
+ False, "--skip-delete",
237
+ help="Skip step 3 (deleting the previous synthetic batch) without "
238
+ "prompting. Without this flag, deletion asks for confirmation; "
239
+ "declining skips it and the flow continues.",
240
+ ),
229
241
  ) -> None:
230
242
  """Full end-to-end synthetic deploy: the whole cycle in one command.
231
243
 
@@ -240,6 +252,16 @@ def deploy(
240
252
  5. upload the new batch to Gen3
241
253
  6. run the ETL cronjob (env's SSM etl_cronjob)
242
254
 
255
+ With --skip-dict, steps 1-2 are skipped (the schema is still fetched
256
+ locally if missing — generation validates against it) and the flow is
257
+ synthetic-data only. Equivalent by hand: synth delete + synth generate +
258
+ synth upload + k8s restart-etl.
259
+
260
+ Step 3 is destructive, so it asks for confirmation (skip it outright with
261
+ --skip-delete, or decline the prompt — the flow continues either way).
262
+ On a first deploy, when no previous batch exists locally, deletion is
263
+ skipped automatically.
264
+
243
265
  Provider/model, restart targets, and the ETL cronjob come from the env's
244
266
  SSM tree unless overridden; the API key path comes from
245
267
  --llm-api-key-file or the marker. Studies and record counts are batch
@@ -247,12 +269,22 @@ def deploy(
247
269
 
248
270
  Examples:
249
271
  g3dt synth deploy -e test --studies synthetic_dataset_1 -n 100
272
+ g3dt synth deploy -e test --studies synthetic_dataset_1 -n 100 --skip-dict
250
273
  g3dt synth deploy -e test --studies "s1,s2" -n "100,50" --prev-version v1.2.0
251
274
  """
252
275
  e = env_of(env)
253
276
  safety.confirm_prod_strict("synthetic full deploy", env)
254
277
  effective_studies = studies or DEPLOY_DEFAULT_STUDIES
255
278
  _check_per_study_counts(effective_studies, num_records)
279
+ if not skip_delete:
280
+ # Deleting the previous batch is the one destructive step in the
281
+ # flow; declining just skips it — everything else still runs.
282
+ effective_prev = prev_version or DEPLOY_DEFAULT_PREV_VERSION
283
+ skip_delete = not typer.confirm(
284
+ f"Delete the previous synthetic batch ({effective_studies} @ "
285
+ f"{effective_prev}) from the commons before uploading the new one?",
286
+ default=True,
287
+ )
256
288
  env_vars = script_env(e)
257
289
  env_vars.update(_llm_env_overrides(e, llm_provider, llm_model, llm_api_key_file))
258
290
  if restart_services:
@@ -265,6 +297,10 @@ def deploy(
265
297
  env_vars["G3DT_SYNTH_NUM_RECORDS"] = num_records
266
298
  if prev_version:
267
299
  env_vars["G3DT_SYNTH_PREV_VERSION"] = prev_version
300
+ if skip_dict:
301
+ env_vars["G3DT_SYNTH_SKIP_DICT"] = "1"
302
+ if skip_delete:
303
+ env_vars["G3DT_SYNTH_SKIP_DELETE"] = "1"
268
304
  runner.run(
269
305
  runner.bash_script(
270
306
  "services/synthetic_data/full_deploy_dd_and_synth.sh", env
@@ -84,33 +84,53 @@ if ! aws eks update-kubeconfig \
84
84
  exit 1
85
85
  fi
86
86
 
87
- echo "==== [1] Pulling dictionary for version ${VERSION} ===="
88
- bash "${SERVICE_DIR}/dictionary/pull_dict.sh" "${DICT_URL}" "${DICT_FILENAME}"
89
-
90
- echo "==== [2] Uploading dictionary to S3: s3://${SCHEMA_S3_URI} ===="
91
- UPLOAD_DICT_ARGS=("${SCHEMA_DIR}/${DICT_FILENAME}" "s3://${SCHEMA_S3_URI}")
92
- # The optional trailing positional is the AWS profile; omit it for ambient credentials.
93
- if [ -n "${G3DT_AWS_PROFILE:-}" ]; then
94
- UPLOAD_DICT_ARGS+=("${G3DT_AWS_PROFILE}")
87
+ if [ -z "${G3DT_SYNTH_SKIP_DICT:-}" ]; then
88
+ echo "==== [1] Pulling dictionary for version ${VERSION} ===="
89
+ bash "${SERVICE_DIR}/dictionary/pull_dict.sh" "${DICT_URL}" "${DICT_FILENAME}"
90
+
91
+ echo "==== [2] Uploading dictionary to S3: s3://${SCHEMA_S3_URI} ===="
92
+ UPLOAD_DICT_ARGS=("${SCHEMA_DIR}/${DICT_FILENAME}" "s3://${SCHEMA_S3_URI}")
93
+ # The optional trailing positional is the AWS profile; omit it for ambient credentials.
94
+ if [ -n "${G3DT_AWS_PROFILE:-}" ]; then
95
+ UPLOAD_DICT_ARGS+=("${G3DT_AWS_PROFILE}")
96
+ fi
97
+ python3 "${SERVICE_DIR}/dictionary/upload_dictionary.py" "${UPLOAD_DICT_ARGS[@]}"
98
+
99
+ echo "==== [3] Restarting microservices (schema) ===="
100
+ bash "${ARGO_SCRIPT_DIR}/argocd_restart_schema.sh" \
101
+ -d "${DOMAIN}" \
102
+ -a "${APP_NAME}" \
103
+ -n "${NAMESPACE}"
104
+ else
105
+ echo "==== [1-3] Skipped dictionary upload + schema restarts (--skip-dict) ===="
106
+ # Generation still validates against the local schema copy — fetch it if
107
+ # it is missing (a local download only; the commons is not touched).
108
+ if [ ! -f "${SCHEMA_DIR}/${DICT_FILENAME}" ]; then
109
+ echo "Local schema missing; pulling ${VERSION}..."
110
+ bash "${SERVICE_DIR}/dictionary/pull_dict.sh" "${DICT_URL}" "${DICT_FILENAME}"
111
+ fi
95
112
  fi
96
- python3 "${SERVICE_DIR}/dictionary/upload_dictionary.py" "${UPLOAD_DICT_ARGS[@]}"
97
113
 
98
- echo "==== [3] Restarting microservices (schema) ===="
99
- bash "${ARGO_SCRIPT_DIR}/argocd_restart_schema.sh" \
100
- -d "${DOMAIN}" \
101
- -a "${APP_NAME}" \
102
- -n "${NAMESPACE}"
103
-
104
- echo "==== [4] Deleting old synthetic data (${STUDIES}) for version ${PREV_VERSION} ===="
105
- DELETE_SYNTH_ARGS=(
106
- -p "${STUDIES}"
107
- -s "${AWS_SECRET_NAME}"
108
- -i "${DATA_IMPORT_ORDER_FILE}"
109
- )
110
- if [ -n "${G3DT_AWS_PROFILE:-}" ]; then
111
- DELETE_SYNTH_ARGS+=(-profile "${G3DT_AWS_PROFILE}")
114
+ if [ -n "${G3DT_SYNTH_SKIP_DELETE:-}" ]; then
115
+ echo "==== [4] Skipping deletion of the previous synthetic batch (per operator choice) ===="
116
+ elif [ ! -f "${DATA_IMPORT_ORDER_FILE}" ]; then
117
+ # First deploy for these studies (or a different --prev-version): there is
118
+ # no previous local batch to walk, so there is nothing to delete.
119
+ echo "==== [4] No previous batch found — skipping deletion ===="
120
+ echo " (missing ${DATA_IMPORT_ORDER_FILE};"
121
+ echo " first deploy for these studies, or pass --prev-version)"
122
+ else
123
+ echo "==== [4] Deleting old synthetic data (${STUDIES}) for version ${PREV_VERSION} ===="
124
+ DELETE_SYNTH_ARGS=(
125
+ -p "${STUDIES}"
126
+ -s "${AWS_SECRET_NAME}"
127
+ -i "${DATA_IMPORT_ORDER_FILE}"
128
+ )
129
+ if [ -n "${G3DT_AWS_PROFILE:-}" ]; then
130
+ DELETE_SYNTH_ARGS+=(-profile "${G3DT_AWS_PROFILE}")
131
+ fi
132
+ python3 "${SERVICE_DIR}/synthetic_data/delete_synth_metadata_sheepdog.py" "${DELETE_SYNTH_ARGS[@]}"
112
133
  fi
113
- python3 "${SERVICE_DIR}/synthetic_data/delete_synth_metadata_sheepdog.py" "${DELETE_SYNTH_ARGS[@]}"
114
134
 
115
135
  echo "==== [5] Generating new synthetic data (${STUDIES}) for version ${VERSION} (LLM-realistic) ===="
116
136
  bash "${SERVICE_DIR}/synthetic_data/generate_synth_metadata.sh" \