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

[MRG] Add warning when setting element values with unknown keyword #1199

Merged
merged 13 commits into from Oct 1, 2020

Conversation

scaramallion
Copy link
Member

@scaramallion scaramallion commented Sep 28, 2020

Describe the changes

Closes #1014

Tasks

  • Unit tests added that reproduce the issue or prove feature is working
  • Fix or feature added
  • Documentation updated (if relevant)
  • Unit tests passing and overall coverage the same or better

@pep8speaks
Copy link

pep8speaks commented Sep 28, 2020

Hello @scaramallion! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-10-01 21:51:54 UTC

@codecov
Copy link

codecov bot commented Sep 28, 2020

Codecov Report

Merging #1199 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1199      +/-   ##
==========================================
+ Coverage   94.05%   94.07%   +0.01%     
==========================================
  Files          54       54              
  Lines        7979     7987       +8     
==========================================
+ Hits         7505     7514       +9     
+ Misses        474      473       -1     
Impacted Files Coverage Δ
pydicom/config.py 100.00% <100.00%> (ø)
pydicom/dataset.py 98.34% <100.00%> (+0.16%) ⬆️
pydicom/util/codify.py 92.75% <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 4bdaefa...3743df1. Read the comment docs.

@scaramallion scaramallion changed the title [WIP] Add warning when setting element values with unknown keyword [MRG] Add warning when setting element values with unknown keyword Sep 28, 2020
@@ -292,6 +292,27 @@ def needs_to_convert_to_RGB(ds):
values within the dataset when applying corrections.
"""

WARN_INVALID_KEYWORD = True
Copy link
Member

Choose a reason for hiding this comment

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

Maybe WARN_ON_INVALID_KEYWORD?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

pydicom/dataset.py Show resolved Hide resolved
pydicom/tests/test_dataset.py Show resolved Hide resolved
pydicom/config.py Outdated Show resolved Hide resolved
@scaramallion
Copy link
Member Author

OK, changes done

pydicom/tests/test_dataset.py Show resolved Hide resolved
pydicom/tests/test_dataset.py Show resolved Hide resolved
pydicom/tests/test_dataset.py Outdated Show resolved Hide resolved
@darcymason
Copy link
Member

I think everything has been addressed. Merging...

@darcymason darcymason merged commit 0c367d2 into pydicom:master Oct 1, 2020
@scaramallion scaramallion deleted the dev-camel-names branch October 1, 2020 22:19
@darcymason
Copy link
Member

@SimonBiggs, we are having problems on push to master... lot of stuff blowing up for pymedphys - I had a quick look but nothing obvious, figured you could solve it much quicker...

@SimonBiggs
Copy link
Contributor

Yup, I think I know the issue. Will send a PR. Thanks Darcy.

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.

Print a warning when assigning a non-existing DICOM Tag
5 participants