-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add builtin 'config' object and 'features.future_geometry' toggle #519
Conversation
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Avoids user environment breaking tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of typos I think, but otherwise LGTM! Thanks for taking the time to cleanup on the way
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:
Add documentation on configuration
Modify other utility methods that create AreaDefinitions to use the toggle
Closes #xxxx
Tests added
Tests passed
Passes
git diff origin/main **/*py | flake8 --diff
Fully documented