Skip to content

Automatically parse columns from YAML file #1114

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

Conversation

rzats
Copy link
Contributor

@rzats rzats commented Mar 29, 2023

Note: this is against the group/covid_hosp_auto_columns branch - not dev.

Prerequisites:

  • Unless it is a documentation hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

Summary

Update to @melange396's covid_hosp schema code:

  • Fix some errors that stop it from working
  • Add a method to convert a dataset from a YAML file to Python code
  • Apply this method to the facility, state_daily & state_timeseries definitions

@github-advanced-security
Copy link

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@rzats rzats requested a review from melange396 March 29, 2023 19:42
Copy link
Collaborator

@melange396 melange396 left a comment

Choose a reason for hiding this comment

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

this is not a bad start, but its got a ways to go. you can leave the stuff related to my comments on filenames and deeper structural changes to src/acquisition/covid_hosp/*/database.py alone for the most part right now, but we will need to refer back to them later after more things are integrated and merged.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rzats
Copy link
Contributor Author

rzats commented Apr 14, 2023

@melange396 fixed most issues except one around reading the static YAML file which I left a comment about!

@rzats rzats requested a review from melange396 April 14, 2023 23:51
…, and readd method to write that file

Co-authored-by: rzats <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Collaborator

@melange396 melange396 left a comment

Choose a reason for hiding this comment

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

groovy!

@melange396 melange396 merged commit ccfbd6e into group/covid_hosp_auto_columns Jun 12, 2023
@melange396 melange396 deleted the rzatserkovnyi/covid-hosp-auto-column-parser branch June 12, 2023 21:38
melange396 added a commit that referenced this pull request Jun 12, 2023
* Automatically parse columns from YAML file

* Use constructor

* try alt filename

* Try absolute path

* AGGREGATE_KEY_COLS

* what if none aggregate?

* fix table name

* tests

* ordered csv

* use cols method

* try pkgutil

* cleanup unneeded methods

* Review fixes

* Revert to old filename processing

* thread the name of the yaml schemadefs file through the whole process, and readd method to write that file

Co-authored-by: rzats <[email protected]>

---------

Co-authored-by: george haff <[email protected]>
rzats added a commit that referenced this pull request Jun 21, 2023
* Automatically parse columns from YAML file

* Use constructor

* try alt filename

* Try absolute path

* AGGREGATE_KEY_COLS

* what if none aggregate?

* fix table name

* tests

* ordered csv

* use cols method

* try pkgutil

* cleanup unneeded methods

* Review fixes

* Revert to old filename processing

* thread the name of the yaml schemadefs file through the whole process, and readd method to write that file

Co-authored-by: rzats <[email protected]>

---------

Co-authored-by: george haff <[email protected]>
rzats added a commit that referenced this pull request Jun 21, 2023
* Automatically parse columns from YAML file

* Use constructor

* try alt filename

* Try absolute path

* AGGREGATE_KEY_COLS

* what if none aggregate?

* fix table name

* tests

* ordered csv

* use cols method

* try pkgutil

* cleanup unneeded methods

* Review fixes

* Revert to old filename processing

* thread the name of the yaml schemadefs file through the whole process, and readd method to write that file

Co-authored-by: rzats <[email protected]>

---------

Co-authored-by: george haff <[email protected]>
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.

3 participants