Skip to content

BDMS 389: add notes to contact#287

Closed
jacob-a-brown wants to merge 1 commit into
stagingfrom
contact-note-implementation
Closed

BDMS 389: add notes to contact#287
jacob-a-brown wants to merge 1 commit into
stagingfrom
contact-note-implementation

Conversation

@jacob-a-brown

Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • well-inventory-csv.feature requires notes to be added to the Contact model

How

Implementation summary - the following was changed / added / removed:

  • Added the NotesMixin to the Contact model
  • Updated add_contact to includes notes.
    • The notes need to be refreshed after they have been added so that the notes associated with the returned contact object have the correct note_type. If not refreshed their note_types will be members of the enum, not strings.
  • Updated tests
  • Added Communication as a note_type since that is specified in the feature file

Notes

Any special considerations, workarounds, or follow-up work to note?

  • Updated note_type in CreateNote and NoteRersponse schemas to be typed to the NoteType enum, which is made from the lexicon
  • This PR is being opened into staging instead of well-inventory-csv to keep this refactor separate from its implementation. If/once it is approved I'll then merge that into well-inventory-csv and make the requisite updates

the feature well-inventory-csv.feature requires notes to be added to
the contact model. this update enables that to be done for all
contacts. this work is being done in a separate branch so it can be implemented
and inspected on its own
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codecov-commenter

codecov-commenter commented Dec 11, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
core/enums.py 100.00% <100.00%> (ø)
db/contact.py 100.00% <100.00%> (ø)
schemas/contact.py 100.00% <100.00%> (ø)
schemas/notes.py 100.00% <100.00%> (ø)
services/contact_helper.py 100.00% <100.00%> (ø)
tests/conftest.py 86.39% <100.00%> (+0.09%) ⬆️
tests/test_contact.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@jacob-a-brown

Copy link
Copy Markdown
Contributor Author

I realized that this PR should go into well-inventory-csv with the implementation of the features. I'm going to close it, update the /well-inventory-csv endpoint to correspond with this note implementation, and then open up a PR to the well-inventory-csv branch.

@jirhiker

Copy link
Copy Markdown
Member

@jacob-a-brown Fyi you can edit the base branch of a pr instead of closing and reopening

@jacob-a-brown

Copy link
Copy Markdown
Contributor Author

I'll do that next time instead of closing and opening

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.

3 participants