Coder Social home page Coder Social logo

clipython's Introduction

CLI Support for Python

License Python Version PyPI Static checks Unit tests

Python library to read and write Component License Information (CLI) files. They can be created by FOSSology and stored in SW360.

For more information about the CLI file format, please have a look at ComponentLicenseInformation.md.

Usage

Installation

This project is available as Python package on PyPi.org.
Install cli_support and required dependencies:

pip install cli_support

Required Packages

  • none

Using the API

  • Start using the API:

    import cli_support
    clifile = cli_support.CLI.CliFile()
    clifile.read_from_file("cli_filename")

Contribute

  • All contributions in form of bug reports, feature requests or merge requests are welcome!
  • Please use proper docstrings to document functions and classes.
  • Extend the testsuite poetry run pytest with the new functions/classes

Build

Building Python package

For building the library, you need Poetry. Build is then simply triggered using

poetry build

This creates the source and wheel files in dist/ subdirectory -- which can then be uploaded or installed locally using pip.

Test

Start the complete test suite or a specific test case (and generate coverage report):

poetry run pytest

or

poetry run coverage run -m pytest
poetry run coverage report -m --omit "*/site-packages/*.py"
poetry run coverage html --omit "*/site-packages/*.py"

Demo

The script show_licenses.py shows how to use the library to retrieve some information of a given CLI file.

python ./show_licenses.py ./test/testfiles/CLIXML_MIT_simple.xml

License

Copyright 2019-2024 Siemens

The project is licensed under the MIT license.
SPDX-License-Identifier: MIT

clipython's People

Contributors

gernot-h avatar kianmeng avatar t-graf avatar thsetz avatar tngraf avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kianmeng

clipython's Issues

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.