Giter VIP home page Giter VIP logo

confugue's Introduction

👋 Hi there, I'm Ondřej!

My projects

NoPdb Groove2Groove Self-supervised VQ-VAE HTML MIDI Player TonnetzViz Confugue

Also my projects

Contact me

Find me on Mastodon, Twitter, use this contact form or contact me the GitHub way!

confugue's People

Contributors

cifkao avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jeffamaxey

confugue's Issues

Configurable inheritance

The @configurable decorator should check whether the callable has already been decorated (e.g. because it is a subclass of a decorated class) and if yes, make sure that the new settings are consistent with the old ones. In particular, maybe the new params should be added to the existing list instead of overriding it (unless the subclass overrides __init__...?).

Add from_yaml and from_yaml_file to decorated callable

The from_yaml and from_yaml_file class methods could be added to the @configurable-decorated callable (as a shortcut for creating a Configuration object). It should be possible for a decorated class to override them or to opt out.

Support dot notation

Support cfg['a.b.c'] as syntactic sugar for cfg['a']['b']['c'], and similarly cfg.get('a.b.c').

Also consider supporting list indices, e.g. cfg['a[0].b'] for cfg['a'][0]['b'].

Consider what to do about keys that contain dots and/or square brackets. I don't know if I like the idea of forbidding them altogether. Currently there is no restriction on what keys can be (they don't even need to be strings) and I'm not sure having this feature is worth breaking that.

Configurable methods

Add @configurable.method(key), which will be configured from self._cfg[key] by default (i.e. when called directly). It should also be configurable normally, i.e. via Configuration.configure(obj.method) (this should already work whether or not the method is decorated with @configurable).

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.