List license requirement of a project based on configuration file.
Project description
List license information from package specification file
Conda
For Conda environment:
- Create an environment specification file. Please follow this guide to create this file.
- Edit the file and remove all unnecessary dependencies (very important, otherwise the
it is easy to get inundated with too many packages). For example, remove things like
ipython,ipykernel, which are used for purpose other than the library itself. - Install this package.
- Run:
listcondalic conda environment.yml > output.json
Here environment.yml should be the environment specification file.
The package licence information will be saved at output.json.
Pip
Note: We use liccheck internally to produce the analysis.
- Create your package specification file (e.g.
requirements.txt) including all the packages required. pipreqs is a good helping tool for this as well. - Install this package
- Run:
listcondalic pip requirements.txt > output.json
The package licence information will be saved at output.json.
Existing problems
This packages isn't quite clever yet:
- It tries to skip a few packages such as
python,setuptools,wheelandpip. Hopefully, we won't neglect any important packages. - It only understand very basic package specifications in the conda environment file.
Complicated package sources will likely create bugs in the result. In particular,
it does not suppoprt:
- "." (dot) package, or in general, if you specify a path to a local python package,
this library will not attempt to analyze the packaged located in that folder. Instead,
it will be registered as a package named, e.g. ".", and therefore it will report the
package's licence as
NotFound. - GitHub URL package, for reasons mentioned above.
- "." (dot) package, or in general, if you specify a path to a local python package,
this library will not attempt to analyze the packaged located in that folder. Instead,
it will be registered as a package named, e.g. ".", and therefore it will report the
package's licence as
GitHub action template
For a pip-based requirements.txt:
name: Report licence status
on:
workflow_dispatch:
jobs:
check-using-pip:
name: Report using a pip environment
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install packages and listcondalic
run: |
pip install -r requirements.txt
pip install listcondalic
- name: Produce report
run: listcondalic pip requirements.txt
For a conda produced environment.yml:
name: Report licence status
on:
workflow_dispatch:
jobs:
check-using-conda:
name: Report using a conda environment
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Install conda and prepare the environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: YOUR_ENVIRONMENT_NAME
environment-file: environment.yml
python-version: 3.7
auto-activate-base: false
- name: Install listcondalic
shell: 'bash -l {0}' # this is required by the conda action
run: pip install listcondalic
- name: Produce report
shell: 'bash -l {0}' # this is required by the conda action
run: listcondalic conda environment.yml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file listcondalic-0.1.1.tar.gz.
File metadata
- Download URL: listcondalic-0.1.1.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
193a0ffb7558fa72658e8e3cb229c86abe4b40bb33351ca4ccc9c2158c29ecad
|
|
| MD5 |
fbf6915fa25424132070069bc9636661
|
|
| BLAKE2b-256 |
454cc95fabe199199b405b2b3ba565242e2229ea26a1d68cf48fb6712c0c9fb1
|
File details
Details for the file listcondalic-0.1.1-py3-none-any.whl.
File metadata
- Download URL: listcondalic-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06e886a2a6bb4b4e02ff3d2de147cedf044733330598856f33499ac767f1f3a8
|
|
| MD5 |
fd716d5b0d66fd11b037e73ee05b8a58
|
|
| BLAKE2b-256 |
4b533cf030a9af1c4867364e6ea09c4e37abe3173678625bf347328a976a2b6a
|