Giter VIP home page Giter VIP logo

nexb / aboutcode-toolkit Goto Github PK

View Code? Open in Web Editor NEW
90.0 90.0 42.0 28.82 MB

:white_check_mark: AboutCode Toolkit provides a simple way to document provenance metadata (origin and license) about third-party code that you use in your project: it includes utilities to generate inventory/BOM or Attribution documentation.

HTML 19.68% Python 77.13% Batchfile 1.26% Shell 1.48% Dockerfile 0.19% Makefile 0.26%

aboutcode-toolkit's People

Contributors

agustinhenze avatar arijitde92 avatar armintaenzertng avatar arnav-mandal1234 avatar ayansinhamahapatra avatar chinyeungli avatar ddmesh avatar dennisclark avatar dependabot[bot] avatar farialima avatar hesa avatar jdaguil avatar johnmhoran avatar jonoyang avatar keshav-space avatar maxbrito avatar mjherzog avatar orientalperil avatar pombredanne avatar silverhook avatar srthkdb avatar steven-esser avatar swastkk avatar tardyp avatar tdruez avatar tg1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aboutcode-toolkit's Issues

Create an output file error.txt when generating attribution

When creating attribution, an error log should be created containing the warnings and errors
For example:
Mandatory fields are missing from the .ABOUT files.
The error log would show which components are missing the mandatory fields and specifically which mandatory fields are missing.

Define how we are packaging ABOUT

For now a simple .py script is best.
Later we need to have extra libs and the single file approach will no longer work.
We need to pick what packaging works knowing that target users may not be python developers. Some possibilities include:

  • sdist on Pypi for Python developers. see #4
  • pyz zip for general usage that requires a Python installation
  • py2exe, pyinstaller or similar for Windows/Mac/Linux that could work without a Python installed

Should ABOUT be system-wide installed? with man pages? as .deb or .rpm packages?

Do not check format if field is null

('download_url', '', 'This optional field has no value.'),('download_url', '', 'URL is either not in a valid format, or it is not reachable.')

If a field doesn't contains any value, we should not check for format.

genabout.py : bug for the --action 1

1 - Overwrites the current ABOUT field value if existed

The current behavior is kinda like replace the whole ABOUT file.

For instance,
if my ABOUT file already have a version value but my input csv doesn't have any value in the version column, the version field value will be removed which is not correct.

genabout.py : "Update" the ABOUT file if ABOUT file already exist and have different context.

The current design is to do nothing if the ABOUT file exist.

The tool should be able to look into the ABOUT file to see if there is anything that need to be updated if the ABOUT file exist.

Provide options, such as:

  1. overwrite the current field value
  2. keep the current field value and only add the "new" field and field value
  3. replace the ABOUT file with the current generation

In addition, if no option is set, the tool will not touch the ABOUT file and prompt "ABOUT file already existed."

Generate attribution

Given ABOUT files or a list of ABOUT files in a CSV and a base directory, I want to generate an attribution notice for all these components:

  • supported output should be text and HTML
  • the output should be based on a template. Mustache or Jinja2 are a good candidates
  • for this to work, there need to be some mandatory fields present

Generate attribution from an input list

Generate attribution from ABOUT files for a specific list of components. User should be able to pass a list of components they would specifically like to generate attribution for.

In other words, from a given set of about files and an input list (that contains component names which map to about file field "name") be able to generate attribution.

Pass as an option a list of fields that are mandatory

I would like to have a configurable command line option to pass a list of fields considered as mandatory overriding the basics... This is important because for a certain usage certain fields will be needed. For instance generating attribution or redistribution requires certain fields to be set which may be otherwise considered as optional.

Generate an ABOUT "Scorecard"

If an engineering organization were to take up using ABOUT in a serious, ongoing way, it probably would be very helpful to provide a tool/utility that would generate a "scorecard" on a target codebase directory. Some of the scorecard points would include:

Percentage/counts of the directories that (1) have no ABOUT info, (2) have some ABOUT info, (3) appear to be fully-documented in ABOUT.

The value of this would be that as new code is checked into a codebase, the scorecard could help determine if it's time to review the ABOUT files.

The scorecard tool might also identify potentially obsolete ABOUT files, where the date (timestamp) on the ABOUT file is older (by a number of days, perhaps parameter-driven) that the file/directory that it describes.

Extract license text from a license_url

The tool should be able to extract the license text based on the user license_url provided in the ABOUT file and save the license text in the user specific directory.

Collect redistributable sources

Given a directory with ABOUT files OR a csv and directory as an input, I want to collect all the source code archives that have the redistribute flag set , and bundle all these in a zip or tar

Problem if I use '..' in the project input

For instance,
if I run it like the following:
$ python about.py ../about-code-tool/testdata/ /cygdrive/z/tmp/t2.csv

The output of the about_file is
../about-code-tool/testdata/

which is incorrect.

generate ABOUT files from a CSV

user should be able to generate ABOUT files from a CSV as an input

Current proposals:

A. An interactive prompt.

For instance, user only needs to type

python about.py
Then the script will prompt:

  1. Collect ABOUT files context
  2. Generate ABOUT files
  3. Exit
    Select:
    something like the above, and the ask for input/output and all kind of options.

B. Create another script, maybe, called generate_about_file.py

Verbosity option for about.py

It would be nice to offer the possibility to log the warnings and errors in the stdout.

Probably a new option "--verbosity"

0 is default
1 is errors
2 is errors + warnings
So I can see the issues in my terminal without having to open the output file as I'm fixing the 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.