Skip to content

Conversation

@JordanGuinn
Copy link
Contributor

@JordanGuinn JordanGuinn commented Feb 4, 2026

Description

This PR introduces some initial scaffolding to establish the new Python-based report execution "service" within NEDSS-Modernization, built with uv and FastAPI. It also includes:

  • Introduces pytest for, well, testing, and introduces some rudimentary tests
  • Introduces ruff for linting and formatting
    • I ended up picking this simply because it's also provided by the creators of uv, but open to suggestions!
  • Adds a GitHub Action for linting, formatting and running tests

Tickets

Checklist before requesting a review

  • PR focuses on a single story
  • Code has been fully tested to meet acceptance criteria
  • PR is reasonably small and reviewable (Generally less than 10 files and 500 changed lines)
  • All new functions/classes/components reasonably small
  • Functions/classes/components focused on one responsibility
  • Code easy to understand and modify (clarity over concise/clever)
  • PRs containing TypeScript follow the Do's and Don'ts
  • PR does not contain hardcoded values (Uses constants)
  • All code is covered by unit or feature tests

@JordanGuinn JordanGuinn marked this pull request as ready for review February 4, 2026 19:10
@JordanGuinn JordanGuinn requested a review from a team as a code owner February 4, 2026 19:10
@JordanGuinn JordanGuinn requested review from emyl3 and mcmcgrath13 and removed request for a team February 4, 2026 19:10

assert response.status_code == 422 # Unprocessable Entity

def test_execute_report_invalid_field_types(self, client):
Copy link
Contributor

Choose a reason for hiding this comment

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

🧑‍🔬

Comment on lines 12 to 15
1. Install Python 3.14 with `uv`:
```bash
uv python install 3.14
```
Copy link
Contributor

Choose a reason for hiding this comment

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

(q, b): if you already manage python another way, do you need to do this part?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You shouldn't! Will update to indicate it as optional.

.gitignore Outdated
cdc-sandbox/NEDSSDev
cdc-sandbox/.env

# report-execution app
Copy link
Contributor

Choose a reason for hiding this comment

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

(sugg, nb): do we want a nested .gitignore in the service vs adding to the outer? this seems to be a common pattern

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely! This was initially my preference, but I didn't want to apply that if others felt differently - will update!

uses: actions/setup-python@v5

- name: Install uv
uses: astral-sh/setup-uv@v5
Copy link
Contributor

Choose a reason for hiding this comment

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

(❓, blocking) I remember when working on this we wanted to mindful of which 3rd party actions we are using. (Please correct me if I misunderstood @mcmcgrath13) Is this accepted by the CDC? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

@emmastephenson do you know if that's a concern for cdcgov like it is for cdcent?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I remember a conversation with Boris about this at some point, but I sure can't find it now 😵‍💫 I think it should be fine to add this one, though! Looks like it's already in use across CDCGov so I don't expect adding it here will be a problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you Emma and Mary!!!

COPY src ./src

# Expose the port FastAPI will run on
EXPOSE 8000
Copy link
Contributor

Choose a reason for hiding this comment

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

(❓, blocking) We use already use this port -- should this be something else to not clash? 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, good catch! I noticed that as well in the separate branch for the docker-compose work - will update here!

Comment on lines 8 to 9
"fastapi[standard]>=0.128.0",
"pydantic>=2.12.5",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"fastapi[standard]>=0.128.0",
"pydantic>=2.12.5",
"fastapi[standard]~=0.128.0",
"pydantic~=2.12.5",

(sugg, b): to make sure we're on the expected major version

Copy link
Contributor

Choose a reason for hiding this comment

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

though that would only help with the patch at the level of specificity 🤔 , which for fastapi is probably good, but maybe pydantic~=2.12 🥴 TIL python's version specifiers lack some expressivity...

Comment on lines 14 to 15
"pytest>=9.0.2",
"ruff>=0.15.0",
Copy link
Contributor

@mcmcgrath13 mcmcgrath13 Feb 9, 2026

Choose a reason for hiding this comment

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

Suggested change
"pytest>=9.0.2",
"ruff>=0.15.0",
"pytest~=9.0",
"ruff~=0.15.0",

JordanGuinn and others added 4 commits February 9, 2026 13:19
Co-authored-by: Mary McGrath <m.c.mcgrath13@gmail.com>
Co-authored-by: Mary McGrath <m.c.mcgrath13@gmail.com>
Co-authored-by: Mary McGrath <m.c.mcgrath13@gmail.com>
Co-authored-by: Mary McGrath <m.c.mcgrath13@gmail.com>
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