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

Have all strategy response types be AttrDict (not bytes) #134

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

CasperWA
Copy link
Contributor

Description:

Closes #86

By "all", is meant that all strategy methods that previously returned bytes, now return an oteapi.models.AttrDict.
It is equivalent to a MutableMapping, but is also a pydantic BaseModel.

The demo notebook, as well as all the unit tests, have also been updated accordingly.

Type of change:

  • Bug fix.
  • New feature.
  • Documentation update.

Checklist for the reviewer:

This checklist should be used as a help for the reviewer.

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?

Instead of bytes.
By "all", is meant that all strategy methods that previously returned
bytes, now return an oteapi.models.AttrDict.
It is equivalent to a MutableMapping, but is also a pydantic BaseModel.
@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9c048cc) 90.67% compared to head (e591783) 90.74%.
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
+ Coverage   90.67%   90.74%   +0.06%     
==========================================
  Files          26       26              
  Lines         429      432       +3     
==========================================
+ Hits          389      392       +3     
  Misses         40       40              
Flag Coverage Δ
linux 90.74% <100.00%> (+0.06%) ⬆️
windows 90.04% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
otelib/backends/python/base.py 76.36% <100.00%> (ø)
otelib/backends/python/dataresource.py 81.81% <100.00%> (+0.56%) ⬆️
otelib/backends/services/base.py 97.95% <100.00%> (ø)
otelib/backends/strategies.py 95.74% <100.00%> (ø)
otelib/backends/utils.py 100.00% <100.00%> (ø)
otelib/pipe.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniel-sintef
Copy link
Contributor

Makes me very queezy. I really dislike backwards-incompatible changes [if I am not mistaken] the benefit to me is not very clear.

Copy link
Contributor

@daniel-sintef daniel-sintef left a comment

Choose a reason for hiding this comment

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

Unclear, need to think more. In general I am extremely biased against backwards-incompatible changes

@CasperWA
Copy link
Contributor Author

Makes me very queezy. I really dislike backwards-incompatible changes [if I am not mistaken] the benefit to me is not very clear.

That's completely fair.
This is indeed backwards-incompatible in terms of what users can expect.

For the reasoning and any discussion about this I'd refer you to the issue this PR is trying to close: #86. Feel free to jump-start the discussion there with some thoughts.

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.

Return an AttrDict from get() instead of a bytes-encoded json string
3 participants