Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
1562549
Initial commit
steven-esser Sep 22, 2020
85d1780
Add initial skeleton files
steven-esser Sep 22, 2020
aa71e06
Use pytest-xdist by default for threading support
steven-esser Sep 22, 2020
774dc7d
Add additional files
steven-esser Sep 23, 2020
9a56b88
Follow modern python packaging and conf practices
steven-esser Sep 25, 2020
565feee
Add some minimal documentation
steven-esser Sep 25, 2020
5febefb
Fix hanging tag chars in setup.cfg
steven-esser Sep 29, 2020
343ff29
Update README instructions with proper git merge conventions
steven-esser Sep 30, 2020
fa55f68
Add minimal .travis.yml CI config file
steven-esser Oct 16, 2020
3296b9f
Update setuptools_scm declaration
steven-esser Oct 22, 2020
ad02f4e
Merge pull request #1 from nexB/add-initial-skeleton-files
steven-esser Oct 22, 2020
083bd04
Add azure pipeline config files and templates
JonoYang Oct 26, 2020
847564e
Fix path to Scripts directory
JonoYang Oct 27, 2020
0f293cb
Install current project in configure.bat
JonoYang Oct 27, 2020
63f6946
Call pytest from proper location
JonoYang Oct 27, 2020
7fd2506
Use newer VM images on Azure
JonoYang Oct 27, 2020
bceb8f9
Add .gitattributes
JonoYang Oct 29, 2020
e772fe6
Clean template
JonoYang Nov 4, 2020
ae44984
Merge pull request #11 from nexB/add-ci-config
JonoYang Nov 4, 2020
5593c2f
Merge pull request #14 from nexB/develop
JonoYang Nov 5, 2020
629abed
Update .gitignore to ignore Jupyter temp files
AyanSinhaMahapatra Nov 5, 2020
6001c74
Merge pull request #15 from nexB/jupyter-patch
pombredanne Nov 5, 2020
ef210cd
Quick doc update
steven-esser Nov 16, 2020
0b6caf9
Add RTD docs configuration file
AyanSinhaMahapatra Dec 10, 2020
f2c1400
Add basic RTD documentaion #4
AyanSinhaMahapatra Dec 10, 2020
e7d1990
Add RTD requirements file and test scripts
AyanSinhaMahapatra Dec 10, 2020
7d37af0
Add `src` folder to pass CI tests and RTD builds
AyanSinhaMahapatra Dec 16, 2020
b6ef568
Merge pull request #16 from AyanSinhaMahapatra/add-basic-docs
steven-esser Dec 21, 2020
03ffc8a
Ensure we use official full text of Apache 2.0
pombredanne Jan 6, 2021
98d4d69
Merge pull request #18 from nexB/apache-license
steven-esser Jan 6, 2021
5e386d9
Never ever let Git convert line delimiters
pombredanne Jan 14, 2021
2e48dca
Run tests on more OSes and Python versions
pombredanne Jan 14, 2021
b959539
Do not make wheel universal
pombredanne Jan 14, 2021
98641a0
Format and add license
pombredanne Jan 14, 2021
9fa3f31
Format
pombredanne Jan 14, 2021
0b8cd65
Improve documentation
pombredanne Jan 14, 2021
3007691
Format for spaces
pombredanne Jan 14, 2021
b49895c
Add manifest for source distributions
pombredanne Jan 14, 2021
d3e2d28
Add Apache license NOTICE
pombredanne Jan 14, 2021
a2a1901
Merge pull request #19 from nexB/update-boilerplate
steven-esser Jan 19, 2021
f46bc48
Default to 64 bits windows on CI
pombredanne Jan 24, 2021
182532f
Use wheels embedded in virtualenv.pyz
pombredanne Jan 25, 2021
cd4e87b
Do not force an upgrade on virtualenv.pyz embeds
pombredanne Jan 25, 2021
51510cb
Fix .gitattributes
steven-esser Feb 11, 2021
386bb90
Merge pull request #21 from nexB/fix-gitattributes
steven-esser Feb 12, 2021
009c43d
Add CHANGELOG #47
steven-esser Nov 20, 2019
0eb3f4b
Convert CHANGELOG to rst format #47
steven-esser Nov 21, 2019
cd31ae8
Fixed #49 - issue for over-simplified
chinyeungli Feb 16, 2021
1973f26
Apply suggestions from code review
chinyeungli Feb 22, 2021
25fa5e0
Break down the mega tests and add test for single license
chinyeungli Feb 22, 2021
e1ccc72
Add code to handle single license
chinyeungli Feb 22, 2021
586bb13
Update src/license_expression/__init__.py
chinyeungli Feb 22, 2021
5af569f
Add `combine_expressions` function from scancode
chinyeungli Feb 22, 2021
43da938
Update the function name `dedup` to `expressions`
chinyeungli Feb 22, 2021
57aba4e
revert manual mistake from previous commit (update code for grouping
chinyeungli Feb 22, 2021
e84c64e
Convert line delimiter to LF
chinyeungli Feb 23, 2021
35082ad
Update the Changelog.
chinyeungli Feb 23, 2021
9770fb2
Check the class instance instead of strings operator
chinyeungli Feb 23, 2021
ee8d2e6
Add code and test to handle expression with the "WITH" exception
chinyeungli Feb 25, 2021
38f5644
Drop Python 2 support
pombredanne Apr 16, 2021
f9392d2
Remove support for Python 2
pombredanne Apr 16, 2021
d6721c7
Remove Travis CI
pombredanne Apr 16, 2021
87a9622
Remove year in copyrights
pombredanne Apr 16, 2021
79320bb
Merge and adopt latest skeleton
pombredanne Apr 16, 2021
c883062
Remove more Python 2 support
pombredanne Apr 16, 2021
c2eac75
Update tox config
pombredanne Apr 16, 2021
cf417bd
Format code
pombredanne Apr 16, 2021
c295a9f
Update dedup tests
pombredanne Apr 16, 2021
9b40b97
Streamline dedup function with objects
pombredanne Apr 16, 2021
3c291e4
Merge latest master
pombredanne Apr 16, 2021
1c84e9e
Merge pull request #24 from nexB/use-venv-embeds
pombredanne May 7, 2021
d6fe59f
Update markers syntax for pytest
pombredanne May 7, 2021
ca6ab21
Add fallback version for setuptools_scm
pombredanne May 7, 2021
1364bbb
Add note for setuptools_scam fallback version
pombredanne May 11, 2021
be851b0
Use azure-posix.yml for linux and macOS
pombredanne May 11, 2021
4f0aecf
Adopt new configure script derived from ScanCode
pombredanne May 11, 2021
aa04429
Add notes on customization
pombredanne May 11, 2021
56ada8f
Adopt new configure --dev convention
pombredanne May 11, 2021
0dbcdc9
Clarify CHANGELOG to be Rst
pombredanne May 11, 2021
d21aef3
Add skeleton release notes to README.rst
pombredanne May 11, 2021
a75737d
Merge pull request #25 from nexB/new-configure
pombredanne May 12, 2021
3aeb2ec
Update format
pombredanne May 31, 2021
2c412e8
Add Python 3.9 to Travis
pombredanne May 31, 2021
69eec23
Format and remove spurious spaces
pombredanne May 31, 2021
0e09ad9
Bump to more modern version of setuptools_scm
pombredanne May 31, 2021
e339a70
Add space for correct syntax
pombredanne May 31, 2021
b3b3845
Merge latest skeleton
pombredanne Jun 4, 2021
a6235aa
Drop Python 2. Modernize notices. Format code
pombredanne Jun 4, 2021
413d99a
Improve doc and code format
pombredanne Jun 4, 2021
0c5ac7e
Add new test
pombredanne Jun 4, 2021
db129ef
Update changelog
pombredanne Jun 4, 2021
92706e9
Use correct path for Windows and run all Pythons
pombredanne Jun 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore all Git auto CR/LF line endings conversions
* -text
pyproject.toml export-subst
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Python compiled files
*.py[cod]

# virtualenv and other misc bits
Expand All @@ -16,12 +17,15 @@
/Include
/local
*/local/*
/local/
/share/
/tcl/
/.eggs/

# Installer logs
pip-log.txt

# Unit test / coverage reports
.tox
.cache
.coverage
.coverage.*
Expand All @@ -36,10 +40,19 @@ htmlcov
.pydevproject
.idea
org.eclipse.core.resources.prefs
.vscode
.vs

# Sphinx
docs/_build
docs/bin
docs/build
docs/include
docs/Lib
doc/pyvenv.cfg
pyvenv.cfg

# Various junk and temp files
.DS_Store
*~
.*.sw[po]
Expand All @@ -48,6 +61,13 @@ docs/_build
*.bak
/.cache/

/share/
/local/
# pyenv
/.python-version
/man/
/.pytest_cache/
lib64
tcl

# Ignore Jupyter Notebook related temp files
.ipynb_checkpoints/
/.tox/
18 changes: 18 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Where the Sphinx conf.py file is located
sphinx:
configuration: docs/source/conf.py

# Setting the python version and doc build requirements
python:
install:
- method: pip
path: .
extra_requirements:
- docs
87 changes: 17 additions & 70 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,22 @@
matrix:
include:
- os: osx
env:
- PYTHON="3.6.8"
- TEST_SUITE="bin/py.test -vvs"
language: generic
python:
# This is a skeleton Travis CI config file that provides a starting point for adding CI
# to a Python project. Since we primarily develop in python3, this skeleton config file
# will be specific to that language.
#
# See https://config.travis-ci.com/ for a full list of configuration options.

- os: osx
env:
- PYTHON="2.7.15"
- TEST_SUITE="bin/py.test -vvs"
language: generic
python:
os: linux

- os: linux
sudo: required
env: TEST_SUITE="bin/py.test -vvs"
language: python
python: "2.7"
dist: xenial

- os: linux
sudo: required
env: TEST_SUITE="bin/py.test -vvs"
language: python
python: "2.7"
dist: bionic

- os: linux
sudo: required
env: TEST_SUITE="bin/py.test -vvs"
language: python
python: "3.6"
dist: xenial

- os: linux
sudo: required
env: TEST_SUITE="bin/py.test -vvs"
language: python
python: "3.6"
dist: bionic
dist: xenial

addons:
homebrew:
packages:
- openssl
- readline
- sqlite3
- xz
- zlib
- pyenv
update: true
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"

install:
- ./configure
# Scripts to run at install stage
install: ./configure --dev

script:
# If debugging, use a subset of tests to wait less:
# - ./bin/py.test -n 2 -vvs --cov=src tests/scancode
# - echo $TEST_SUITE
- bin/about check --verbose .
- $TEST_SUITE

notifications:
irc:
channels:
- "chat.freenode.net#aboutcode"
on_success: change
on_failure: always
use_notice: true
skip_join: true
template:
- "%{repository_slug}#%{build_number} (%{branch}-%{commit}:%{author})-%{message}- %{build_url}"
# Scripts to run at script stage
script: tmp/bin/pytest
5 changes: 5 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ The following organizations or individuals have contributed to this code:
- Philippe Ombredanne @pombredanne
- Thomas Druez @tdruez
- Carmen Bianca Bakker @carmenbianca
- Chin-Yeung Li @chinyeungli
- Steven Esser @majurg
- Sebastian Schuberth @sschuberth
- Max Mehl @mxmehl
- Peter Kolbus @pkolbus
22 changes: 18 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
Changelog
=========
All notable changes to this project will be documented in this file.

The format is based on `Keep a
Changelog <https://keepachangelog.com/en/1.0.0/>`__

[Unreleased]
------------



[2.0] - 2021-06-04
------------------

Added
~~~~~
- Add ability to simplify license expressions without over simplifying by not
using using boolean logic.

Changed
~~~~~~~
- Drop support for python27
- Adopt the skeleton from https://github.com/nexB/skeleton


[1.2] - 2019-11-14
------------------
Added
Expand All @@ -22,6 +34,7 @@ Changed
~~~~~~~
- Update the thirdparty directory structure.


[1.0] - 2019-10-16
------------------
Added
Expand All @@ -33,6 +46,7 @@ Changed
~~~~~~~
- updated travis CI settings


[0.999] - 2019-04-29
--------------------
- Initial release
Expand Down
24 changes: 10 additions & 14 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
graft src
graft etc
graft tests

prune src/license_expression.egg-info

include README.rst
include apache-2.0.LICENSE
include *.LICENSE
include NOTICE
include MANIFEST.in
include setup.py
include setup.cfg
include .gitignore
include configure
include configure.bat

include .travis.yml appveyor.yml
include *.ABOUT
include *.toml
include *.yml
include *.rst
include setup.*
include configure*
include requirements*
include .git*

global-exclude *.py[co] __pycache__ *.*~

45 changes: 19 additions & 26 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
Software license
================

license-expression is a free software tool from nexB Inc. and others.
Visit https://github.com/nexB/license-expression for support and download.

Copyright (c) 2016 nexB Inc. and others. All rights reserved.
http://nexb.com and http://aboutcode.org

This software is licensed under the Apache License version 2.0.

You may not use this software except in compliance with the License.
You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.


Third-party software licenses
=============================

license-expression embeds third-party free and open source software packages under
various licenses. The origin and license of these packages is documented by .ABOUT
files. The corresponding source code for pre-compiled third-party software is
available in the thirdparty directory.
#
# Copyright (c) nexB Inc. and others.
# SPDX-License-Identifier: Apache-2.0
#
# Visit https://aboutcode.org and https://github.com/nexB/license-expression
# for support and download.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
13 changes: 7 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
license-expression
==================

license-expression is a small utility library to parse, compare, simplify and normalize
license expressions (e.g. SPDX license expressions) using boolean logic such as:
`GPL-2.0 or later WITH Classpath Exception AND MIT`.
license-expression is a comprehensive utility library to parse, compare,
simplify and normalize license expressions (such as SPDX license expressions)
using boolean logic like in: `GPL-2.0 or later WITH Classpath Exception AND MIT`.

See also for details:
https://spdx.org/sites/cpstandard/files/pages/files/spdxversion2.1.pdf#page=95&zoom=auto

license: apache-2.0

Python: 2.7 and 3.5+
Python: 3.6+

Build and tests status
======================
Expand Down Expand Up @@ -135,6 +135,7 @@ Development
===========

* Checkout a clone from https://github.com/nexB/license-expression.git
* Then run ``./configure`` (or ``configure.bat``) and then ``source bin/activate``. This will
install all vendored dependencies in a local virtualenv, including development deps.
* Then run ``./configure`` (or ``configure.bat``) and then ``source bin/activate``.
This will install all vendored dependencies in a local virtualenv, including
development deps.
* To run the tests, run ``py.test -vvs``
28 changes: 28 additions & 0 deletions apache-2.0.LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,31 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
<<<<<<< HEAD
=======

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
>>>>>>> refs/remotes/skeleton/main
16 changes: 7 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ version: '{build}'

environment:
matrix:
- PYTHON_EXE: "C:\\Python27\\python.exe"
- PYTHON_EXE: "C:\\Python27-x64\\python.exe"
- PYTHON_EXE: "C:\\Python36\\python.exe"
- PYTHON_EXE: "C:\\Python36-x64\\python.exe"
- PYTHON_EXE: "C:\\Python37-x64\\python.exe"
- PYTHON_EXE: "C:\\Python38-x64\\python.exe"
- PYTHON_EXE: "C:\\Python39-x64\\python.exe"

install:
- configure
- configure --dev

build: off

test_script:
- 'bin\activate'
- 'bin\python -c "from __future__ import print_function;import sys;print(sys.getdefaultencoding())"'
- 'bin\py.test -vvs'
- 'tmp\Scripts\activate'
- 'tmp\Scripts\python -c "from __future__ import print_function;import sys;print(sys.getdefaultencoding())"'
- 'tmp\Scripts\pytest -vvs'

on_failure:
- "python etc/scripts/irc-notify.py aboutcode [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_red}Failed,Details: {build_url},Commit: {commit_url}"
Loading