Skip to content

Creating and updating lambda READMEs#540

Open
robertandremitchell wants to merge 3 commits into
mainfrom
rob/readme-initialization
Open

Creating and updating lambda READMEs#540
robertandremitchell wants to merge 3 commits into
mainfrom
rob/readme-initialization

Conversation

@robertandremitchell
Copy link
Copy Markdown
Collaborator

Description

Just updating / initializing README for the lambdas.

Not sure if other modules like text-to-code, augmentation, and validation, etc. Happy to make a ticket for that work. I actually don't know if we've chatted about if/how we want readable docs for the lambdas given that we aren't currently pursuing API stuff. Figured the lambdas at least will still be helpful to have more granular.

Anyway, maybe food for thought for an eng sync and/or parking lot.

Related Issues

Closes #[Link any related issues or tasks from your project management system.]

Additional Notes

[Add any additional context or notes that reviewers should know about.]

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.78%. Comparing base (c02179e) to head (5760988).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #540   +/-   ##
=======================================
  Coverage   95.78%   95.78%           
=======================================
  Files          46       46           
  Lines        2372     2372           
=======================================
  Hits         2272     2272           
  Misses        100      100           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@nickclyde nickclyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for adding these Rob!!

Comment on lines +48 to +54
```text
S3_BUCKET
TTC_INPUT_PREFIX
TTC_OUTPUT_PREFIX
AUGMENTED_EICR_PREFIX
AUGMENTATION_METADATA_PREFIX
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this env var list is missing AWS_REGION

- Loading the original eICR XML from S3.
- Parsing nonstandard code translations from TTC output.
- Running eICR augmentation through the core augmentation package.
- Managing a S3-derived persistence ID for the augmented document and set IDs.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found "and set IDs" a little ambiguous on first read. I believe this is referring to the eICR setId/versionNumber header elements that EICRAugmenter rewrites deterministically from the persistence_id seed, but it could also be read as "the augmented document and the set IDs (plural)." Could we phrase it as something like "Seeding deterministic eICR document IDs (id, setId, versionNumber) from the persistence ID" so it's clearer what's being managed?


## Overview

🚧 Under Construction 🚧
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this README has substantive content, should we remove the "Under Construction" banner? Same question for the lambda-handler README

Comment on lines +65 to +68
For example:

```text
TTCInput/2026/01/01/0026b704-f510-4494-8d21-11d27217d96e
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: TTCInput/ is the old prefix we had, the new defaults are TextToCodeSubmissionV2/, ValidationResponseV2/, TTCAugmentationMetadataV2/, etc.

Comment on lines +56 to +61
- `create_s3_client`
- `get_file_content_from_s3`
- `put_file`
- `check_s3_object_exists`
- `get_eventbridge_data_from_s3_event`
- `get_persistence_id`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: get_eventbridge_data_from_s3_event and get_persistence_id aren't really S3 helpers, they're EventBridge/key-parsing helpers that happen to be used alongside S3. Would it be worth renaming this section to something broader like "S3 and Event Helpers"?


## Logging

Every TTC invocation logs the record count at the start of processing.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for a little more specificity: "Every TTC invocation logs the record count at the start. For each record, the Lambda logs the event bucket, triggering object key, and derived persistence ID as structured fields..."

Run the package tests with:

```bash
uv run pytest packages/index-lambda/tests
Copy link
Copy Markdown
Collaborator

@JNygaard-Skylight JNygaard-Skylight May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do this with the just command with just all unit packages/index-lambda/tests

Suggested change
uv run pytest packages/index-lambda/tests
just all unit packages/index-lambda/tests

Run the package tests with:

```bash
uv run pytest packages/lambda-handler/tests
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uv run pytest packages/lambda-handler/tests
just test all packages/lambda-handler/tests

Run the package tests with:

```bash
uv run pytest packages/text-to-code-lambda/tests
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uv run pytest packages/text-to-code-lambda/tests
just test all packages/text-to-code-lambda/tests

@@ -1,19 +1,116 @@
# DIBBs Index Initialization

**General disclaimer** This repository was created for use by CDC programs to collaborate on public health related projects in support of the [CDC mission](https://www.cdc.gov/about/cdc/#cdc_about_cio_mission-our-mission). GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the Markdown link?

# DIBBs Augmentation
# DIBBs Augmentation Lambda

**General disclaimer** This repository was created for use by CDC programs to collaborate on public health related projects in support of the [CDC mission](https://www.cdc.gov/about/cdc/#cdc_about_cio_mission-our-mission). GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this disclaimer need to be in each package's readme?

Run the package tests with:

```bash
uv run pytest packages/augmentation-lambda/tests
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uv run pytest packages/augmentation-lambda/tests
just test all packages/augmentation-lambda/tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants