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

Refactor request parsing #45

Open
mbertrand opened this issue Feb 24, 2016 · 3 comments
Open

Refactor request parsing #45

mbertrand opened this issue Feb 24, 2016 · 3 comments

Comments

@mbertrand
Copy link
Collaborator

@aashish24 This is in regards to your suggestion yesterday to refactor how/where request parsing takes place, could you provide some more details? I think you mentioned having request JSON parsed by the process object itself? But the request parser in it's current state is responsible for actually creating the process.

Here is an example of the current request parser being used in Girder:
screen shot 2016-02-24 at 9 46 53 am

@mbertrand
Copy link
Collaborator Author

@kotfic I replaced the GaiaRequestParser with a slightly modified version of your custom_json_deserialize JSON function in the postgis branch, and modified the request JSON accordingly. Example:

{
  "_type": "gaia.geo.processes_vector.WithinProcess",
  "inputs": [
      {
          "_type": "gaia.inputs.VectorFileIO",
          "name": "first",
          "uri": "{basepath}/iraq_hospitals.geojson"
      },
      {
          "_type": "gaia.inputs.ProcessIO",
          "process": {
              "_type": "gaia.geo.processes_vector.BufferProcess",
              "buffer_size": 1000,
              "name": "buffer",
              "inputs": [
                  {
                      "_type": "gaia.inputs.VectorFileIO",
                      "uri": "{basepath}/iraq_roads.geojson",
                      "filters": [
                          ["type","=","motorway"]
                      ]
                  }
              ]
          }
      }
  ]
}

@mbertrand
Copy link
Collaborator Author

#58

@kotfic
Copy link
Contributor

kotfic commented Mar 16, 2016

@mbertrand sorry for the turn around time on review. Looked at deserialize function in the postgis branch and it looks good to me. Once that's in i think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants