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

Still Maintained? #21

Open
Marviel opened this issue Jul 30, 2018 · 4 comments
Open

Still Maintained? #21

Marviel opened this issue Jul 30, 2018 · 4 comments

Comments

@Marviel
Copy link

Marviel commented Jul 30, 2018

Hey Mechrophile -- sweet project!

I notice that the library hasn't been updated in around 2 years as of the writing of this post.

Is this because it's still feature-perfect? Or is this library in a more volatile state?

Haven't dug in, but loving the ability to both validate/coerce simultaneously, so I'm hoping it's the former 😄

@Defunctionalize
Copy link
Owner

Defunctionalize commented Jul 30, 2018 via email

@jjtolton
Copy link
Contributor

jjtolton commented Jul 30, 2018 via email

@Defunctionalize
Copy link
Owner

Is this because it's still feature-perfect? Or is this library in a more volatile state?

The answer is "more or less both. kind of." I'll bashfully admit that I've been working in Clojure professionally for a while, and I have left schemagic in its pre 1.0 state. If I were to update this library to 1.0 there are a couple things that I would do.

  1. Possibly split schemagic.web into its own library (thats a feature set that should be independently versioned, and it's conceivable that it needs to be updated to keep pace with new flask versions)
  2. do some benchmarking to provide some stats about what application load it supports
  3. give the code some exercise on newer python versions to make sure everything is copacetic.

That said, the data structure validation and coercion code is very stable for the web case and certainly fast enough for normal data volume. It's using a simple recursive "coerce everything in this data structure and if any of the coercions fail, fail the validation" strategy that doesn't rely on any volatile assumptions. The core code was designed to have an extremely small footprint and it should therefore be pretty easy to track down any problems that arise.

Thanks much for reaching out, Luke! This message has got me interested in shaking out the cobwebs on schemagic

@Marviel
Copy link
Author

Marviel commented Jul 31, 2018

@Mechrophile thanks for the detailed response!

At this point we're looking into cerberus, because even though it's buried in the docs they have coercion.

What I don't like about that library is that it requires the schema definition to be super verbose, even in cases where you don't take advantage of the ability to specify things like "max", "min", and other optional parameters for more detailed validation.

What would be super optimal is the simplicity of this repo, mixed with the optional configurabilty of cerberus (tons of detailed built-in validators, optional key-value options, Python 2/3 support, etc). Basically -- don't require super-verbose schema unless the user is going to take advantage of that.

I know that's probably outside the scope of what can be easily captured within a single, neat recursive call, though 😬

On the other side of things, it appears that with so many users Cerberus is probably stuck with its current verbose style, without the abilty to add in much syntactic sugar (i.e. lists can be represented with [..] and not {"type": "list"}.... etc.

Anyway -- just dumping my thoughts on the topic here, should you be interested in re-thinking this library to be even more awesome than it currently is. :)

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

No branches or pull requests

3 participants