Skip to content

jir-data-visibility-review-feature#298

Merged
jirhiker merged 2 commits into
data-visibility-review-featurefrom
jir-data-visibility-review-feature
Dec 13, 2025
Merged

jir-data-visibility-review-feature#298
jirhiker merged 2 commits into
data-visibility-review-featurefrom
jir-data-visibility-review-feature

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Why

This PR addresses the following problem / context:

  • Use bullet points here

How

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

  • Use bullet points here

Notes

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

  • Use bullet points here

@jirhiker jirhiker changed the base branch from staging to data-visibility-review-feature December 12, 2025 21:25
@codecov-commenter

codecov-commenter commented Dec 12, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.
see 5 files with indirect coverage changes

@chasetmartin chasetmartin left a comment

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.

I like that this keeps some of the scenarios for potential future work as comments, but simplifies the feature for work now.

One question: is it challenging to test "according to the documented mapping" - or is that just a matter of having the mapping referenced somewhere in the code implementation?

Comment thread tests/features/data-visibility-and-review.feature
@marissafichera

Copy link
Copy Markdown
Contributor

I like that this keeps some of the scenarios for potential future work as comments, but simplifies the feature for work now.

One question: is it challenging to test "according to the documented mapping" - or is that just a matter of having the mapping referenced somewhere in the code implementation?

That's what I was thinking - I'm not sure what exactly the mapping will actually be at this moment but I figured Kelsey/Jacob would be able to implement that when they do the mapping

And all database models have a visibility field that supports "internal" and "public"
And all database models have a review_status field that supports "provisional" and "approved"
And visibility and review_status are required fields when creating new records
# hard to test?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think it'll be too hard to test. We can just make sure in BaseCreateSchema that those fields are always required for new records, so if they are not submitted Pydantic will raise errors.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So for this step you would assert that BaseCreateSchema has these fields and they are required?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

what test could be used to assert "And legacy combined visibility/review fields are deprecated"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the step visibility and review_status are required fields when creating new records I would assert that BaseCreateSchema has these fields and that every Create... schema inherits from BaseCreateSchema. Or, I suppose, we could test that every Create... schema has these fields, though it'd be nice to test the former to ensure that all Create... schemas have parity

When the migration job runs to populate visibility and review_status for <legacy_table> records
Then the system should set visibility according to the documented mapping
And the system should set review_status according to the documented mapping
# hard to test?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can put these mappings into a test and then ensure that the function works correctly in some unit tests

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

hard to test? refers to "the system should stop using the legacy combined field as the source of truth
And subsequent updates to migrated records should modify visibility and review_status fields only". How would you test for that

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Off the top of my head we can go through every model in the database and ensure that none of the legacy fields exist and all that is there are visibility and review_status

@jirhiker jirhiker merged commit 6494f4d into data-visibility-review-feature Dec 13, 2025
4 checks passed
@jirhiker jirhiker deleted the jir-data-visibility-review-feature branch March 12, 2026 21:42
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.

5 participants