Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create geoprocessing API django app #2201

Merged
merged 8 commits into from
Aug 31, 2017
Merged

Commits on Aug 31, 2017

  1. Create geoprocessing_api and move analyze and rwd requests into it

    * Create `apps.geoprocessing_api`. It is dependent on `apps.modeling`
    * Move the analyze views, tasks, calcs, and tests out of `apps.modeling` and into
    `apps.geoprocessing_api`
    * Move the rwd views and tasks out of `apps.modeling` and into
    `apps.geoprocessing_api`
    
    * All analyze urls are now `api/geoprocessing/start/analyze/...`
    * Rwd url is now `api/geoprocessing/start/rwd/
    
    * Add `api/geoprocessing/jobs/<job_uuid>`, which uses `modeling.views.get_job`
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    86eca44 View commit details
    Browse the repository at this point in the history
  2. Geoprocessing API: Accept x-www-form-urlencoded and json

    * Parse the analyze and rwd requests such that they could be either
      form-urlencoded (from the app) or json (easier for an api user)
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    48758a2 View commit details
    Browse the repository at this point in the history
  3. Geoprocessing API: Adjust client routes

    * Update the client to call new geoprocessing routes for analyze and rwd
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    f16e29e View commit details
    Browse the repository at this point in the history
  4. Geoprocessing API: All non-geoprocessing /api urls --> /mmw

    * We were prefixing almost all URLs with `/api`. We'd like a way to
      distinguish the public facing API urls from our internal only ones,
      so rename all non-geprocessing-api urls to have the prefix `/mmw`
    * /api/bigcz --> /bigcz
    * Now that geoprocessing is the lone api endpoint, make its urls just `/api/..`
    * Remove `/start` from urls. It adds length with little benefit
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    7bbec1a View commit details
    Browse the repository at this point in the history
  5. Geoprocessing API: Add Location header with url to poll

    * Add a Location header with the `/jobs/$job-id` url to poll
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    9ad5eac View commit details
    Browse the repository at this point in the history
  6. Geoprocessing API: Analyze request body as GeoJSON

    * Previously the analyze requests took a json body either like:
          { "area_of_interest": { "type": "MultiPolygon" ... more geojson }}
       or like:
          { "wkaoi": "mywkaoi__id" }
    
    * Now the input should be either GeoJson in the request body:
          { "type": "MultiPolygon", ... more geojson }
       or take a query param with the wkaoi:
          `api/analyze/?wkaoi=mywkaoi__id`
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    4638160 View commit details
    Browse the repository at this point in the history
  7. Geoprocessing API: Accept Proper Json As RWD Input

    * Update the RWD view to take a json object (same keys as form we were
      submitting)
    
    eg
      {
          "location": [39.11112, -73.123],
          "snappingOn": true,
          "dataSource": "nhd"
      }
    * Update client to send json instead of form
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    e9a0c5b View commit details
    Browse the repository at this point in the history
  8. Fix typo in comment

    * `ms_pointsource_drb` was missing its closing tick mark
    Alice Rottersman committed Aug 31, 2017
    Configuration menu
    Copy the full SHA
    abece08 View commit details
    Browse the repository at this point in the history