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
Use core's utilities in subpackages #112
Conversation
This fails due to a bad `cogify` call in cgls_lc100. Also, adds a subsetted local file to make sure we don't run the tests forever when we do fix `cogify`.
- Adds `stactools.core.utils.convert.cogify` - Uses `cogify` and `call` from core when possible instead of defining custom calls in subpackages
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
==========================================
+ Coverage 84.94% 85.20% +0.25%
==========================================
Files 81 82 +1
Lines 2471 2453 -18
==========================================
- Hits 2099 2090 -9
+ Misses 372 363 -9
Continue to review full report at Codecov.
|
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.
LGTM, one question about the GDAL code but if copying in is the best route then 👍
# DEALINGS IN THE SOFTWARE. | ||
# ***************************************************************************** | ||
|
||
import os.path |
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.
Is there not a way to bring this in as a dependency rather than copy the code in?
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.
I didn't find a pip package for it, the Proper Ecosystem Thing™ would probably be to PR https://github.com/rouault/cog_validator w/ pip support. But for now this was the best way I could think of.
A couple of the dataset subpackages had defined their own
call
and/orcogify
functions which do more or less the same thing. This pull request addsstactools.core.utils.convert.cogify
and updates subpackages to use core'scall
andcogify
instead of their own. The corecogify
function has sensible defaults (right now justdeflate
compression).When implementing, I discovered that
cgls_lc100
'scogify
was broken due to a dangling'-co'
option. As part of the fix, I updatedcgls_lc100
's test file to a subset of the original external file, since it was mondo and cogifying it was taking forever.Also includes a small typo fix in README.