Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
wpreimes committed Feb 7, 2024
1 parent 64513d6 commit 873f4cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
17 changes: 0 additions & 17 deletions src/ismn/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,13 @@ def collect_metadata(data_path, meta_path, parallel):
"If the file already exists it will be overwritten. "
"If not specified this is a file called "
"`ismn_sensors.json` and stored in the DATA_PATH.")
<<<<<<< HEAD
@click.option('--field', '-f', multiple=True,
help="Fields to include. This option can be called multiple times"
"with different fields. Allowed are: "
"network, station, sensor, depth, timerange. \n "
"Or any sensor properties (also custom ones) that have a "
"value.")
def export_geojson(data_path, file_out, field):
=======
@click.option('--markercolor', '-m',
type=click.STRING, default='"#00aa00"', show_default=True,
help='Hex color (USE QUOTES!, e.g. "#00aa00") to assign to '
'markers in json file. The default color is green.')
def export_geojson(data_path, file_out, markercolor):
>>>>>>> b84092d811b47c0b9b104d92d8f710e629ef23fb
"""
Calls
Command line program to initialise ISMN metadata collection. THIS WILL
Expand All @@ -74,18 +66,13 @@ def export_geojson(data_path, file_out, markercolor):
"""
# The docstring above is slightly different to the normal python one to
# display it properly on the command line.
<<<<<<< HEAD
=======
markercolor = str(markercolor.replace('"', '').replace("'", ""))
>>>>>>> b84092d811b47c0b9b104d92d8f710e629ef23fb
if not os.path.exists(data_path):
raise ValueError("The passed DATA_PATH does not exist.")
ds = ISMN_Interface(data_path)
if file_out is None:
file_out = os.path.join(ds.root.root_dir, 'ismn_sensors.json')
os.makedirs(os.path.dirname(file_out), exist_ok=True)
print(f"Exporting geojson to: {file_out}")
<<<<<<< HEAD

kwargs = {}
field = [f.lower() for f in field]
Expand All @@ -98,10 +85,6 @@ def export_geojson(data_path, file_out, markercolor):

kwargs['extra_props'] = field if len(field) > 0 else None
ds.collection.export_geojson(file_out, **kwargs)
=======
ds.collection.export_geojson(file_out, markercolor=markercolor)
>>>>>>> b84092d811b47c0b9b104d92d8f710e629ef23fb


@click.group(short_help="ISMN Command Line Programs.")
def ismn():
Expand Down
10 changes: 0 additions & 10 deletions src/ismn/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,15 +824,9 @@ def export_citations(self, out_file=None):

return refs

<<<<<<< HEAD
def export_geojson(self, path, network=True, station=True, sensor=False,
depth=True, timerange=True, extra_props=None,
**filter_kwargs):
=======
def export_geojson(self, path, markercolor="#00aa00",
network=True, station=True, sensor=False,
depth=True, extra_props=None, **filter_kwargs):
>>>>>>> b84092d811b47c0b9b104d92d8f710e629ef23fb
"""
Filter sensors in collection and create geojson file containing all
features.
Expand Down Expand Up @@ -877,10 +871,6 @@ def export_geojson(self, path, markercolor="#00aa00",
],
},
"properties": {
<<<<<<< HEAD
=======
"markerColor": markercolor,
>>>>>>> b84092d811b47c0b9b104d92d8f710e629ef23fb
"datasetProperties": []
}
}
Expand Down

0 comments on commit 873f4cf

Please sign in to comment.