Coder Social home page Coder Social logo

Investigate using pyodk about osm-fieldwork HOT 4 CLOSED

hotosm avatar hotosm commented on September 17, 2024
Investigate using pyodk

from osm-fieldwork.

Comments (4)

robsavoye avatar robsavoye commented on September 17, 2024

pyodk is a very new python module for accessing an ODK Central server. Currently two other projects are using their own python code to do the same thing. Although pyodk is new, it was created by the ODK team, so we need to consider dropping our internal code that does the same thing to use the more community based code, which is open source and on github. It may be more efficient to work with the pyodk developers than maintaining our own similar code.

from osm-fieldwork.

ivangayton avatar ivangayton commented on September 17, 2024

I looked at the PyODK code yesterday, and it looks clean and well-written, but doesn't explicitly handle all of the API endpoints that we need.

For the Field Mapping Tasking Manager workflow we need to:

  • Create projects
  • Create forms within projects
  • Push attachement files (GeoJSON for select_from_file) for specific forms
  • Publish draft forms
  • Create app users
  • Assign app users to forms
  • Create QR codes for app users, including the general settings like basemap -> MapBox
  • Detect the presence of new submissions
  • Download submissions as CSV
  • Download submission attachments

As far as I can see, PyODK currently doesn't support creation of app users and assignment of forms to them, pushing of attachments, or creation of QR codes. I'm not sure if it supports publishing of draft forms.

It seems like an obvious valuable contribution from our side might be too add methods for those tasks into the existing code.

I've already implemented those calls in a primitive fashion here and here. That's very rudimentary code, and written in a functional rather than object-oriented style, but it works, so it can be used as a guide for constructing the necessary endpoint URLs.

from osm-fieldwork.

robsavoye avatar robsavoye commented on September 17, 2024

I also have my own ODK Central API code, initially based on your your code, but objectified and expanded. In addition I wrote an ODK client program, that uses the code in OdkCentral.py to do most of the operations, including the ones mentioned that pyodk doesn't support yet. My assumption is that although pyodk is a very new project (public this week), it will evolve. If the roadmap for pyodk supports what is needed for a CLI, then it's worth investigating it to decide if at some point it would be a better plan to use pyodk than our homegrown code.

from osm-fieldwork.

robsavoye avatar robsavoye commented on September 17, 2024

If was decided that pyodk is still in early development, and doesn't support all the functionality needed for FMTM. Since OdkCentral.py file does implement the needed functionality, it was decided to use our own code to reduce the dependency on an external project.

from osm-fieldwork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.