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

add_data.sh: Preliminary reorganization #68

Merged
merged 6 commits into from
Apr 16, 2021

Conversation

anthonyfok
Copy link
Member

@anthonyfok anthonyfok commented Mar 3, 2021

Hi Drew (@drotheram),

This is the start of a draft pull request to refactor python/add_data.sh, with more commits to come soon. :-)

  • add_data: Preliminary reorganization (This PR)
    • Add header comment, make comments easier to read, and similar trivial/pedantic changes
    • Use jq to simply JSON parsing (see https://cameronnokes.com/blog/working-with-json-in-bash-using-jq/)
    • Move repetitive calls into functions (first round):
      • run_psql()
      • run_ogr2ogr()
      • fetch_csv() (for CSV files hosted on GitHub, esp. LFS files)
    • Add apt-get install -y jq to python/Dockefile

See Issue #76 for future plans related to add_data.sh

@anthonyfok anthonyfok changed the title [Work-in-progress] Refactor python/add_data.sh add_data.sh: Preliminary reorganization Mar 19, 2021
@anthonyfok anthonyfok marked this pull request as ready for review March 19, 2021 22:58
- Use jq for simplified JSON parsing
- Keep the response from GitHub get repo content API as .json file
  for future use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant