Closed djhoese closed 1 year ago
Merging #519 (30305c2) into main (327cec1) will increase coverage by
0.02%
. The diff coverage is95.69%
.
@@ Coverage Diff @@
## main #519 +/- ##
==========================================
+ Coverage 94.31% 94.33% +0.02%
==========================================
Files 79 82 +3
Lines 12936 13001 +65
==========================================
+ Hits 12201 12265 +64
- Misses 735 736 +1
Flag | Coverage Δ | |
---|---|---|
unittests | 94.33% <95.69%> (+0.02%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
pyresample/test/test_gradient.py | 99.00% <ø> (+0.01%) |
:arrow_up: |
pyresample/utils/rasterio.py | 62.50% <83.33%> (+8.92%) |
:arrow_up: |
pyresample/test/test_utils.py | 99.37% <97.05%> (-0.63%) |
:arrow_down: |
pyresample/_config.py | 100.00% <100.00%> (ø) |
|
pyresample/area_config.py | 90.58% <100.00%> (+0.13%) |
:arrow_up: |
pyresample/future/geometry/area.py | 100.00% <100.00%> (ø) |
|
pyresample/geometry.py | 87.50% <100.00%> (+<0.01%) |
:arrow_up: |
pyresample/test/conftest.py | 98.46% <100.00%> (+0.06%) |
:arrow_up: |
pyresample/test/test_config/__init__.py | 100.00% <100.00%> (ø) |
|
pyresample/test/test_config/test_feature_flags.py | 100.00% <100.00%> (ø) |
|
... and 3 more |
Everything should be fixed here, but I'll wait to merge until the various bug fix PRs are merged and released.
This is the first step of many to allow users a way of transitioning easily between pyresample 1.x and pyresample 2.x interfaces and objects. As a first step this PR adds a new
pyresample.config
object usingdonfig
and includes afeatures.future_geometries
boolean flag. This flag modifies utility functions likecreate_area_def
to return a futureAreaDefinition
instead of the old/existingAreaDefinition
. Along with some changes to imports users should be able to easily switch usage to the new geometry objects semi-easily (I think).This also adds a
to_legacy()
method to the future area so it is easier to create the future area but return the legacy version.As part of these changes I originally added an import in
pyresample/__init__.py
so that importingAreaDefinition
andSwathDefinition
frompyresample
would get you the new versions of the classes if this toggle config flag was set. This seemed near impossible to test so I ended up removing it.TODO:
[x] Add documentation on configuration
[x] Modify other utility methods that create AreaDefinitions to use the toggle
[ ] Closes #xxxx
[x] Tests added
[x] Tests passed
[x] Passes
git diff origin/main **/*py | flake8 --diff
[x] Fully documented