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

Restructure and Simplify Department Status Management and Delivery #8

Closed
seekinginfiniteloop opened this issue Dec 27, 2023 · 0 comments · Fixed by #10
Closed

Restructure and Simplify Department Status Management and Delivery #8

seekinginfiniteloop opened this issue Dec 27, 2023 · 0 comments · Fixed by #10
Assignees
Labels
enhancement New feature or request

Comments

@seekinginfiniteloop
Copy link
Owner

The current implementation that provides department statuses for time intervals is overly complicated and error-prone. I became enamored with the idea of an interval tree serving up this data. While optimal on paper, the subsequent translation to something usable counteracts this advantage while adding substantial complexity. We're also not dealing with noticeable performance differences given the size of the dataset.

I propose/plan a major restructuring on the backend, the principal aspects of which are:

  • directly load constants.py data into pandas objects
    -ditch _tree and the interval tree delivery
  • Add time-state and pandas index attributes to FedDepartment objects; add attributes that allow them to represent themselves as various pandas objects to facilitate easy construction
  • Build a functional factory for FedDepartment objects.
  • Tap this pool directly from FedIndex and FedStamp such they have these objects as attributes.
  • build fedindex DFs directly from FedDept multi-index tuples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant