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

Deprecate 'enhancement_config' keyword argument in favor of 'enhance' #485

Merged
merged 4 commits into from Nov 9, 2018

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Nov 2, 2018

Current ways of specifying custom enhancement are inconsistent between save_dataset-type methods and get_enhanced_image and the Enhancer class that actually applies the enhancement. There is enhancement_config and enhancement_config_file, but most of the time the user just wants to say "don't enhance anything". To me the clearest way that a user could ask for this would be:

scn.save_dataset(..., enhance=False)

which is now how it works. A user can also provide a Enhancer instance if they really want to. This PR also sets things up for the future where I would like to reinvent the enhancement interface to make it a separate step for the user.

  • Tests added
  • Tests passed
  • Passes git diff origin/master -- "*py" | flake8 --diff
  • Fully documented

@djhoese djhoese added this to the v0.10 milestone Nov 2, 2018
@djhoese djhoese self-assigned this Nov 2, 2018
@djhoese djhoese requested review from mraspaud and pnuu November 2, 2018 17:44
@djhoese djhoese added the backwards-incompatibility Causes backwards incompatibility or introduces a deprecation label Nov 2, 2018
@coveralls
Copy link

coveralls commented Nov 7, 2018

Coverage Status

Coverage increased (+0.007%) to 73.939% when pulling 2b335e4 on djhoese:feature-enhance-kwargs into 5dd28ea on pytroll:master.

@codecov
Copy link

codecov bot commented Nov 7, 2018

Codecov Report

Merging #485 into master will increase coverage by <.01%.
The diff coverage is 93.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #485      +/-   ##
==========================================
+ Coverage   73.93%   73.93%   +<.01%     
==========================================
  Files         137      137              
  Lines       18222    18242      +20     
==========================================
+ Hits        13472    13488      +16     
- Misses       4750     4754       +4
Impacted Files Coverage Δ
satpy/tests/writer_tests/test_mitiff.py 95.12% <ø> (-0.06%) ⬇️
satpy/tests/test_scene.py 99.32% <ø> (-0.01%) ⬇️
satpy/scene.py 84.03% <100%> (-0.43%) ⬇️
satpy/writers/geotiff.py 43.51% <100%> (ø) ⬆️
satpy/writers/mitiff.py 74.86% <100%> (ø) ⬆️
satpy/tests/test_writers.py 97.31% <100%> (+0.11%) ⬆️
satpy/writers/scmi.py 74% <100%> (ø) ⬆️
satpy/writers/__init__.py 76.19% <87.5%> (+0.16%) ⬆️

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 5dd28ea...2b335e4. Read the comment docs.

@djhoese djhoese merged commit 953c38f into pytroll:master Nov 9, 2018
@djhoese djhoese deleted the feature-enhance-kwargs branch November 9, 2018 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompatibility Causes backwards incompatibility or introduces a deprecation component:enhancements component:writers refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants