Skip to content

Conversation

@JaviCerveraIngram
Copy link
Collaborator

  • Get product templates and configuration params.
  • Added missing fields and methods to models.

@JaviCerveraIngram JaviCerveraIngram changed the title Cps 44 Cps 44 Product Configuration params, templates and other updates Sep 26, 2019
@codecov-io
Copy link

codecov-io commented Sep 26, 2019

Codecov Report

Merging #68 into master will decrease coverage by 0.04%.
The diff coverage is 90.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
- Coverage   92.81%   92.76%   -0.05%     
==========================================
  Files          65       67       +2     
  Lines        1739     1866     +127     
==========================================
+ Hits         1614     1731     +117     
- Misses        125      135      +10
Impacted Files Coverage Δ
connect/config.py 91.89% <ø> (ø) ⬆️
connect/models/usage_file.py 100% <ø> (ø) ⬆️
connect/models/usage_listing.py 100% <ø> (ø) ⬆️
connect/models/template.py 100% <100%> (ø) ⬆️
connect/models/agreement.py 100% <100%> (ø) ⬆️
connect/resources/directory.py 100% <100%> (ø) ⬆️
connect/models/product_configuration_parameter.py 100% <100%> (ø)
connect/resources/template.py 60% <100%> (+2.85%) ⬆️
connect/models/contact_info.py 100% <100%> (ø) ⬆️
connect/resources/usage_automation.py 93.85% <100%> (+0.1%) ⬆️
... and 21 more

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 7fab284...f07095d. Read the comment docs.

Copy link
Contributor

@ht-albert ht-albert left a comment

Choose a reason for hiding this comment

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

I think need reorganizate import

@post_load
def make_object(self, data):
from connect.models import Country
return Country(**data)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think model import is fast
why do we need import here?

Copy link
Collaborator Author

@JaviCerveraIngram JaviCerveraIngram Sep 30, 2019

Choose a reason for hiding this comment

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

Every model needs to know its schema for its deserialize method to work. Every schema needs to know its model for its make_object method to work. Thus, one of the files need to import the other locally to avoid a cyclic import.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understood you, all schemas in one file, therefore, such imports, it is okay for me

@vgrebenschikov vgrebenschikov merged commit e071bda into cloudblue:master Sep 30, 2019
@JaviCerveraIngram JaviCerveraIngram deleted the CPS-44-product branch October 2, 2019 15:45
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.

4 participants