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

Updated data package API, Ruff #120

Merged
merged 4 commits into from
Oct 3, 2024
Merged

Updated data package API, Ruff #120

merged 4 commits into from
Oct 3, 2024

Conversation

dogversioning
Copy link
Contributor

This PR makes the following changes:

  • Changes 'subscription' to 'data_package' in dashboard API to line up with nomenclature reorg
  • Changes data_packages/ output format
    • Now proper json
    • Uses metadata to express more information about the contents of the data package
  • Starts a process of improving logging by specifying JSON output and using the logger to write basic status messages

Copy link

github-actions bot commented Oct 2, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
657 640 97% 90% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/handlers/dashboard/filter_config.py 100% 🟢
src/handlers/dashboard/get_chart_data.py 100% 🟢
src/handlers/dashboard/get_csv.py 92% 🟢
src/handlers/dashboard/get_data_packages.py 100% 🟢
src/handlers/dashboard/get_metadata.py 100% 🟢
src/handlers/dashboard/get_study_periods.py 100% 🟢
src/handlers/shared/awswrangler_functions.py 100% 🟢
src/handlers/shared/decorators.py 100% 🟢
src/handlers/shared/enums.py 100% 🟢
src/handlers/shared/functions.py 95% 🟢
src/handlers/site_upload/cache_api.py 100% 🟢
src/handlers/site_upload/fetch_upload_url.py 93% 🟢
src/handlers/site_upload/powerset_merge.py 97% 🟢
src/handlers/site_upload/process_upload.py 100% 🟢
src/handlers/site_upload/study_period.py 100% 🟢
TOTAL 99% 🟢

updated for commit: 3cf38c4 by action🐍

Comment on lines +16 to +19
log_level = os.environ.get("LAMBDA_LOG_LEVEL", "INFO")
logger = logging.getLogger()
logger.setLevel(log_level)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll centralize this at some point, but right now i'm mostly focused on just getting dashboard development unblocked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This format change is the new structure - this is what @vlad-ignatov requested to help populate the subscription metadata.

Comment on lines 143 to 144
for k, v in extra_items.items():
data_version_metadata[k] = v
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: data_version_metadata.update(extra_items) might be more obvious that this is just a merge.

Comment on lines -248 to +253
column_dict[column] = "float"
column_dict[column] = "boolean"
Copy link
Contributor

Choose a reason for hiding this comment

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

was this a typo before? or some historical thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo from before

@dogversioning dogversioning changed the title Updated data package API Updated data package API, Ruff Oct 3, 2024
@dogversioning dogversioning merged commit ff4bee6 into main Oct 3, 2024
2 checks passed
@dogversioning dogversioning deleted the mg/data_package_api branch October 3, 2024 19:08
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.

2 participants