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

Fill in pre-process lambda for bulk OTF feature #86

Merged
merged 16 commits into from
Jul 30, 2024

Conversation

dmannarino
Copy link
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information

@dmannarino dmannarino changed the title WIP: Fill-in pre-process lambda for bulk OTF feature WIP: Fill in pre-process lambda for bulk OTF feature Jul 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.52%. Comparing base (803b821) to head (3cc3349).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                Coverage Diff                 @@
##           feature/otf_lists      #86   +/-   ##
==================================================
  Coverage              94.52%   94.52%           
==================================================
  Files                     19       19           
  Lines                   1261     1261           
==================================================
  Hits                    1192     1192           
  Misses                    69       69           
Flag Coverage Δ
unittests 94.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dmannarino dmannarino changed the title WIP: Fill in pre-process lambda for bulk OTF feature Fill in pre-process lambda for bulk OTF feature Jul 29, 2024
@dmannarino dmannarino marked this pull request as ready for review July 29, 2024 18:28
Copy link
Contributor

@danscales danscales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

from raster_analysis.exceptions import QueryParseException
from raster_analysis.globals import LOGGER

patch(["boto3"])

# FIXME: Get these from env
BUCKET = "gfw-pipelines-test"
REGION = "us-east-1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for now, but don't forget to fix these lines before we check into staging (especially line 18).

Copy link
Member

@jterry64 jterry64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, minor naming suggestions


# FIXME: Hash those args for cacheability!
request_hash: UUID = uuid4()
geom_prefix = f"test/otf_lists/{str(request_hash)}/geometries.csv"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can make this more concrete now, since it's already in a test bucket.

I'd prefer not to include "otf" in the path name because it requires knowing an acronym we may or may not still use in 3 years. Maybe something general like /analysis/jobs/input?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jterry64 Sounds good, but where does the hash go? How about /analysis/jobs/$hash/input and /analysis/jobs/$hash/output ?

# FIXME: Hash those args for cacheability!
request_hash: UUID = uuid4()
geom_prefix = f"test/otf_lists/{str(request_hash)}/geometries.csv"
output_prefix = f"test/otf_lists/{str(request_hash)}/output"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, maybe just /analysis/jobs/output?

@dmannarino dmannarino merged commit 9e882a1 into feature/otf_lists Jul 30, 2024
3 checks passed
@dmannarino dmannarino deleted the feature/pre-process_otf_lists branch July 30, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants