Applied-GeoSolutions / gips

Geospatial Image Processing System
GNU General Public License v3.0
17 stars 5 forks source link

DH script interface regression #294

Open ircwaves opened 7 years ago

ircwaves commented 7 years ago

gips_zs is referencing DH_API_SERVER, and it seems like it should be GEOKIT_SERVER in the current implementation. But I think it should be DHD_HOST because that is what this setting is.

root@dh:~# gips_zs submit irc_test  modis_indices_ndvi /usr/local/lib/python2.7/dist-packages/gips/test/NHseacoast.shp 2015-144,2015-146
GIPS Zonal Summary (v0.9.1.1-dh-beta)
Traceback (most recent call last):
  File "/usr/local/bin/gips_zs", line 9, in <module>
    load_entry_point('gips===0.9.1.1-dh-beta', 'console_scripts', 'gips_zs')()
  File "/usr/local/lib/python2.7/dist-packages/gips/scripts/zs.py", line 140, in main
    submit(a.site_name, a.data_spec, a.site, a.dates)
  File "/usr/local/lib/python2.7/dist-packages/gips/scripts/zs.py", line 106, in submit
    job_id = rpc_conn().submit_job(site_name, data_spec,
  File "/usr/local/lib/python2.7/dist-packages/gips/scripts/zs.py", line 59, in rpc_conn
    return xmlrpclib.ServerProxy(gips_utils.settings().DH_API_SERVER, use_datetime=True)
AttributeError: 'module' object has no attribute 'DH_API_SERVER'
ra-tolson commented 7 years ago

I thought this was resolved by PR #334 but it turns out my config file matched gips_zs, in other words both were stale in a matching way, so it worked and I never noticed.

ra-tolson commented 7 years ago

I'm sorry, it's been awhile since I've looked at this part of the code. I think the difference in settings is intentional. The names aren't great, but the idea is that DH_API_SERVER is for client programs such as gips_zs, and is a full URL, whereas the other configs such as GEOKIT_SERVER and XMLRPC_PORT are hostname & port for gips acting as a server. I think the idea was to separate client config and server config in case they need to be different, but now I can't think of a case in which that's really necessary.