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/finish-db-models #7

Merged
merged 15 commits into from
Nov 7, 2020
Merged

feature/finish-db-models #7

merged 15 commits into from
Nov 7, 2020

Conversation

evamaxfield
Copy link
Member

@evamaxfield evamaxfield commented Oct 30, 2020

Pull request recommendations:

  • Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
  • Link to any relevant issue in the PR description. Ex: Resolves [Add builds for all platforms #12], adds tiff file format support

Resolves #2
Resolves #12

  • Provide context of changes.

Fully wraps up the Firestore database models (for now ^ tm). I expect as we develop out the cookiecutter, pipelines, and such we will find places we need to up change these models but for now I think they are decent.

Link to the original schema: here

Unfortunately our DB diagram doesn't look as great as it once did. A flaw of generate UML diagrams I suppose:

cdp_database_diagram

This also adds the _INDEXES for all models that use them and the PR for implementation changes on the cdp-deploy site can be seen here

There are actually quite a few changes in this one. Please compare the schema doc and the code heavily. I expanded some things and reduced others where possible.

  • Provide relevant tests for your feature or bug fix.

Added yet more tests for the model validation. Specifically about index and primary key checking.

  • Provide or update documentation for any feature added by your pull request.

Thanks for contributing!

@evamaxfield evamaxfield added the enhancement New feature or request label Oct 30, 2020
@evamaxfield evamaxfield self-assigned this Oct 30, 2020
cdp_backend/database/models.py Outdated Show resolved Hide resolved
cdp_backend/database/models.py Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Nov 6, 2020

Codecov Report

Merging #7 into main will increase coverage by 4.84%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   93.91%   98.75%   +4.84%     
==========================================
  Files          14       14              
  Lines         230      403     +173     
==========================================
+ Hits          216      398     +182     
+ Misses         14        5       -9     
Impacted Files Coverage Δ
cdp_backend/database/models.py 100.00% <100.00%> (ø)
cdp_backend/tests/database/test_models.py 96.42% <100.00%> (+0.77%) ⬆️
cdp_backend/database/types.py 100.00% <0.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 93d941f...54d5473. Read the comment docs.

@evamaxfield
Copy link
Member Author

@tohuynh This PR now also resolves #12.

I removed the pygraphviz dep in favor of pydot which doesn't have any problems building on Windows.

@tohuynh
Copy link
Collaborator

tohuynh commented Nov 7, 2020

@tohuynh This PR now also resolves #12.

I removed the pygraphviz dep in favor of pydot which doesn't have any problems building on Windows.

Nice! Thanks for resolving that for me. It all works locally for me too.

@evamaxfield evamaxfield merged commit 1c9bb27 into main Nov 7, 2020
@evamaxfield evamaxfield deleted the feature/finish-db-models branch November 7, 2020 22:52
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
Development

Successfully merging this pull request may close these issues.

Add builds for all platforms Database ORM / Collection Models
4 participants