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

Add meta.description to BaseRelationshipResource #131

Merged
merged 1 commit into from
Jan 13, 2020

Conversation

CasperWA
Copy link
Member

Sub-classed BaseResource to introduce special OPTiMaDe requirement of
having an OPTIONAL meta field in the relationship resource, which
MUST have the field description, it it's present.

Also, introduced some pylint disables for the models to avoid pylint
complaining about long lines and wrong use of self for validators
(which are class methods, hence they should NOT have the self
argument).

Sub-classed BaseResource to introduce special OPTiMaDe requirement of
having an OPTIONAL `meta` field in the relationship resource, which
MUST have the field `description`, it it's present.

Also, introduced some pylint disables for the models to avoid pylint
complaining about long lines and wrong use of `self` for validators
(which are class methods, hence they should NOT have the `self`
argument).
@CasperWA CasperWA added the schema Concerns the schema models label Jan 13, 2020
@CasperWA CasperWA requested a review from ml-evs January 13, 2020 11:05
@codecov
Copy link

codecov bot commented Jan 13, 2020

Codecov Report

Merging #131 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
+ Coverage   83.05%   83.11%   +0.06%     
==========================================
  Files          39       39              
  Lines        1841     1848       +7     
==========================================
+ Hits         1529     1536       +7     
  Misses        312      312
Flag Coverage Δ
#unittests 83.11% <100%> (+0.06%) ⬆️
Impacted Files Coverage Δ
optimade/models/links.py 92.59% <ø> (ø) ⬆️
optimade/models/baseinfo.py 90.32% <ø> (ø) ⬆️
optimade/models/references.py 97.61% <ø> (ø) ⬆️
optimade/models/optimade_json.py 78.94% <100%> (+3.94%) ⬆️
optimade/models/jsonapi.py 91.3% <100%> (ø) ⬆️
optimade/models/entries.py 100% <100%> (ø) ⬆️
optimade/models/toplevel.py 100% <100%> (ø) ⬆️

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 c5b579f...b1e7280. Read the comment docs.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Can't see any problems with this, good job @CasperWA!

@CasperWA CasperWA merged commit 238cf5d into master Jan 13, 2020
@CasperWA CasperWA deleted the add_meta_to_base_relationship_resource branch January 13, 2020 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Concerns the schema models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants