-
Notifications
You must be signed in to change notification settings - Fork 5
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
DAS-2161: Updates libs with no user visible changes. #16
Changes from 11 commits
8225754
e23594e
e344889
834a21a
63cbf05
25266eb
e09ebf4
3f6b6fc
53ffaed
ff2439b
749e62c
b7481c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | ||
version: v1.25.0 | ||
language-settings: | ||
python: "3.7" | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
gdal==3.6.3 | ||
gdal==3.9 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
TRANSPARENT, | ||
TRANSPARENT_IDX, | ||
TRANSPARENT_RGBA, | ||
all_black_color_map, | ||
get_color_palette, | ||
remove_alpha, | ||
) | ||
|
@@ -286,9 +287,9 @@ def get_color_map_from_image(image: Image) -> dict: | |
|
||
""" | ||
color_tuples = np.array(image.getpalette(rawmode='RGBA')).reshape(-1, 4) | ||
color_map = {} | ||
for idx in range(0, color_tuples.shape[0]): | ||
color_map[idx] = tuple(color_tuples[idx]) | ||
color_map = all_black_color_map() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay then. This is me gathering my thoughts (please tell me if anything below is wonky):
So, the questions I have:
Possibly nitpicky thought (feel free to ignore), you could use
(And yes, I know I used "color", but only to be consistent 😉) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, we have gotten that before and will still see that. It does not matter, because there are no values in the data that will have those indexes. For example run
No, because we only ask for 254 values when quantizing . I just tried with 300 for giggles and quantize won't go above 256: Also No Data is set right before reprojection, so it would end up overwriting the last color in the table. Which is also why I only ask for 254 values, so that we have a transparent and no data index available without ruining any of the quantized values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sure that's cleaner. |
||
for idx, color_tuple in enumerate(color_tuples): | ||
color_map[idx] = tuple(color_tuple) | ||
return color_map | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
harmony-service-lib~=1.0.26 | ||
harmony-service-lib~=1.0.27 | ||
pystac~=0.5.6 | ||
matplotlib==3.7.1 | ||
rasterio==1.3.6 | ||
rioxarray==0.15.0 | ||
numpy==1.24.2 | ||
pillow==10.0.0 | ||
pyproj==3.6.0 | ||
matplotlib==3.9.0 | ||
rasterio==1.3.10 | ||
rioxarray==0.15.5 | ||
numpy==1.26.4 | ||
pillow==10.3.0 | ||
pyproj==3.6.1 |
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.
Okay - so just vocalising what I think we've got here: the
.snyk
file is preserving the version of Python that Snyk was previously using prior to the bump to Python 3.9.This seems like the way to go for now, but it is a bit iffy that we are almost certainly getting different package versions being scanned by Snyk than we are actually installing in the Docker image. (Side note - it's nice that a
.snyk
file is actually working here, I don't think that was always the case)