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

feature/add-indexes-for-role-models #118

Merged
merged 2 commits into from
Oct 5, 2021
Merged

feature/add-indexes-for-role-models #118

merged 2 commits into from
Oct 5, 2021

Conversation

evamaxfield
Copy link
Member

Description of Changes

Include a description of the proposed changes.

Was working with Brian to make sure certain parts of the database are queryable for frontend stuff. These aren't needed but are nice to have.

@evamaxfield evamaxfield added the enhancement New feature or request label Oct 5, 2021
@evamaxfield evamaxfield self-assigned this Oct 5, 2021
@evamaxfield evamaxfield added this to In progress in v3.0 via automation Oct 5, 2021
@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #118 (a2cefd7) into main (009bdc5) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   95.67%   95.67%           
=======================================
  Files          50       50           
  Lines        2379     2379           
=======================================
  Hits         2276     2276           
  Misses        103      103           
Impacted Files Coverage Δ
cdp_backend/database/models.py 100.00% <100.00%> (ø)
cdp_backend/database/types.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 009bdc5...a2cefd7. Read the comment docs.

Copy link
Collaborator

@isaacna isaacna left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Also, I was thinking if it'd be worth creating some helper method that given some IndexField's, spits out a set of IndexedFieldSet with all or multiple permutations of order to reduce code repetition?

@isaacna
Copy link
Collaborator

isaacna commented Oct 5, 2021

Also, I was thinking if it'd be worth creating some helper method that given some IndexField's, spits out a set of IndexedFieldSet with all or multiple permutations of order to reduce code repetition?

Actually nvm I don't like this idea. I think having the index sets explicitly defined is probably better for a model class, and I'm assuming the exact combinations of order might be specific to the front end so creating them programmatically probably isn't worth the hassle

@evamaxfield
Copy link
Member Author

Actually nvm I don't like this idea. I think having the index sets explicitly defined is probably better for a model class, and I'm assuming the exact combinations of order might be specific to the front end so creating them programmatically probably isn't worth the hassle

Yea. So uhhh, @BrianL3 and I just found more issues in the frontend libraries data models (models were missing entirely) and so I think the general solution still lies in #167

Like just have a giant JSON file that has all of these definitions and then in Python dynamically create them and same in TypeScript.

@evamaxfield evamaxfield merged commit a00e1a3 into main Oct 5, 2021
v3.0 automation moved this from In progress to Done Oct 5, 2021
@evamaxfield evamaxfield deleted the admin/more-indexes branch October 5, 2021 23:37
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
No open projects
v3.0
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants