Giter Site home page Giter Site logo

Comments (1)

cdsre avatar cdsre commented on June 11, 2024

Followed the steps to reproduce this. Running an interactive shell in the container and editing the info.py to give output of the extension its processing it seems that chaostoolkit-addons doesnt have a licence string set.

/home/svc # chaos info extensions
NAME                                    VERSION   LICENSE                       DESCRIPTION                                       
#####################
ExtensionInfo(name='chaostoolkit-reliably', version='0.75.0', summary='Reliably CLI', license='Apache-2.0', author=None, url=None)
chaostoolkit-reliably                   0.75.0    Apache-2.0                    Reliably CLI
#####################
ExtensionInfo(name='chaostoolkit-addons', version='0.9.0', summary='Addons for your Chaos Toolkit experiments', license=None, author='Chaos Toolkit', url='https://chaostoolkit.org')
Traceback (most recent call last):

The info file is iterating over the extensions and wants to print a summary table that includes the licence type

        extensions = list_extensions()
        for extension in extensions:
            summary = extension.summary.replace(
                "Chaos Toolkit Extension for ", ""
            )[:50]
            click.echo(
                fmt.format(
                    extension.name,
                    extension.version,
                    extension.license,
                    summary,
                )
            )

I have only started learning chaostoolkit in the last few days so I am not sure if it is mandatory for all addons to provide a licence type or not. However if its not mandatory then something like the following in info.py could be used to create the string when the type is None.

            click.echo(                             
                fmt.format(              
                    extension.name, 
                    extension.version,
                    extension.license or "NONE",
                    summary,
                )
            )

OUTPUT

/home/svc # chaos info extensions
NAME                                    VERSION   LICENSE                       DESCRIPTION                                       
chaostoolkit-reliably                   0.75.0    Apache-2.0                    Reliably CLI                                      
chaostoolkit-addons                     0.9.0     NONE                          Addons for your Chaos Toolkit experiments

Alternatively if licence is a mandatory field for extensions then I would suggest the code should not load extensions when extensions = list_extensions() is called and in the chaoslib info.py it should only append after validating mandatory fields.

The more intermediate fix for this would be to update the chaostoolkit-addons project to export the licence like the chaostoolkit-reliably project does for example.

from chaostoolkit.

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.