Git Product home page Git Product logo

Comments (5)

hello-adam avatar hello-adam commented on June 15, 2024

I'm so sorry, I missed this!

  • In the JSON file, when I put "decimal" or "integer" type for my parameter, it doesn't change anything, in the both cases it's an integer, is it normal ? Do i miss something ?

It looks like it will make an integer spinbox in both cases, which is not the intended behavior. I think I'll be able to address this soon.

  • Can we put negative values in our integer field ? And so, can we precise a maximum and a minimum value in the JSON file for a specific parameter ?

Yes, right now it looks like it defaults to 0-0x7fffffff (e.g. spinBox->setRange(0, 0x7fffffff);), but if you add "min" and/or "max" parameters you can get around that. For example, here's a power spectral density display plugin config I've been messing around with

{
    "name": "PyPSD",
    "description": "Python Power Spectral Density display using matplotlib",
    "tags": ["Python"],
    "script": "plugin.py",
    "type": "display",
    "extra_paths": [],
    "render_config": {
        "asynchronous": true,
        "hide_bit_offset_controls": true
    },
    "parameters": [
        {
            "name": "FFT Size",
            "type": "integer",
            "min": 16,
            "max": 32768
        },
        {
            "name": "FFT Number",
            "type": "integer",
            "min": 1
        },
        {
            "name": "Sample Frequency (Hz)",
            "type": "integer",
            "min": 1
        }
    ]
}

  • When I try to add a boolean parameter in my JSON file and execute my plugin in Hobbits, I've always this error :
"Operator Plugin Error: Plugin 'test' reported an error with its processing: Other errors:
Failed to parse arg 4"
(here the arg 4 is of course my boolean, if i put more parameters, it will say 'arg 5' or 'arg 6')

Yes this is another bug in the configuration interface.

Thank you for reporting these! I think I wrote the documentation aspirationally and then never finished implementing stuff. I can try to get quick fixes for these soon.

from hobbits.

hello-adam avatar hello-adam commented on June 15, 2024

I think cef1055 fixes the bugs mentioned here, but I'm going to wait until I update the documentation and maybe do a little more improvement/validation before pushing a release. The release should come this weekend or next week.

from hobbits.

Pagalom avatar Pagalom commented on June 15, 2024

I just saw your answers, tanks a lot ! It will help.

from hobbits.

hello-adam avatar hello-adam commented on June 15, 2024

Alright, the fixes and additions should all be in 0.47.0

Let me know if anything else goes wrong or if you have any ideas about the python plugin interface.

from hobbits.

Pagalom avatar Pagalom commented on June 15, 2024

Thanks à lot ! I'll try it soon and keep you up to date

from hobbits.

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.