fossology / atarashi

Atarashi scans for license statements in open source software, focusing on text statistics. Designed to work stand-alone and with FOSSology.
http://fossology.github.io/atarashi
GNU General Public License v2.0
26 stars 23 forks source link
fossology information-retrieval license license-scan text-processing

Atarashi

Build Status

Open source software is licensed using open source licenses. There are many of open source licenses around and adding to that, open source software packages involve sometimes multiple licenses for different files.

Atarashi provides different methods for scanning for license statements in open source software. Unlike existing rule-based approaches - such as the Nomos license scanner from the FOSSology project - atarashi implements multiple text statistics and information retrieval algorithms.

Anticipated advantages is an improved precision while offering an as easy as possible approach to add new license texts or new license references.

Atarashi is designed to work stand-alone and with FOSSology. More info at https://fossology.github.io/atarashi

Requirements

Steps for Installation

Install

Install from PyPi

Source install

Installing just dependencies

Build (optional)

How to run

Get the help by running atarashi -h or atarashi --help

Example

Running Docker image

  1. Pull Docker image

    docker pull fossology/atarashi:latest

  2. Run the image

    docker run --rm -v <path/to/scan>:/project fossology/atarashi:latest <options> /project/<path/to/file>

Since docker can not access host fs directly, we mount a volume from the directory containing the files to scan to /project in the container. Simply pass the options and path to the file relative to the mounted path.

Test

Creating Debian packages

License

SPDX-License-Identifier: GPL-2.0

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

How to generate the documentation using sphinx

  1. Go to project directory 'atarashi'.
  2. Install Sphinx and m2r pip install sphinx m2r (Since this project is based on python so pip is already installed).
  3. Initialise docs/ directory with sphinx-quickstart

    mkdir docs
    cd docs/
    sphinx-quickstart
    • Root path for the documentation [.]: .
    • Separate source and build directories (y/n) [n]: n
    • autodoc: automatically insert docstrings from modules (y/n) [n]: y
    • intersphinx: link between Sphinx documentation of different projects (y/n) [n]: y
    • Else use the default option
  4. Setup the conf.py and include README.md

    • Enable the following lines and change the insert path:

      import os
      import sys
      sys.path.insert(0, os.path.abspath('../'))
    • Enable m2r to insert .md files in Sphinx documentation:

      [...]
      extensions = [
        ...
        'm2r',
      ]
      [...]
      source_suffix = ['.rst', '.md']
    • Include README.md by editing index.rst

      .. toctree::
          [...]
          readme
      
      .. mdinclude:: ../README.md
  5. Auto-generate the .rst files in docs/source which will be used to generate documentation

    cd docs/
    sphinx-apidoc -o source/ ../atarashi
  6. cd docs
  7. make html

This will generate file in docs/_build/html. Go to: index.html

You can change the theme of the documentation by changing html_theme in config.py file in docs/ folder. You can choose from {'alabaster', 'classic', 'sphinxdoc', 'scrolls', 'agogo', 'traditional', 'nature', 'haiku', 'pyramid', 'bizstyle'} Reference