-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add ODK Validate 1.5.0 jar. #116
Conversation
ba36026
to
8fa6e90
Compare
8fa6e90
to
7479d0d
Compare
The problem was that because I had already installed
I'm not very familiar with running scripts in modules in this way. What's the right approach? |
I don't know if this is the same issue. My notes on the jar are in
pyxform/#63. To see what I mean there, compare the archive structure of the
146 jar to the previous. In my fork of Validate, there is an AppVeyor build
script + other updates, to show how the jar I pushed to pyxform was built.
On 1 Jun. 2017 8:26 am, "Hélène Martin" <notifications@github.com> wrote:
The problem was that because I had already installed pyxform through pip,
that was being used. Now I've uninstalled through pip and when I run python
pyxform/xls2xform.py path_to_XLSForm output_path as recommended by the
README, I get
File "pyxform/xls2xform.py", line 7, in <module>
from pyxform import xls2json, builder
ImportError: No module named pyxform
I'm not very familiar with running scripts in modules in this way. What's
the right approach?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#116 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGDSNayVYWKXIxJVkdmyHxCD82a3Prwuks5r_ekmgaJpZM4NsCEw>
.
|
Thank you, @lindsay-stevens! That extra background is very helpful and it's good to know I should verify this on Windows. My broader problem now is just that I can't figure out how to run |
Did you try using the module arg? E.g.
python -m pyxform/xls2xform path
See https://docs.python.org/3/using/cmdline.html
…On 1 Jun. 2017 11:25 am, "Hélène Martin" ***@***.***> wrote:
Thank you, @lindsay-stevens <https://github.com/lindsay-stevens>! That
extra background is very helpful and it's good to know I should verify this
on Windows.
My broader problem now is just that I can't figure out how to run
xls2xform.py 😖. Any advice on that appreciated.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#116 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGDSNSrBOhDEsye9ies81_NBZ2ZYjsWxks5r_hMigaJpZM4NsCEw>
.
|
@lognaturel , to run local code, you should uninstall the
That last shortcut is available because of the entry point in And later, you can leave the virtualenv with
|
Thank you @dorey, @lindsay-stevens. I'll update the readme. I can confirm that this updated jar works with OS X and Linux. Does one of you have a Windows machine/VM handy that you could quickly verify on? |
Question for @lognaturel: What process went into making this I ask because it would be nice if we could either verify a checksum with a trusted source or compile the JAR locally when the package is installed so that we don't have to approve or disapprove binary files from new contributors. (edit: This is described in #64 ) (also, no access to a windows VM here. sorry!) |
Good idea, @dorey! This is the jar that is now available on the ODK website and there's a checksum there you should be able to verify. If this doesn't work on Windows, we should figure out what needs to be changed in the packaging process and document it on the Validate side so that we can always use the official jar/source. |
I suggest using AppVeyor. It's Travis, but for Windows. Here's an example
config, to run a test suite and build a pyinstaller exe.
https://github.com/lindsay-stevens/odk_tools/blob/master/appveyor.yml
That repo/project was the reason for my pyxform PR so it might be
interesting to browse otherwise.
…On 2 Jun. 2017 4:48 am, "Hélène Martin" ***@***.***> wrote:
Good idea, @dorey <https://github.com/dorey>! This is the jar that is now
available on the ODK website
<https://opendatakit.org/downloads/download-info/odk-validate-2/> and
there's a checksum there you should be able to verify.
If this doesn't work on Windows, we should figure out what needs to be
changed in the packaging process and document it on the Validate side so
that we can always use the official jar.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#116 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGDSNaxfA4XIxBcTHBqXogPoXH6x8h13ks5r_wdegaJpZM4NsCEw>
.
|
I'll investigate getting set up AppVeyor. In the mean time, I have verified that this works with Windows 10, Python 2.7.13. If we think that's a sufficient verification, it should be ready to merge. |
Cool, I have created an issue for Appveyor #124, might take a stub later today since I linked the repo with the CI already. |
Closes #114. Confirmed working on macOS, Linux and Windows 10.
I have verified that I can run this jar from where it is withjava -jar ODK_Validate.jar
. The UI shows the version as 1.5.0 and a form such as contains_starts-with_ends-with.txt that uses new XPath functions validates. I can also run Validate through the CLI and get the same results.However, if I run
python ./xls2xform.py
on the corresponding XLSForm -contains_starts-with_ends-with.xlsx - I get the same ODK Validate errors as I got with the old jar. Interestingly, if I then run this same jar on the resulting xml file, it validates as expected.
When I run
nosetests
, I get the same behavior as on master. 117 passes but there isusage: nosetests [-h] [--json] [--skip_validate] path_to_XLSForm output_path nosetests: error: too few arguments
printed part way through.Is there something special that needs to be done to update the jar? Paging @lindsay-stevens because I see you were the last to do this update and had to fix some previous issues.