GithubHelp home page GithubHelp logo

NID DB validator about vita-headers HOT 10 CLOSED

vitasdk avatar vitasdk commented on July 23, 2024
NID DB validator

from vita-headers.

Comments (10)

d3m3vilurr avatar d3m3vilurr commented on July 23, 2024

actually we need migrator before writing validator.
anyway i want to discuss about json schema.

jsonschema module is non standard extra packages, so someone cannot want to install this.
IMO, db.json format is simple. why we select sledgehammer for this?

from vita-headers.

devnoname120 avatar devnoname120 commented on July 23, 2024

I think that @frangarcj has already built a migrator.

Well, by defining a specification we can define precisely what we expect. If there is something wrong, the validator will tell us exactly what's wrong and where. This should make it more useful than a basic script checking for a few things.

from vita-headers.

d3m3vilurr avatar d3m3vilurr commented on July 23, 2024

I think that @frangarcj has already built a migrator.

ok

Well, by defining a specification we can define precisely what we expect. If there is something wrong, the validator will tell us exactly what's wrong and where. This should make it more useful than a basic script checking for a few things.

actually my word is just asking why we select more dependencies instead minimalism.
really thought you to need schema in db.json?
if our spec is already too complex, in my opinion, that is already wrong.

why we select json? in before, member said it's simple, porting easier, and else, whatever.
i'm one of javascript hater :/
but yeah i agree, json spec is actually nice. but it's just little old.
(this format actually not modified since first introduce)

but json-schema spec is more weird. it defined for define like DTD, and result looks mess.(also like DTD)
(my company have least two diff transpiling format for json-schema, because no body like using this specification)

in before i made quick & dirty script for comparing value of #86
yeah, it's ugly, but we can make clean code.
anyway, i think, current db format looks simple, so we just need looping and value checking.
(actually we still need value duplication checking, isn't it?)

from vita-headers.

d3m3vilurr avatar d3m3vilurr commented on July 23, 2024

my opinion just depend db format, if we will change to more complexly, i don't like personally that changes, but i agree we probably use schema.

so i want to talk just current.

from vita-headers.

devnoname120 avatar devnoname120 commented on July 23, 2024

Hm I agree. This could be kind of overkill, and maybe not worth maintaining.

Anyway I built a rough schema before I saw your answer, so I'll leave it here anyway:
https://gist.github.com/devnoname120/dcef560130a1e3f3dfa109a0fc5b0b2d

from vita-headers.

xyzz avatar xyzz commented on July 23, 2024

#83 (comment)

from vita-headers.

yifanlu avatar yifanlu commented on July 23, 2024

Is this still needed now that we use YAML? Or should this be renamed to "YAML DB validator"?

from vita-headers.

devnoname120 avatar devnoname120 commented on July 23, 2024

No, I'll rename the issue.

I can write a YAML scheme validator if needed, using pykwalify.

from vita-headers.

xyzz avatar xyzz commented on July 23, 2024

I still think it's useless.

from vita-headers.

devnoname120 avatar devnoname120 commented on July 23, 2024

OK, the benefit with this is that we can catch issues earlier and automatically verify pull requests. A simple python script would let go some issues, and I'm not sure it's less hassle to maintain.

from vita-headers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.