Skip to content

API server code health pass - rename *Pair classes to *Set #1060

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

Merged
merged 5 commits into from
Jan 16, 2023

Conversation

rzats
Copy link
Contributor

@rzats rzats commented Dec 22, 2022

Partially addresses #998.

Prerequisites:

  • Unless it is a documentation hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

Summary

Fixes a set of issues in the server code as described here.

  • Renames *Pair classes (TimePair, GeoPair, SourceSignalPair) into *Set.
  • Also renames methods where these are parsed and extracted.
  • Also renames methods where these are applied to a SQL query as a WHERE conditional. In this case they are referred to as filters.

@rzats rzats force-pushed the rzatserkovnyi/code-health-pair-set branch from 05c4c4d to 72f9cb8 Compare December 22, 2022 12:33
for pair in source_signals:
source = data_source_by_id.get(pair.source)
transformed_sets: List[SourceSignalSet] = []
for set in source_signals:
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar to comment above; perhaps use ssset here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That name feelsss very Pythonic... 🐍

@rzats rzats requested a review from melange396 December 22, 2022 22:31
@rzats rzats force-pushed the rzatserkovnyi/code-health-pair-set branch from d11e4ce to 888897d Compare December 22, 2022 23:51
@rzats rzats requested a review from melange396 December 22, 2022 23:59
Copy link
Collaborator

@melange396 melange396 left a comment

Choose a reason for hiding this comment

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

lgtm!

@rzats rzats merged commit 7774f96 into dev Jan 16, 2023
@rzats rzats deleted the rzatserkovnyi/code-health-pair-set branch January 16, 2023 14:48
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.

2 participants