Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor history contents API ID encoding #14392

Merged

Conversation

davelopez
Copy link
Contributor

@davelopez davelopez commented Aug 2, 2022

Addresses #14388 (comment)

Replace EncodedDatabaseIdField with DecodedDatabaseIdField to remove manual ID decodings from the service layer.

DecodedDatabaseIdField will now encode the ID when being serialized to JSON in response models. Those pydantic models must descend from the custom base Model.

How to test the changes?

  • This is a refactoring of components with existing test coverage.

License

@davelopez davelopez added kind/refactoring cleanup or refactoring of existing code, no functional changes area/API area/histories labels Aug 2, 2022
@github-actions github-actions bot added this to the 22.09 milestone Aug 2, 2022
@davelopez davelopez force-pushed the refactor_history_contents_id_decoding branch from 8964aca to b9f9d4f Compare August 2, 2022 11:15
@davelopez davelopez marked this pull request as draft August 3, 2022 07:05
@davelopez davelopez force-pushed the refactor_history_contents_id_decoding branch 2 times, most recently from 42992d7 to fdd2734 Compare August 8, 2022 15:01
@davelopez davelopez marked this pull request as ready for review August 9, 2022 10:19
Replace `EncodedDatabaseIdField` with `DecodedDatabaseIdField` to remove manual ID decodings from the service layer.
@davelopez davelopez force-pushed the refactor_history_contents_id_decoding branch from fdd2734 to 48ea02f Compare August 9, 2022 10:22
@mvdbeek mvdbeek merged commit f06f0ad into galaxyproject:dev Aug 11, 2022
@mvdbeek
Copy link
Member

mvdbeek commented Aug 11, 2022

Very nice, thank you!

@davelopez davelopez deleted the refactor_history_contents_id_decoding branch August 11, 2022 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API area/histories kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants