diff --git a/.github/workflows/download.yaml b/.github/workflows/download.yaml index ce4be1b..027c559 100644 --- a/.github/workflows/download.yaml +++ b/.github/workflows/download.yaml @@ -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 \ No newline at end of file + /venv/bin/python harvest_restrictions.py download -o s3://$OBJECTSTORE_BUCKET/dss_projects_2024/harvest_restrictions -v \ No newline at end of file diff --git a/harvest_restrictions.py b/harvest_restrictions.py index 24a0d8e..27b9686 100644 --- a/harvest_restrictions.py +++ b/harvest_restrictions.py @@ -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()