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

start-geopoint fails ODK Validate validation because of stub setgeopoint implementation #351

Closed
lognaturel opened this issue Aug 12, 2019 · 3 comments · Fixed by #359
Closed

Comments

@lognaturel
Copy link
Contributor

#341 adds support for start-geopoint. The XForms output that is generated is what is described in the spec and works in e.g. Collect. However, it fails Validate because JavaRosa's stub implementation of the setgeopoint action provides a string that then is attempted to cast to a geopoint.

I'm not sure whether to address this at the JavaRosa or Validate level. Either way, I think we'd need to supply a bogus value in geopoint format rather than an arbitrary string. Filing this here so we know there's still work to do on that front.

CC @yanokwa

@lognaturel
Copy link
Contributor Author

lognaturel commented Sep 6, 2019

A little retrospection:

I think we need to make sure to actually try a sample form and/or make sure to run the tests with Validate on.

The reason for the issue:

  • JavaRosa can't provide location information directly so it includes a stub for the setgeopoint action that writes the text "no implementation" when triggered.
  • My sample form includes a start-geopoint meant to set the value of a node of type geopoint.
  • Validate runs through the form as though it were being filled. I keep forgetting this. In this case, it means the action is triggered.
  • When JR tries to set "no implementation" as the value of the node of type geopoint, there's a casting crash.

I've gone back and forth on where to fix this. I'm going to do a Validate change for now and we can always adjust if needed.

@yanokwa
Copy link
Contributor

yanokwa commented Sep 9, 2019

I'm trying to think of a more systemic way for us to catch this class of problem. @ukanga would it be crazy to change all (most?) pyxforms tests to run through Validate.

@lognaturel
Copy link
Contributor Author

would it be crazy to change all (most?) pyxforms tests to run through Validate.

I think it would take too long to run and not be valuable in most cases. As reviewers, I think we need to remember check when a Validate check should be required.

How about adding it to the PR template so that both the submitter and the reviewer get a reminder?

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

Successfully merging a pull request may close this issue.

2 participants