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

Cleaned up mappings module #132

Merged
merged 7 commits into from
Oct 17, 2023
Merged

Cleaned up mappings module #132

merged 7 commits into from
Oct 17, 2023

Conversation

jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Sep 9, 2023

Description:

Minor bugfixes

  • fix f-strings in Value.__repr__()
  • do not bypass mapping-function if number of inputs is one

Type of change:

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

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?

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2023

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.60%. Comparing base (dba3971) to head (94700ac).
Report is 256 commits behind head on master.

Files with missing lines Patch % Lines
tripper/mappings/mappings.py 50.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
- Coverage   75.67%   75.60%   -0.08%     
==========================================
  Files          17       17              
  Lines        1402     1402              
==========================================
- Hits         1061     1060       -1     
- Misses        341      342       +1     

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

Copy link
Contributor

@francescalb francescalb left a comment

Choose a reason for hiding this comment

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

Functionality is being changed without changes in tests. I guess this means that the test was missing previously. Can you please add one?

@jesper-friis
Copy link
Contributor Author

jesper-friis commented Oct 15, 2023

Functionality is being changed without changes in tests. I guess this means that the test was missing previously. Can you please add one?

This PR does not change any functionality, it only fixes some bugs that were already fixed in dlite.mappings but not ported to tripper.

@sygout
Copy link
Contributor

sygout commented Oct 16, 2023

Mappings are different from dict ? so what is the reason for the change?

@jesper-friis
Copy link
Contributor Author

Mappings are different from dict ? so what is the reason for the change?

I guess you are referring to line 223. It is just a generalisation, to allow the input argument to be any type of mapping, not only dict.

Copy link
Contributor

@ajeklund ajeklund left a comment

Choose a reason for hiding this comment

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

I've added a suggestion and a question, otherwise I think that this PR is fine. I agree that no features have been added.

tripper/mappings/mappings.py Show resolved Hide resolved
tripper/mappings/mappings.py Outdated Show resolved Hide resolved
Co-authored-by: Anders Eklund <96499163+ajeklund@users.noreply.github.com>
Copy link
Contributor

@ajeklund ajeklund left a comment

Choose a reason for hiding this comment

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

Approved. Thank you!

@jesper-friis jesper-friis merged commit 3212e48 into master Oct 17, 2023
9 checks passed
@jesper-friis jesper-friis deleted the mappings-cleanup branch October 17, 2023 09:36
jesper-friis added a commit to SINTEF/dlite that referenced this pull request Oct 23, 2023
# Description
Removed everything that has been moved to tripper from mappings.py and
import it from tripper instead.

This PR should not be merged into master before PR
EMMC-ASBL/tripper#132 has been merged and
preferable a new release of tripper has been created.

This cleanup was already done a while ago. Not sure why the old version
of mappings.py has reappeared...

## Type of change
- [x] Bug fix & code cleanup
- [ ] New feature
- [ ] Documentation update
- [ ] Test 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?
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.

5 participants