Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gonzalo Díaz-Tendero Izquierdo
    @gonditeniz
    Do you see any problem due to licensing?
    Grokzen
    @Grokzen
    No ofc not :]
    the license is almost as open as possible https://tldrlegal.com/license/mit-license
    You can basiccly do almost what you want with the code
    Grokzen
    @Grokzen
    If i would have a more restricted license i would have used Apache 2.0 or BSD license i think
    Gonzalo Díaz-Tendero Izquierdo
    @gonditeniz
    Ok, then :)
    Since I will continue using it. How should I proceed if I found any other bugs?
    Should I open an issue for tracking it (independently if I solve ir or not)?
    Grokzen
    @Grokzen
    @gonditeniz Yes, it would be best if you opened a issue ticket with the problem, describing it in detail and then if you want to solve it yourself just open a PR with the fix and say it fixes the following issue...
    Karol Tomala
    @ktomala
    Hello Grokzen. I'd like to ask you if it is possible to make self-referential include in schema definition.
    I'd like to do something like this:

    schema;locschema:
    type: seq
    sequence:

      - type: map
        mapping:
          location:
            type: map
            mapping:
              name:
                type: str
          directives:
            type: map
            matching-rule: 'any'
            mapping:
              regex;(.+):
                type: str
          locations:
            include: locschema
            required: false

    type: map
    mapping:
    locations:
    include: locschema

    Karol Tomala
    @ktomala
    Nevermind, it seems it is possible.
    Grokzen
    @Grokzen
    @ktomala Hi, you do not need any more help with your question?
    I do hope that what you are asking for is possible to do because the defenition of a schema is loaded directly but the include is layz loaded during runtime and then it should work with recursive schema
    Karol Tomala
    @ktomala
    @Grokzen Yeah. It works. Thanks for interest.
    Justin Lecher
    @jlec
    hi, the build status icons on https://pypi.python.org/pypi/pykwalify are broken
    Justin Lecher
    @jlec
    @Grokzen Just added pykwalify to the main Gentoo Linux package repo
    Grokzen
    @Grokzen
    Aint the status icon a problem on pypi side?
    Cool that you put it onto gentoo, thanks :)
    Do you have some
    @jlec do you havet som link or something that can be viewed about the gentoo package?
    Justin Lecher
    @jlec
    @Grokzen hi, which type of page are you looking for?
    We have the gitweb for the raw package file, we have an official and a nicer unofficial package DB site.
    the package DBs aren't updated yet, so it will need some time until it appears there
    Mickaël Falck
    @lastmikoi
    Hi @Grokzen, I stumbled upon your project while searching for a way of having strict schema for my yaml-based data (I'm using YAML files to configure a Puppet-based product I'm working on), and I was wondering if you knew about any tool, ideally using pykwalify, to do schema migrations (like alembic allows for SQLAlchemy-based schemas)
    Grokzen
    @Grokzen
    @lastmikoi No i do not know about any tool that can do that kind of migrations
    I only use pykwalify for validating schemas that is either manually created by humans to ensure that they do nothing wrong, or very simple automated datas structures created by code in a "unit test" kind of a way to ensure that noone has broken any features or broken code
    I have never seen anyone that uses a migration for json/yaml config files or other kinds of data structures
    it usually only makes sense to have it in scenarios like SQL
    Grokzen
    @Grokzen
    It would be a really cool idea and tool to build to have a generic data manipulation lib, but i am not sure on how the spec for the migration would really work
    Mickaël Falck
    @lastmikoi
    Indeed, I have no idea how it could work out. I guess I'm merely trying to find a way of automating the edition of YAML files (i.e. moving from a sequence to a mapping with generated keys for a given data, to reflect a change in "API") with the kind of incremental changes that alembic allows for SQL
    (For context's sakes: my Puppet-based product is configured through YAML, and said product is currently in ~50 separated forks all stemming from the same upstream. Being able to make incremental, automated and "atomic"(?) changes to the schema would be a huge simplification over my maintenance work)
    Grokzen
    @Grokzen
    @/all Release 1.5.2 uploaded to pypi
    Grokzen
    @Grokzen
    @/all Release 1.6.0 now uploaded to pypi
    Marco Marzetti
    @lamehost
    hello, is it possible to extend partial schemas?
    Something like:
    schema;foo:
      type: map
      mapping:
        "bar": any
    
    include: foo
        "foobar": 
          type: any
    expected result is
    schema;foo:
      type: map
      mapping:
        "bar":
          type: any
        "foobar": 
          type: any
    Grokzen
    @Grokzen
    @lamehost hi, sorry for not responding earlier.
    no it is not possible to just replace at the current place where the include is used
    Grokzen
    @Grokzen
    The system is not really designed to work in this way and it will not be extended to work in this way
    Julian Ospald
    @hasufell

    how do you express "this can be a sequence of strings", as in:

    values:
      - "Foo"
      - "Bar"

    "or just a string"

    values: "Baz"
    Vipul Gaur
    @pksvv
    Hi - we are trying to install pykwalify in our on-prem cloud where pyyaml is quarantined
    however, when I try installing pykwalify[ruamel] it still tries to install pyyaml behind the scene
    can you let know if this can be possible
    Mattias Bengtsson
    @mattiasb
    Hi all!
    Grokzen/pykwalify#144 hints at you being able to set defaults for scalar values. How does that work? Is it possible to get out the the data structure representation of the YAML after validation?
    My guess is that PyKwalify will fill in the defaults if the scalars are not set right? Which means that I'd need to get at that actual dict.
    mattiasb @mattiasb reads the pykwalify code a lot to find out stuff, would love more API documentation (but I understand how spare time projects work ♥)
    Mattias Bengtsson
    @mattiasb
    For anyone else reading, the resulting structure is returned from core.validate and the defaults are filled in.