-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ensure socrata workflow inputs are handled correctly #699
Conversation
@@ -333,6 +337,6 @@ def socrata_upload( | |||
socrata_upload( | |||
socrata_asset=os.getenv("SOCRATA_ASSET"), | |||
overwrite=os.getenv("OVERWRITE"), | |||
years=str(os.getenv("YEARS")).split(","), | |||
years=str(os.getenv("YEARS")).replace(" ", "").split(","), |
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.
Without this entering "2023, 2024" in the github action will pass '2023' and ' 2024' and not actually pull 2024.
@@ -204,7 +206,7 @@ def generate_groups(athena_asset, years=None, by_township=False): | |||
if not years and by_township: | |||
raise ValueError("Cannot set 'by_township' when 'years' is None") | |||
|
|||
if years == "all": | |||
if years == ["all"]: |
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.
the default 'all'
is turned into ['all']
when inherited through the environment and this logic wasn't properly reacting to it.
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.
Looks good, thanks!
Co-authored-by: Jean Cochrane <[email protected]>
The default workflow value for years, 'all', was not being handled correctly since it becomes a list during ingest. Additionally, spaces in the years input could lead to year values not being handled correctly.
Since the columns that get updated currently depend on how the response from the API and the column names of the athena view that feeds the asset match up, it'd be nice to be able to confirm that all expected columns are in fact going to be updated.