Skip to content

Commit

Permalink
Fixed #100 - Update link references of ownership from nexB to aboutco…
Browse files Browse the repository at this point in the history
…de-org and version

Signed-off-by: Chin Yeung Li <[email protected]>
  • Loading branch information
chinyeungli committed Aug 13, 2024
1 parent 3b8b992 commit 265415a
Show file tree
Hide file tree
Showing 9 changed files with 277 additions and 148 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

v30.3.1 - 2024-08-13
--------------------

This is a minor release without API changes:

- Update link references of ownership from nexB to aboutcode-org

v30.3.0 - 2024-03-18
--------------------

Expand Down
22 changes: 20 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
#

# Copyright (c) nexB Inc. and others.

# SPDX-License-Identifier: Apache-2.0

#
# Visit https://aboutcode.org and https://github.com/nexB/license-expression

# Visit https://aboutcode.org and https://github.com/aboutcode-org/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

# 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.

#
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using boolean logic.

- License: Apache-2.0
- Python: 3.8+
- Homepage: https://github.com/nexB/license-expression/
- Homepage: https://github.com/aboutcode-org/license-expression/
- Install: `pip install license-expression` also available in most Linux distro.

Software project licenses are often a combination of several free and open
Expand All @@ -32,20 +32,20 @@ See https://scancode-licensedb.aboutcode.org/ to get started quickly.
``license-expression`` is both powerful and simple to use and is a used as the
license expression engine in several projects and products such as:

- AboutCode-toolkit https://github.com/nexB/aboutcode-toolkit
- AboutCode-toolkit https://github.com/aboutcode-org/aboutcode-toolkit
- AlekSIS (School Information System) https://edugit.org/AlekSIS/official/AlekSIS-Core
- Barista https://github.com/Optum/barista
- Conda forge tools https://github.com/conda-forge/conda-smithy
- DejaCode https://dejacode.com
- DeltaCode https://github.com/nexB/deltacode
- FenixscanX https://github.com/SmartsYoung/FenixscanX
- FetchCode https://github.com/nexB/fetchcode
- FetchCode https://github.com/aboutcode-org/fetchcode
- Flict https://github.com/vinland-technology/flict and https://github.com/vinland-technology
- license.sh https://github.com/webscopeio/license.sh
- liferay_inbound_checker https://github.com/carmenbianca/liferay_inbound_checker
- REUSE https://reuse.software/ and https://github.com/fsfe/reuse-tool
- ScanCode-io https://github.com/nexB/scancode.io
- ScanCode-toolkit https://github.com/nexB/scancode-toolkit
- ScanCode-io https://github.com/aboutcode-org/scancode.io
- ScanCode-toolkit https://github.com/aboutcode-org/scancode-toolkit

See also for details:
- https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/
Expand Down Expand Up @@ -78,7 +78,7 @@ Build and tests status
Source code and download
========================

- GitHub https://github.com/nexB/license-expression.git
- GitHub https://github.com/aboutcode-org/license-expression.git
- PyPI https://pypi.python.org/pypi/license-expression

Also available in several Linux distros:
Expand All @@ -95,7 +95,7 @@ Also available in several Linux distros:
Support
=======

- Submit bugs and questions at: https://github.com/nexB/license-expression/issues
- Submit bugs and questions at: https://github.com/aboutcode-org/license-expression/issues
- Join the chat at: https://gitter.im/aboutcode-org/discuss

Description
Expand Down Expand Up @@ -233,7 +233,7 @@ Two expressions can be compared for equivalence and containment:
Development
===========

- Checkout a clone from https://github.com/nexB/license-expression.git
- Checkout a clone from https://github.com/aboutcode-org/license-expression.git

- Then run ``./configure --dev`` and then ``source tmp/bin/activate`` on Linux and POSIX.
This will install all dependencies in a local virtualenv, including
Expand Down
2 changes: 1 addition & 1 deletion license-expression.ABOUT
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ copyright: Copyright (c) nexB Inc. and others.
license_expression: apache-2.0
license_file: apache-2.0.LICENSE

homepage_url: https://github.com/nexB/license-expression
homepage_url: https://github.com/aboutcode-org/license-expression
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[metadata]
name = license-expression
version = 30.3.0
version = 30.3.1
license = Apache-2.0

# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
description = license-expression is a comprehensive utility library to parse, compare, simplify and normalize license expressions (such as SPDX license expressions) using boolean logic.
long_description = file:README.rst
long_description_content_type = text/x-rst
url = https://github.com/nexB/license-expression
url = https://github.com/aboutcode-org/license-expression

author = nexB. Inc. and others
author_email = [email protected]
Expand All @@ -20,7 +20,7 @@ classifiers =
Topic :: Software Development
Topic :: Utilities

keywords =
keywords =
open source
license expression
license
Expand Down
2 changes: 1 addition & 1 deletion src/license_expression/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) nexB Inc. and others. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/license-expression for support or download.
# See https://github.com/aboutcode-org/license-expression for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
"""
Expand Down
19 changes: 11 additions & 8 deletions src/license_expression/_pyahocorasick.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: LicenseRef-scancode-public-domain
# See https://github.com/nexB/license-expression for support or download.
# See https://github.com/aboutcode-org/license-expression for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
"""
Expand Down Expand Up @@ -343,10 +343,12 @@ def iter(self, tokens_string, include_unmatched=False, include_space=False):
if match.output is not nil:
matched_string, output_value = match.output
if TRACE:
logger_debug(' type output', repr(output_value), type(matched_string))
logger_debug(' type output', repr(
output_value), type(matched_string))
n = len(matched_string)
start_pos = end_pos - n + 1
if TRACE: logger_debug(' start_pos', start_pos)
if TRACE:
logger_debug(' start_pos', start_pos)
yield Token(start_pos, end_pos, tokens_string[start_pos: end_pos + 1], output_value)
yielded = True
match = match.fail
Expand All @@ -355,7 +357,8 @@ def iter(self, tokens_string, include_unmatched=False, include_space=False):
logger_debug(' unmatched but known token')
n = len(token_string)
start_pos = end_pos - n + 1
tok = Token(start_pos, end_pos, tokens_string[start_pos: end_pos + 1], None)
tok = Token(start_pos, end_pos,
tokens_string[start_pos: end_pos + 1], None)
if TRACE:
logger_debug(' unmatched tok 2:', tok)
yield tok
Expand Down Expand Up @@ -406,7 +409,7 @@ def tokenize(self, string, include_unmatched=True, include_space=False):
True
"""
tokens = self.iter(string,
include_unmatched=include_unmatched, include_space=include_space)
include_unmatched=include_unmatched, include_space=include_space)
tokens = list(tokens)
if TRACE:
logger_debug('tokenize.tokens:', tokens)
Expand Down Expand Up @@ -544,7 +547,7 @@ def sort(cls, tokens):
>>> expected == Token.sort(tokens)
True
"""
key = lambda s: (s.start, -len(s),)
def key(s): return (s.start, -len(s),)
return sorted(tokens, key=key)

def is_after(self, other):
Expand Down Expand Up @@ -613,8 +616,8 @@ def overlap(self, other):
|
(?P<parens>[\(\)])
''',
re.VERBOSE | re.MULTILINE | re.UNICODE
)
re.VERBOSE | re.MULTILINE | re.UNICODE
)


def get_tokens(tokens_string):
Expand Down
14 changes: 9 additions & 5 deletions tests/test__pyahocorasick.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: LicenseRef-scancode-public-domain
# See https://github.com/nexB/license-expression for support or download.
# See https://github.com/aboutcode-org/license-expression for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.

"""
Expand Down Expand Up @@ -158,7 +158,8 @@ def get_test_automaton():
# 0123456789012345678901234567890123456

t = get_test_automaton()
result = list(t.iter(test_string, include_unmatched=True, include_space=True))
result = list(
t.iter(test_string, include_unmatched=True, include_space=True))
expected = [
Token(0, 1, u' ', None),
Token(2, 3, u'he', u'he'),
Expand Down Expand Up @@ -190,7 +191,8 @@ def get_test_automaton():
test_string = '((l-a + AND l-b) OR (l -c+))'

t = get_test_automaton()
result = list(t.iter(test_string, include_unmatched=True, include_space=True))
result = list(
t.iter(test_string, include_unmatched=True, include_space=True))
expected = [
Token(0, 0, u'(', u'('),
Token(1, 1, u'(', u'('),
Expand All @@ -215,7 +217,8 @@ def get_test_automaton():

assert expected == result

result = list(t.tokenize(test_string, include_unmatched=True, include_space=True))
result = list(t.tokenize(
test_string, include_unmatched=True, include_space=True))
assert expected == result

def test_tokenize_with_unmatched_and_space(self):
Expand All @@ -232,7 +235,8 @@ def get_test_automaton():
# 111111111122222222223
# 0123456789012345678901234567890
t = get_test_automaton()
result = list(t.tokenize(test_string, include_unmatched=True, include_space=True))
result = list(t.tokenize(
test_string, include_unmatched=True, include_space=True))
expected = [
Token(0, 0, u'(', u'('),
Token(1, 1, u'(', u'('),
Expand Down
Loading

0 comments on commit 265415a

Please sign in to comment.