Skip to content

Adding latest files#1921

Open
smarthg-gi wants to merge 1 commit intodatacommonsorg:masterfrom
smarthg-gi:S0902
Open

Adding latest files#1921
smarthg-gi wants to merge 1 commit intodatacommonsorg:masterfrom
smarthg-gi:S0902

Conversation

@smarthg-gi
Copy link

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates and reorganizes the test data and associated metadata files for the ACS 5-year subject table S0902. It replaces older test data with a new summary file, suggesting an update to the data being tested, and standardizes the naming and internal structure of the associated mapping files for improved consistency.

Highlights

  • Test Data Removal: Removed outdated test data CSV and JSON summary files related to S0902_state_county_places.
  • New Summary Data Added: Introduced a new JSON summary file, S0902_summary.json, which contains updated data for the year 2012 and reflects a larger dataset with more observations and unique geographical entities.
  • File Renaming: Renamed the MCF and TMCF test output files from S0902_state_county_places_output to test_S0902_output for better consistency and clarity.
  • MCF Property Reordering: Reordered properties within the statistical variable definitions in the MCF file to standardize their structure, ensuring age is consistently placed after other demographic properties.
Changelog
  • scripts/us_census/acs5yr/subject_tables/s0902/testdata/S0902_state_county_places_cleaned.csv
    • Removed the old cleaned CSV test data file.
  • scripts/us_census/acs5yr/subject_tables/s0902/testdata/S0902_state_county_places_output.mcf
    • Renamed to test_S0902_output.mcf.
    • Reordered properties within statistical variable definitions.
  • scripts/us_census/acs5yr/subject_tables/s0902/testdata/S0902_state_county_places_output.tmcf
    • Renamed to test_S0902_output.tmcf.
  • scripts/us_census/acs5yr/subject_tables/s0902/testdata/S0902_state_county_places_summary.json
    • Removed the old JSON summary test data file.
  • scripts/us_census/acs5yr/subject_tables/s0902/testdata/S0902_summary.json
    • Added a new JSON summary file with updated data for 2012.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates test files for the S0902 subject table, replacing data from 2018/2019 with data from 2012 and renaming some files for consistency. However, the PR title "Adding latest files" is misleading given the data is older. More importantly, the removal of S0902_state_county_places_cleaned.csv will likely break the tests in subject_table_test.py, which expects a *cleaned.csv file. Please address the broken test. For future PRs, please use a more descriptive title and provide a summary of changes in the description.

@@ -1,217 +0,0 @@
Year,Place,StatVar,Quantity
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The test script scripts/us_census/acs5yr/subject_tables/subject_table_test.py requires a *cleaned.csv file in the testdata directory for each subject table test. By removing this file without providing a replacement for the 2012 data, the tests for S0902 will fail. Please add the corresponding cleaned.csv file for the new test data.

"total StatVarObservations": 3774
},
"2012": {
"filename": "S0902/ACSST5Y2012.S0902_data_with_overlays_1111-11-11T111111.csv",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The filename value S0902/ACSST5Y2012.S0902_data_with_overlays_1111-11-11T111111.csv includes a placeholder timestamp 1111-11-11T111111. While this is likely for test determinism, it's an unusual value that could be confusing. Consider using a more descriptive placeholder or adding a comment in the test setup explaining its purpose.

Comment on lines +1 to +17
{
"summary": {
"column map generator commit SHA": "",
"data processing script commit SHA": "",
"total StatVarObservations": 3774
},
"2012": {
"filename": "S0902/ACSST5Y2012.S0902_data_with_overlays_1111-11-11T111111.csv",
"number of columns in dataset": 146,
"number of rows in dataset": 998,
"number of statVars generated for columns": 108,
"number of observations": 3774,
"number of unique StatVars with observations": 108,
"number of unique geos": 35,
"number of StatVars in mcf_dict": 108
}
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This file is missing a final newline character. It's a common convention to end text files with a newline. This helps prevent issues with file processing and tools like cat.

Suggested change
{
"summary": {
"column map generator commit SHA": "",
"data processing script commit SHA": "",
"total StatVarObservations": 3774
},
"2012": {
"filename": "S0902/ACSST5Y2012.S0902_data_with_overlays_1111-11-11T111111.csv",
"number of columns in dataset": 146,
"number of rows in dataset": 998,
"number of statVars generated for columns": 108,
"number of observations": 3774,
"number of unique StatVars with observations": 108,
"number of unique geos": 35,
"number of StatVars in mcf_dict": 108
}
}
{
"summary": {
"column map generator commit SHA": "",
"data processing script commit SHA": "",
"total StatVarObservations": 3774
},
"2012": {
"filename": "S0902/ACSST5Y2012.S0902_data_with_overlays_1111-11-11T111111.csv",
"number of columns in dataset": 146,
"number of rows in dataset": 998,
"number of statVars generated for columns": 108,
"number of observations": 3774,
"number of unique StatVars with observations": 108,
"number of unique geos": 35,
"number of StatVars in mcf_dict": 108
}
}

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.

1 participant