{ "info": { "author": "Aman Jain", "author_email": "amanjain5221@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Legal Industry", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Topic :: Utilities" ], "description": "# Atarashi\n\n[![Build Status](https://travis-ci.com/fossology/atarashi.svg?branch=master)](https://travis-ci.com/fossology/atarashi)\n\nOpen source software is licensed using open source licenses. There are many\nof open source licenses around and adding to that, open source software\npackages involve sometimes multiple licenses for different files.\n\nAtarashi provides different methods for scanning for license statements in\nopen source software. Unlike existing rule-based approaches - such as the\nNomos license scanner from the FOSSology project - atarashi implements multiple\ntext statistics and information retrieval algorithms.\n\nAnticipated advantages is an improved precision while offering an as easy\nas possible approach to add new license texts or new license references.\n\nAtarashi is designed to work stand-alone and with FOSSology. More info at\nhttp://fossology.github.io/atarashi\n\n### Requirements\n\n- Python >= v3.5\n- pip >= 18.1\n- `code_comments` (See installation bellow)\n\n## Steps for Installation\n\n### Install\n\n#### Install from PyPi\n- Install additional depencency code-comment\n - `pip install code_comment@git+https://github.com/amanjain97/code_comment@master#egg=code_comment`\n- `pip install atarashi`\n\n#### Source install\n- Install additional dependency code-comment\n - `pip install code_comment@git+https://github.com/amanjain97/code_comment@master#egg=code_comment`\n- `pip install .`\n- It will download all dependencies required and trigger build as well.\n- Build will generate 3 new files in your current directory\n 1. `data/Ngram_keywords.json`\n 2. `licenses/.csv`\n 3. `licenses/processedList.csv`\n- These files will be placed to their appropriate places by the install script.\n\n### Installing just dependencies\n\n- `pip install -r requirements.txt`\n\n### Build (optional)\n\n- `$ python3 setup.py build`\n\n## How to run\n\nGet the help by running `atarashi -h` or `atarashi --help`\n\n### Example\n\n- Running **DLD** agent\n\n `atarashi -a DLD /path/to/file.c`\n- Running **wordFrequencySimilarity** agent\n\n `atarashi -a wordFrequencySimilarity /path/to/file.c`\n- Running **tfidf** agent\n - With **Cosine similarity**\n\n `atarashi -a tfidf /path/to/file.c`\n\n `atarashi -a tfidf -s CosineSim /path/to/file.c`\n - With **Score similarity**\n\n `atarashi -a tfidf -s ScoreSim /path/to/file.c`\n- Running **Ngram** agent\n - With **Cosine similarity**\n\n `atarashi -a Ngram /path/to/file.c`\n\n `atarashi -a Ngram -s CosineSim /path/to/file.c`\n - With **Dice similarity**\n\n `atarashi -a Ngram -s DiceSim /path/to/file.c`\n - With **Bigram Cosine similarity**\n\n `atarashi -a Ngram -s BigramCosineSim /path/to/file.c`\n- Running in **verbose** mode\n\n `atarashi -a DLD -v /path/to/file.c`\n- Running with custom CSVs and JSONs\n - Please reffer to the build instructions to get the CSV and JSON\n understandable by atarashi.\n - `atarashi -a DLD -l /path/to/processedList.csv /path/to/file.c`\n - `atarashi -a Ngram -l /path/to/processedList.csv -j /path/to/ngram.json /path/to/file.c`\n\n### Running Docker image\n1. Pull Docker image\n\n `docker pull fossology/atarashi:latest`\n2. Run the image\n\n `docker run --rm -v :/project fossology/atarashi:latest /project/`\n\nSince docker can not access host fs directly, we mount a volume from the\ndirectory containing the files to scan to `/project` in the container. Simply\npass the options and path to the file relative to the mounted path.\n\n### Test\n\n- Run imtihaan (meaning *Exam* in Hindi) with the name of the Agent.\n- eg. `python atarashi/imtihaan.py /path/to/processedList.csv `\n- See `python atarashi/imtihaan.py --help` for more\n\n## Creating Debian packages\n\n- Install dependencies\n```\n# apt-get install python3-setuptools python3-all debhelper\n# pip install stdeb\n```\n- Create Debian packages\n```\n$ python3 setup.py --command-packages=stdeb.command bdist_deb\n```\n- Locate the files under `deb_dist`\n\n## License\n\nSPDX-License-Identifier: GPL-2.0\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License version 2\nas published by the Free Software Foundation.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software Foundation,\nInc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\n## How to generate the documentation using sphinx\n\n1. Go to project directory 'atarashi'.\n2. Install Sphinx and m2r `pip install sphinx m2r` (Since this project is based on python so `pip` is already installed).\n3. Initialise `docs/` directory with `sphinx-quickstart`\n\n ```bash\n mkdir docs\n cd docs/\n sphinx-quickstart\n ```\n - `Root path for the documentation [.]: .`\n - `Separate source and build directories (y/n) [n]: n`\n - `autodoc: automatically insert docstrings from modules (y/n) [n]: y`\n - `intersphinx: link between Sphinx documentation of different projects (y/n) [n]: y`\n - Else use the default option\n4. Setup the `conf.py` and include `README.md`\n - Enable the following lines and change the insert path:\n\n ```python\n import os\n import sys\n sys.path.insert(0, os.path.abspath('../'))\n ```\n - Enable `m2r` to insert `.md` files in Sphinx documentation:\n\n ```python\n [...]\n extensions = [\n ...\n 'm2r',\n ]\n [...]\n source_suffix = ['.rst', '.md']\n ```\n - Include `README.md` by editing `index.rst`\n\n ```rst\n .. toctree::\n [...]\n readme\n\n .. mdinclude:: ../README.md\n ```\n5. Auto-generate the `.rst` files in `docs/source` which will be used to generate documentation\n\n ```bash\n cd docs/\n sphinx-apidoc -o source/ ../atarashi\n ```\n6. `cd docs`\n7. `make html`\n\nThis will generate file in `docs/_build/html`. Go to: index.html\n\nYou can change the theme of the documentation by changing `html_theme` in config.py file in `docs/` folder.\nYou can choose from {'alabaster', 'classic', 'sphinxdoc', 'scrolls', 'agogo', 'traditional', 'nature', 'haiku', 'pyramid', 'bizstyle'}\n[Reference](http://www.sphinx-doc.org/en/master/theming.html)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fossology/atarashi", "keywords": "atarashi,license,license-scanner,oss,oss-compliance", "license": "GPL-2.0-only", "maintainer": "", "maintainer_email": "", "name": "atarashi", "package_url": "https://pypi.org/project/atarashi/", "platform": "", "project_url": "https://pypi.org/project/atarashi/", "project_urls": { "Homepage": "https://github.com/fossology/atarashi" }, "release_url": "https://pypi.org/project/atarashi/0.0.10/", "requires_dist": [ "setuptools (>=39.2.0)", "numpy (>=1.16.0)", "tqdm (>=4.23.4)", "pandas (>=0.23.1)", "scikit-learn (>=0.18.1)", "scipy (>=0.18.1)", "textdistance (>=3.0.3)", "pyxDamerauLevenshtein (>=1.5)", "urllib3 (>=1.24.1)" ], "requires_python": ">=3.5", "summary": "An intelligent license scanner.", "version": "0.0.10" }, "last_serial": 5713454, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "6fe79e5f0511ccb048d6602797d91933", "sha256": "afa3f5420d5a65629b677647f895d192f1c3f92b4e2631d9846855bf6e75eb01" }, "downloads": -1, "filename": "atarashi-0.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "6fe79e5f0511ccb048d6602797d91933", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 11018701, "upload_time": "2019-08-22T06:21:11", "url": "https://files.pythonhosted.org/packages/0d/60/33541db530688e744930b50f8c79d8d48ab9d05e1d61ff99e251aabe4b34/atarashi-0.0.10-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6fe79e5f0511ccb048d6602797d91933", "sha256": "afa3f5420d5a65629b677647f895d192f1c3f92b4e2631d9846855bf6e75eb01" }, "downloads": -1, "filename": "atarashi-0.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "6fe79e5f0511ccb048d6602797d91933", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 11018701, "upload_time": "2019-08-22T06:21:11", "url": "https://files.pythonhosted.org/packages/0d/60/33541db530688e744930b50f8c79d8d48ab9d05e1d61ff99e251aabe4b34/atarashi-0.0.10-py3-none-any.whl" } ] }