GithubHelp home page GithubHelp logo

Comments (5)

desultory avatar desultory commented on August 26, 2024

It looks like default options from the command line overwrite config options:

kmod_autodetect_lspci = true
kmod_autodetect_lsmod = true

When we call:

$ ugrd
...
Importing argument 'kmod_autodetect_lspci' with value: False
Importing argument 'kmod_autodetect_lsmod' with value: False
...

Thanks for pointing this out, the command line options have been changed in a recent version and I think I missed this. I may just revert it to the old style, but this gets a bit tricky because the defaults for a lot of things from the "main" function are "False", and I can't just discard False values, because you should be able to toggle things off, and command line parameters should be the final determining factor. I think I may just make it check if the value isn't the default, and if it is, it will pass it to the generator.

from ugrd.

evdenis avatar evdenis commented on August 26, 2024

Is it possible to set command line variable to 'None' by default and set them to True or False only in case --lspci or --no-lspci is used? This way it will be possible to overwrite config values in case cli lspci != None.

from ugrd.

desultory avatar desultory commented on August 26, 2024

Is it possible to set command line variable to 'None' by default and set them to True or False only in case --lspci or --no-lspci is used? This way it will be possible to overwrite config values in case cli lspci != None.

Maybe, I'm currently using argparser, and a bit of wrapping done here: https://github.com/desultory/zenlib/blob/main/src/zenlib/util/main_funcs.py

The tricky bit is the "no-" options. the result is that both args write to the same variable. It was designed so that you could use the no- option to quickly disable things that were enabled in your config, or the opposite.

I'm thinking I may need to create some map of defaults and make it not return kwargs if there is no deviation.

from ugrd.

desultory avatar desultory commented on August 26, 2024

I've updated zenlib and ugrd to hopefully fix this, I tested and it seems to work.

from ugrd.

evdenis avatar evdenis commented on August 26, 2024

Thanks!

from ugrd.

Related Issues (16)

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.