Skip to content

Fixed #134 -- Added CLI interface #147

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

Closed
wants to merge 5 commits into from

Conversation

Bouke
Copy link
Contributor

@Bouke Bouke commented Feb 17, 2014

Great work on this library. However I'd really like using the CLI for a quick validation. So I've produced this little CLI tool for validating a JSON document (file) against a JSON schema (file).

@Julian
Copy link
Member

Julian commented Feb 20, 2014

Hey, thanks, sorry I haven't gotten a chance to take a look at this yet, but I do agree it'd be nice to have. I'll try and take a look before the end of the week.

@Julian
Copy link
Member

Julian commented Mar 10, 2014

Sorry it took me this look to look :)

Thanks for submitting this – would you be interested in writing a few small tests for the functionality here, if it's something that we're gonna actually support going forward it'd be nice to make sure it continues to work as we evolve it?

Also I see that you're outputting some non-ASCII characters which are UTF-8. Have a feeling that's going to cause issues for windows users who might want to use this.

And the use of entry_points means that we'd actually now depend on setuptools – in the setup.py currently we fall back to distutils (there hasn't actually been a release that has this yet, it's mostly just here to allow running bdist_wheel without needing to modify the setup.py), so we'd either need to remove that or use a regular binary; I think the latter probably is simpler.

@Bouke
Copy link
Contributor Author

Bouke commented Mar 24, 2014

I've updated the PR to include unit tests and removed the UTF-8 character. I spend the better part of my time figuring out py.test (mostly getting it to not capture output when I wanted to see it and failing to capture output when I wanted to). But I think the tests are quite complete as-is.

I don't see how the issue of entry points can be resolved. I haven't updated myself on the whole wheel movement, maybe you could shine a light? http://wheel.readthedocs.org/en/latest/#setuptools-scripts-handling

@Bouke
Copy link
Contributor Author

Bouke commented Apr 8, 2014

I'll investigate why -h or --help doesn't work as expected.

@Bouke
Copy link
Contributor Author

Bouke commented Apr 13, 2014

The failing test doesn't appear to be related to the changes I've made. What are your thoughts on this PR?

@Julian
Copy link
Member

Julian commented Apr 18, 2014

Hey, cool.

The failing test is because of the move of the StringIO module in Py3. But this looks pretty good, I can merge one day next week and fix it then along with removing entry_points. And yeah, I don't like py.test either, that's why we don't use it really, it's a bit too obtuse for my liking :/.

Thanks!

@Julian
Copy link
Member

Julian commented May 23, 2014

Merged, along with some additional functionality -- Thanks for the patch, appreciated!

@Julian Julian closed this May 23, 2014
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 this pull request may close these issues.

2 participants