Adding check on stanford license for information in __init__ and to stop processing
in insarApp.py and isceApp.py because of their dependencies on licensed code files.LT1AB
parent
4095681e39
commit
592befb882
19
__init__.py
19
__init__.py
|
@ -1,18 +1,18 @@
|
|||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Copyright 2010 California Institute of Technology. ALL RIGHTS RESERVED.
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
# United States Government Sponsorship acknowledged. This software is subject to
|
||||
# U.S. export control laws and regulations and has been classified as 'EAR99 NLR'
|
||||
# (No [Export] License Required except when exporting to an embargoed country,
|
||||
|
@ -47,3 +47,14 @@ try:
|
|||
except KeyError:
|
||||
print('Using default ISCE Path: %s'%(isce_path))
|
||||
os.environ['ISCE_HOME'] = isce_path
|
||||
|
||||
try:
|
||||
from . license import stanford_license
|
||||
except:
|
||||
print("This is the Open Source version of ISCE.")
|
||||
print("Some of the workflows depend on a separate licensed package.")
|
||||
print("To obtain the licensed package, please make a request for ISCE")
|
||||
print("through the website: https://download.jpl.nasa.gov/ops/request/index.cfm.")
|
||||
print("Alternatively, if you are a member, or can become a member of WinSAR")
|
||||
print("you may be able to obtain access to a version of the licensed sofware at")
|
||||
print("https://winsar.unavco.org/software/isce")
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Copyright 2012 California Institute of Technology. ALL RIGHTS RESERVED.
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
# United States Government Sponsorship acknowledged. This software is subject to
|
||||
# U.S. export control laws and regulations and has been classified as 'EAR99 NLR'
|
||||
# (No [Export] License Required except when exporting to an embargoed country,
|
||||
|
@ -1197,11 +1197,18 @@ class Insar(_InsarBase):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
#make an instance of Insar class named 'insarApp'
|
||||
insar = Insar(name="insarApp")
|
||||
#configure the insar application
|
||||
insar.configure()
|
||||
#invoke the base class run method, which returns status
|
||||
status = insar.run()
|
||||
#inform Python of the status of the run to return to the shell
|
||||
raise SystemExit(status)
|
||||
if not isce.stanford_license:
|
||||
print("This workflow requires the Stanford licensed code elemnts.")
|
||||
print("Unable to find the license information in the isce.stanford_license file.")
|
||||
print("Please either obtain a stanford license and follow the instructions to")
|
||||
print("install the stanford code elements or else choose a different workflow.")
|
||||
raise SystemExit(0)
|
||||
else:
|
||||
#make an instance of Insar class named 'insarApp'
|
||||
insar = Insar(name="insarApp")
|
||||
#configure the insar application
|
||||
insar.configure()
|
||||
#invoke the base class run method, which returns status
|
||||
status = insar.run()
|
||||
#inform Python of the status of the run to return to the shell
|
||||
raise SystemExit(status)
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
|
||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Copyright 2013 California Institute of Technology. ALL RIGHTS RESERVED.
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
# United States Government Sponsorship acknowledged. This software is subject to
|
||||
# U.S. export control laws and regulations and has been classified as 'EAR99 NLR'
|
||||
# (No [Export] License Required except when exporting to an embargoed country,
|
||||
|
@ -1786,11 +1786,18 @@ class IsceApp(Application, FrameMixin):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
#create the isce object
|
||||
isceapp = IsceApp(name='isceApp')
|
||||
#configure the isceapp object
|
||||
isceapp.configure()
|
||||
#invoke the Application base class run method, which returns status
|
||||
status = isceapp.run()
|
||||
#inform Python of the status of the run to return to the shell
|
||||
raise SystemExit(status)
|
||||
if not isce.stanford_license:
|
||||
print("This workflow requires the Stanford licensed code elemnts.")
|
||||
print("Unable to find the license information in the isce.stanford_license file.")
|
||||
print("Please either obtain a stanford license and follow the instructions to")
|
||||
print("install the stanford code elements or else choose a different workflow.")
|
||||
raise SystemExit(0)
|
||||
else:
|
||||
#create the isce object
|
||||
isceapp = IsceApp(name='isceApp')
|
||||
#configure the isceapp object
|
||||
isceapp.configure()
|
||||
#invoke the Application base class run method, which returns status
|
||||
status = isceapp.run()
|
||||
#inform Python of the status of the run to return to the shell
|
||||
raise SystemExit(status)
|
||||
|
|
Loading…
Reference in New Issue