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

DPL-1111-2: Refactor message management #68

Merged
merged 15 commits into from
Mar 1, 2024

Conversation

sdjmchattie
Copy link
Contributor

@sdjmchattie sdjmchattie commented Feb 28, 2024

Closes #66

Changes proposed in this pull request

  • Refactor messages to attempt to remove boilerplate and define better separation of message types.
  • Move unit tests into test classes.
  • Use built-in cache implementation for TaxonId MessageProperty.
  • Use module __init__.py files to export classes from module. This improves the number of imports needed.
  • Remove tests that only test Python is working properly.
  • Sort keys where they are hard to parse.
  • Remove unused validation methods in MessageProperty class.

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code

@sdjmchattie sdjmchattie self-assigned this Feb 28, 2024
@sdjmchattie sdjmchattie marked this pull request as draft February 28, 2024 17:18
@sdjmchattie sdjmchattie force-pushed the dpl-1111-2-refactor-message-management branch from 252bdd0 to 784304b Compare February 28, 2024 18:02
Only those properties that have unique behaviours have their own class.
Those that just store a string now use the StringValue class.
The message property that holds any kind of value is now just called Value.
DictValue holds the dictionary equivalent of a MessageProperty.
@sdjmchattie sdjmchattie marked this pull request as ready for review February 29, 2024 18:31
Copy link
Contributor

@StephenHulme StephenHulme left a comment

Choose a reason for hiding this comment

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

That's quite the refactor! I'm afraid I'm not able to do a proper line-by-line comparison due to all the file moves and large chunks changed - but I guess that's the nature of the game.
A couple tiny comments, but probably would benefit from an even closer eye over the code?

setup.cfg Outdated Show resolved Hide resolved
@sdjmchattie sdjmchattie merged commit 4a91943 into develop Mar 1, 2024
4 checks passed
@sdjmchattie sdjmchattie deleted the dpl-1111-2-refactor-message-management branch March 1, 2024 15:12
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.

DPL-1111 Forward genome size from incoming messages to the Traction Service API
3 participants