-
-
Notifications
You must be signed in to change notification settings - Fork 807
MRG: New schema generator #364
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
Conversation
Chose to go with schemapi for the jsonschema API generator. The package is renamed; I still need to change references in this PR |
OK, this is ready to merge! It's a relatively large change to the code-base, but all previous API tests are passing so I think it's pretty safe. The executive summary of changes is in the description above. @ellisonbg, would you mind taking a look? |
Sure, will have a look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is very nice. Overall, the changes to the code base are very minimal, which is a good sign. I think we should merge and iterate. What version do you think we should release this as?
Let's plan to release as 1.3.0, once #370 is merged as well. I think the addition of mimetype rendering support from master warrants a minor release. Then we can push for a 2.0 release built on vega-lite 2.0 |
Sounds good.
…On Wed, Aug 9, 2017 at 9:42 AM, Jake Vanderplas ***@***.***> wrote:
Let's plan to release as 1.3.0, once #370
<#370> is merged as well. I
think the addition of mimetype rendering support from master warrants a
minor release.
Then we can push for a 2.0 release built on vega-lite 2.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#364 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABr0Dl7nxETL9_wZpQCXI1ziFw382Iqks5sWeFqgaJpZM4OqO8X>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger@calpoly.edu and ellisonbg@gmail.com
|
I'll merge and we can go from there |
This is a rewrite of the core of the altair library, targeting Vega-Lite 1.2, based on the more complete schema parser at http://github.com/altair-viz/schemapi
The reason for this rewrite is that it will make it easier to transition to Vega-Lite 2.0 and other future Vega-Lite versions.
Still TODO
altair_parser
package & update references here (nowschemapi
)altair.schema
ToPython()
visitorBaseObject
,to_altair
)required_traits
rather thanallow_undefined=False
in order to not error on intermediate stepsToCode()
generator to configure charts using methods likemark_point()
.Summary of Changes
The bulk of the code used to generate the Altair API code has been removed from this package, and put in
schemapi
. Note that everything inaltair/schema/_interface
is automatically generated byschemapi
and its extensions intools/generate_schema_interface.py
User-facing API should be identical to current master. This is confirmed by the fact that all existing tests pass
all traitlets objects are now based on the
JSONTraitlets
extensions provided byschemapi
. One big reason for this is that the default value is nowundefined
, and a value ofNone
will be interpreted as an explicitnull
in the JSON output.deprecated
to_altair()
in favor ofto_python()
put all schema API classes in a single file
_interface/schema.py
, rather than separating them out into individual filesskip
changed to_skip_on_export
Addition of
_required_traits
; an error will be raised if these traits are undefined at export.change Travis doc build to use Python 3.x, as there was a unicode error somewhere in sphinx for 2.x (tried debugging for an hour or so, but didn't make any progress)