Skip to content

Commit

Permalink
deprecate platform CLI flags
Browse files Browse the repository at this point in the history
  • Loading branch information
kr-stn committed Apr 4, 2017
1 parent ba3139e commit 2a04f73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ Change Log

All notable changes to ``sentinelsat`` will be listed here.

[0.9.X] - 2017-MM-DD
-------

Deprecated
~~~~~
- ``--sentinel1`` and ``--sentinel2`` will be removed with the next major release

[0.9.1] - 2017-03-06
-------

Expand Down
6 changes: 4 additions & 2 deletions sentinelsat/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def cli():
""")
@click.option(
'--sentinel1', is_flag=True,
help='Limit search to Sentinel-1 products.')
help='DEPRECATED: Please use --sentinel instead. Limit search to Sentinel-1 products.')
@click.option(
'--sentinel2', is_flag=True,
help='Limit search to Sentinel-2 products.')
help='DEPRECATED: Please use --sentinel instead. Limit search to Sentinel-2 products.')
@click.option(
'-c', '--cloud', type=int,
help='Maximum cloud cover in percent. (Automatically sets --sentinel2)')
Expand All @@ -90,8 +90,10 @@ def search(
"cloudcoverpercentage": "[0 TO %s]" % cloud})
elif sentinel2:
search_kwargs.update({"platformname": "Sentinel-2"})
logger.info('DEPRECATED: Please use --sentinel instead')
elif sentinel1:
search_kwargs.update({"platformname": "Sentinel-1"})
logger.info('DEPRECATED: Please use --sentinel instead')

if query is not None:
search_kwargs.update(dict([i.split('=') for i in query.split(',')]))
Expand Down

0 comments on commit 2a04f73

Please sign in to comment.