Began work on Python survey creation

Last week, I met with Emma and Presley to discuss some of the desired behavior and features of the Python library, as well as the general status of SurveyMan. In terms of the Python library, the linguists want it to eventually provide R integration.

After Monday’s meeting, I started working on a simple Python surface representation for creating survey objects.  My current approach is to design a general skeleton of what the user sees, and to deal with any issues/scaling when they become relevant. Emma and I discussed two options for how a user of the library could create surveys; they could write a script to statically create the survey using the Python library, or I could write a repl that the user would interact with to define the survey components. I will address the issue of creating the survey once I have the survey component objects implemented.

I first created a simple outline of the behavior and attributes of Survey, Question, and Option objects, based on the previous Python and Java implementations. I began a code skeleton based on this outline, which I recently pushed to my repository on GitHub. After pushing, I attempted to implement some of the behavior, which lead to my changing the skeleton a bit. I added a new class called idGenerator meant to generate unique ids for the components, but I’m not sure it’s the right way to go about generating ids; I’m trying to figure out how to make it a static/singleton class so that there is just one instance which keeps track of which ids it has already assigned to components. I will post an update and maybe push again once I figure this issue out and have more of the functions implemented.

UPDATE: I have the id generator working, and have most of the functions implemented. I’m currently creating simply question, option, and survey objects to test that everything works properly so far. Pushing the current version to my repo.

Leave a Reply

Your email address will not be published. Required fields are marked *