From d324b87aa8bba4ecafaa3ea7080a322e6f5b7e7e Mon Sep 17 00:00:00 2001 From: azamifard Date: Wed, 10 Mar 2021 10:22:38 +0100 Subject: [PATCH] #154 deprecation message --- geospaas/nansat_ingestor/management/commands/ingest.py | 3 +++ geospaas/nansat_ingestor/management/commands/ingest_hyrax.py | 5 +++-- .../management/commands/ingest_thredds_crawl.py | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/geospaas/nansat_ingestor/management/commands/ingest.py b/geospaas/nansat_ingestor/management/commands/ingest.py index b1732881..986ec5c5 100644 --- a/geospaas/nansat_ingestor/management/commands/ingest.py +++ b/geospaas/nansat_ingestor/management/commands/ingest.py @@ -44,6 +44,9 @@ def _get_args(self, *args, **options): def handle(self, *args, **options): """ Ingest one Dataset per file that has not previously been ingested """ + print("WARNING!!! nansat_ingestor app will be deprecated soon and no longer " + "accessible. Please use `LOCALHarvester` of geospaas harvesting package instead.") + input("Press Enter to continue...") non_ingested_uris, n_points, nansat_options = self._get_args(*args, **options) for non_ingested_uri in non_ingested_uris: diff --git a/geospaas/nansat_ingestor/management/commands/ingest_hyrax.py b/geospaas/nansat_ingestor/management/commands/ingest_hyrax.py index 8edb27dc..1d0bfb70 100644 --- a/geospaas/nansat_ingestor/management/commands/ingest_hyrax.py +++ b/geospaas/nansat_ingestor/management/commands/ingest_hyrax.py @@ -13,6 +13,9 @@ class Command(IngestCommand): help = 'Add file to catalog from HYRAX server' def handle(self, *args, **options): + print("WARNING!!! nansat_ingestor app will be deprecated soon and no longer " + "accessible. Please use `LOCALHarvester` of geospaas harvesting package instead.") + input("Press Enter to continue...") print('Searching netcdf files. May take some time...\n\n\n') nc_uris = find_netcdf_uris(args[0]) num_nc_uris = len(nc_uris) @@ -42,5 +45,3 @@ def find_netcdf_uris(uri0, sleep=1.0): print('Server error %s'%e.message) # return all links to netCDF return nc_uris - - diff --git a/geospaas/nansat_ingestor/management/commands/ingest_thredds_crawl.py b/geospaas/nansat_ingestor/management/commands/ingest_thredds_crawl.py index cb7069e5..f96505ab 100644 --- a/geospaas/nansat_ingestor/management/commands/ingest_thredds_crawl.py +++ b/geospaas/nansat_ingestor/management/commands/ingest_thredds_crawl.py @@ -89,6 +89,9 @@ def add_arguments(self, parser): help='''Filename of a specific dataset''') def handle(self, *args, **options): + print("WARNING!!! nansat_ingestor app will be deprecated soon and no longer " + "accessible. Please use `LOCALHarvester` of geospaas harvesting package instead.") + input("Press Enter to continue...") if not len(options['url']) == 1: raise IOError('Please provide a url to the data') url = options.pop('url')[0]