Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
linogaliana committed Jan 12, 2024
1 parent 03b9c6d commit 51371f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions misc/argo-pipeline/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ spec:
--source {{inputs.parameters.source}} \
--simplification {{inputs.parameters.simplification}} \
--level_polygons {{inputs.parameters.level_polygons}} \
--filter_by {{inputs.parameters.filter_by}}" ;
python /mnt/bin/src/split_merge_tiles.py \
--path test/test-argo \
--format_output {{inputs.parameters.format_output}} \
--year {{inputs.parameters.year}} \
--crs {{inputs.parameters.crs}} \
--source {{inputs.parameters.source}} \
--simplification {{inputs.parameters.simplification}} \
--level_polygons {{inputs.parameters.level_polygons}} \
--filter_by {{inputs.parameters.filter_by}}"
]
volumeMounts:
Expand Down
4 changes: 4 additions & 0 deletions misc/argo-pipeline/src/split_merge_tiles.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import argparse
from cartiflette import PATH_WITHIN_BUCKET
from cartiflette.pipeline import mapshaperize_merge_split_from_s3
import logging


parser = argparse.ArgumentParser(description='Process command line arguments.')
logger = logging.getLogger(__name__)

# Define the arguments with their default values
parser.add_argument('--path', type=str, default=PATH_WITHIN_BUCKET, help='Path in bucket')
Expand Down Expand Up @@ -32,6 +35,7 @@

def main(args_dict):
if args_dict['level_polygons'] != "COMMUNE":
logger.info("Level ignored for COMMUNE_ARRONDISSEMENT borders")
return None

args_dict['level_polygons'] = "COMMUNE_ARRONDISSEMENT"
Expand Down

0 comments on commit 51371f1

Please sign in to comment.