Skip to content

Commit

Permalink
fix: file paths for repo
Browse files Browse the repository at this point in the history
  • Loading branch information
amfage committed Sep 4, 2023
1 parent 984e280 commit ec5e218
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Dict, List, Union


CATALOG_FILE = "./data/imagery-stac/catalog.json"
CATALOG_FILE = "./data/imagery/stac/catalog.json"
COMMAND = "argo submit --from wftmpl/publish-copy -n argo -f ./{0}.yaml --generate-name {1}-\n"


Expand Down Expand Up @@ -47,9 +47,9 @@ def _tmp_target_edit(target: str) -> str:
return target.replace("s3://linz-workflow-artifacts/nz-imagery/", "s3://nz-imagery/")

## Uncomment if you need to retrieve the STAC files
# _run_command(["git", "clone", """git@github.com:linz/imagery""", "./data/imagery-stac/"], None)
# _run_command(["git", "clone", """git@github.com:linz/imagery""", "./data/imagery/"], None)
## Need to be logged into imagery account to get the catalog.json file
# _run_command(["s5cmd", "cp", "s3://linz-imagery/catalog.json", "./data/imagery-stac/"], None)
# _run_command(["s5cmd", "cp", "s3://linz-imagery/catalog.json", "./data/imagery/"], None)


with open(CATALOG_FILE, encoding="utf-8") as catalog:
Expand All @@ -60,7 +60,7 @@ def _tmp_target_edit(target: str) -> str:
for link in catalog_json["links"]:
if link["rel"] == "child":
data_errors = []
collection_link = os.path.abspath("./data/imagery-stac/" + link["href"])
collection_link = os.path.abspath("./data/imagery/stac/" + link["href"])
with open(collection_link, encoding="utf-8") as collection:
collection_json = json.loads(collection.read())
source = _tmp_source_edit(link["href"])
Expand Down
8 changes: 4 additions & 4 deletions tools/generate-argo-cli-commands-nz-imagery-publish-copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import yaml
from typing import Dict, List, Set, Union

CATALOG_FILE = "./data/imagery-stac/catalog.json"
CATALOG_FILE = "./data/imagery/stac/catalog.json"
COMMAND = "argo submit --from wftmpl/publish-copy -n argo -f ./{0}.yaml --generate-name {1}-\n"
VALID_SCALES: Set[str] = {"500", "1000", "2000", "5000", "10000", "50000"}

Expand Down Expand Up @@ -57,9 +57,9 @@ def _tmp_target_edit(target: str) -> str:
return target.replace("s3://linz-imagery/", "s3://nz-imagery/")

## Uncomment if you need to retrieve the STAC files
# _run_command(["git", "clone", """git@github.com:linz/imagery""", "./data/imagery-stac/"], None)
# _run_command(["git", "clone", """git@github.com:linz/imagery""", "./data/imagery/"], None)
## Need to be logged into imagery account to get the catalog.json file
# _run_command(["s5cmd", "cp", "s3://linz-imagery/catalog.json", "./data/imagery-stac/"], None)
# _run_command(["s5cmd", "cp", "s3://linz-imagery/catalog.json", "./data/imagery/"], None)


with open(CATALOG_FILE, encoding="utf-8") as catalog:
Expand All @@ -70,7 +70,7 @@ def _tmp_target_edit(target: str) -> str:
for link in catalog_json["links"]:
if link["rel"] == "child":
data_errors = []
collection_link = os.path.abspath("./data/imagery-stac/" + link["href"])
collection_link = os.path.abspath("./data/imagery/stac/" + link["href"])
with open(collection_link, encoding="utf-8") as collection:
collection_json = json.loads(collection.read())
# TDE-854
Expand Down
8 changes: 4 additions & 4 deletions tools/generate-argo-cli-commands-nz-imagery-restandardise.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Dict, List, Optional, Set, Union


CATALOG_FILE = "./data/imagery-stac/catalog.json"
CATALOG_FILE = "./data/imagery/stac/catalog.json"
COMMAND = "argo submit ~/dev/topo-workflows/workflows/imagery/standardising-publish-import.yaml -n argo -f ./{0}.yaml --generate-name {1}\n"
VALID_SCALES: Set[str] = {"500", "1000", "2000", "5000", "10000", "50000"}

Expand Down Expand Up @@ -95,9 +95,9 @@ def _tmp_target_edit(target: str) -> str:
return target.replace("s3://linz-imagery/", "s3://linz-workflow-artifacts/nz-imagery/")

## Uncomment if you need to retrieve the STAC files
# _run_command(["git", "clone", """git@github.com:linz/imagery""", "./data/imagery-stac/"], None)
# _run_command(["git", "clone", """git@github.com:linz/imagery""", "./data/imagery/"], None)
## Need to be logged into imagery account to get the catalog.json file
# _run_command(["s5cmd", "cp", "s3://linz-imagery/catalog.json", "./data/imagery-stac/"], None)
# _run_command(["s5cmd", "cp", "s3://linz-imagery/catalog.json", "./data/imagery/"], None)


with open(CATALOG_FILE, encoding="utf-8") as catalog:
Expand All @@ -109,7 +109,7 @@ def _tmp_target_edit(target: str) -> str:
for link in catalog_json["links"]:
if link["rel"] == "child":
data_errors = []
collection_link = os.path.abspath("./data/imagery-stac/" + link["href"])
collection_link = os.path.abspath("./data/imagery/stac/" + link["href"])
with open(collection_link, encoding="utf-8") as collection:
collection_json = json.loads(collection.read())
source = os.path.join("s3://linz-imagery/", link["href"].strip("./")).rstrip("collection.json")
Expand Down

0 comments on commit ec5e218

Please sign in to comment.