Skip to content

Commit

Permalink
fix out path in download workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Aug 1, 2024
1 parent a92918a commit 09aa8bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- uses: actions/checkout@v4
- name: Download sources to file
run: |
/venv/bin/python harvest_restrictions.py download -o $OBJECTSTORE_BUCKET/dss_projects_2024/harvest_restrictions -v
/venv/bin/python harvest_restrictions.py download -o s3://$OBJECTSTORE_BUCKET/dss_projects_2024/harvest_restrictions -v
15 changes: 11 additions & 4 deletions harvest_restrictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,18 @@ def download_source(layer, out_path="data"):
]

# dump to file
out_file = (
"rr_" + str(layer["index"]).zfill(2) + "_" + layer["alias"].lower() + ".parquet"
out_file = os.path.join(
out_path,
(
"rr_"
+ str(layer["index"]).zfill(2)
+ "_"
+ layer["alias"].lower()
+ ".parquet"
),
)
LOG.info(f"Writing {alias} to {out_path}")
df.to_parquet(os.path.join(out_path, out_file))
LOG.info(f"Writing {alias} to {out_file}")
df.to_parquet(out_file)


@click.group()
Expand Down

0 comments on commit 09aa8bc

Please sign in to comment.