{"id":13734121,"url":"https://github.com/Anagraph/yogrt","last_synced_at":"2025-05-08T10:31:00.537Z","repository":{"id":78188289,"uuid":"526043732","full_name":"Anagraph/yogrt","owner":"Anagraph","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-16T13:33:09.000Z","size":9613,"stargazers_count":17,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-15T02:34:34.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anagraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-08-18T03:40:05.000Z","updated_at":"2024-04-22T23:44:30.000Z","dependencies_parsed_at":"2023-03-01T07:15:17.070Z","dependency_job_id":null,"html_url":"https://github.com/Anagraph/yogrt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anagraph%2Fyogrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anagraph%2Fyogrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anagraph%2Fyogrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anagraph%2Fyogrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anagraph","download_url":"https://codeload.github.com/Anagraph/yogrt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253045637,"owners_count":21845740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:00:52.774Z","updated_at":"2025-05-08T10:31:00.281Z","avatar_url":"https://github.com/Anagraph.png","language":"Python","funding_links":[],"categories":["Database","Python"],"sub_categories":[],"readme":"# YAML OGR Templating (yogrt) 🍦 \n## A simple templating tool for importing GIS data to PostGIS \n\n## Requirements\n\n- Python 3.6+\n- [GDAL \u0026 OGR](https://gdal.org/)\n- [awscli](https://aws.amazon.com/cli/) (optional)\n- [poetry](https://python-poetry.org/) (optional)\n\n## Installation\n\n`poetry`:\n```bash\npoetry add git+ssh://git@github.com/Anagraph/yogrt.git@develop\npoetry shell\n```\n\n## Example\n\n### Initialize template files\n\n```bash\nexport YOGRT_TARGET_DIR=./yogrt\nmkdir -p $YOGRT_TARGET_DIR\nyogrt init --target-directory $YOGRT_TARGET_DIR\n```\n\nYou will now have the following files within the target directory:\n```bash\n.\n├── profile.yaml\n├── secrets.yaml\n└── sources.yaml\n```\n\nYou can modify the target projection of the sources by modifying the `profile.yaml` file.\n\nYou must modify the `secrets.yaml` to configure it with your database and optionally your AWS credentials.\n\nThe `sources.yaml` file is where you will configure the sources you want to import:\n```yaml\ncountries:\n  type: polygon\n  download_url: https://datahub.io/core/geo-countries/r/countries.geojson\n  table_name: countries\n\nldc:\n  type: polygon\n  download_url: https://www.oeb.ca/documents/opendata/open-data-electricity-map-20220131.zip\n  table_name: ldc\n  is_zip: true\n  unzip_filename: \"Electric_220131.kmz\"\n```\n\n### Import datasources\n\nRun with:\n```bash\nyogrt run --profile=$YOGRT_TARGET_DIR/profile.yaml --sources=$YOGRT_TARGET_DIR/sources.yaml  --secrets=$YOGRT_TARGET_DIR/secrets.yaml\n```\n\n## Contributing\n\n## Install for dev\n\n```bash\ngit clone git@github.com:Anagraph/yogrt.git\ngit switch -c feature/my-new-feature\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n## Run tests\n\n```bash\ncd tests\npytest .\n```\n\n## Additional notes\n\nYou can [setup a dev PostgreSQL server](docs/postgresql-docker.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnagraph%2Fyogrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAnagraph%2Fyogrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnagraph%2Fyogrt/lists"}