license-normaliser 0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- license_normaliser-0.1/LICENSE +21 -0
- license_normaliser-0.1/PKG-INFO +202 -0
- license_normaliser-0.1/README.rst +149 -0
- license_normaliser-0.1/pyproject.toml +319 -0
- license_normaliser-0.1/setup.cfg +4 -0
- license_normaliser-0.1/src/license_normaliser/__init__.py +32 -0
- license_normaliser-0.1/src/license_normaliser/_core.py +991 -0
- license_normaliser-0.1/src/license_normaliser/_enums.py +552 -0
- license_normaliser-0.1/src/license_normaliser/cli/__init__.py +5 -0
- license_normaliser-0.1/src/license_normaliser/cli/_main.py +88 -0
- license_normaliser-0.1/src/license_normaliser/py.typed +0 -0
- license_normaliser-0.1/src/license_normaliser/tests/__init__.py +5 -0
- license_normaliser-0.1/src/license_normaliser/tests/conftest.py +23 -0
- license_normaliser-0.1/src/license_normaliser/tests/test_cli.py +91 -0
- license_normaliser-0.1/src/license_normaliser/tests/test_core.py +333 -0
- license_normaliser-0.1/src/license_normaliser.egg-info/PKG-INFO +202 -0
- license_normaliser-0.1/src/license_normaliser.egg-info/SOURCES.txt +19 -0
- license_normaliser-0.1/src/license_normaliser.egg-info/dependency_links.txt +1 -0
- license_normaliser-0.1/src/license_normaliser.egg-info/entry_points.txt +2 -0
- license_normaliser-0.1/src/license_normaliser.egg-info/requires.txt +31 -0
- license_normaliser-0.1/src/license_normaliser.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Artur Barseghyan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: license-normaliser
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: Comprehensive license normalization with a three-level hierarchy.
|
|
5
|
+
Author-email: Artur Barseghyan <artur.barseghyan@gmail.com>
|
|
6
|
+
Maintainer-email: Artur Barseghyan <artur.barseghyan@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/barseghyanartur/license-normaliser/
|
|
9
|
+
Project-URL: Repository, https://github.com/barseghyanartur/license-normaliser/
|
|
10
|
+
Project-URL: Issues, https://github.com/barseghyanartur/license-normaliser/issues
|
|
11
|
+
Keywords: license,normalization,spdx,creative commons,open source
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
21
|
+
Classifier: Programming Language :: Python
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/x-rst
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: pydantic>=2.0
|
|
27
|
+
Provides-Extra: all
|
|
28
|
+
Requires-Dist: license-normaliser[build,dev,docs,test]; extra == "all"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: detect-secrets; extra == "dev"
|
|
31
|
+
Requires-Dist: doc8; extra == "dev"
|
|
32
|
+
Requires-Dist: ipython; extra == "dev"
|
|
33
|
+
Requires-Dist: mypy; extra == "dev"
|
|
34
|
+
Requires-Dist: ruff; extra == "dev"
|
|
35
|
+
Requires-Dist: uv; extra == "dev"
|
|
36
|
+
Provides-Extra: test
|
|
37
|
+
Requires-Dist: pytest; extra == "test"
|
|
38
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
39
|
+
Requires-Dist: pytest-codeblock; extra == "test"
|
|
40
|
+
Provides-Extra: docs
|
|
41
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
42
|
+
Requires-Dist: sphinx-autobuild; extra == "docs"
|
|
43
|
+
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == "docs"
|
|
44
|
+
Requires-Dist: sphinx-no-pragma; extra == "docs"
|
|
45
|
+
Requires-Dist: sphinx-markdown-builder; extra == "docs"
|
|
46
|
+
Requires-Dist: sphinx-llms-txt-link; extra == "docs"
|
|
47
|
+
Requires-Dist: sphinx-source-tree; extra == "docs"
|
|
48
|
+
Provides-Extra: build
|
|
49
|
+
Requires-Dist: build; extra == "build"
|
|
50
|
+
Requires-Dist: twine; extra == "build"
|
|
51
|
+
Requires-Dist: wheel; extra == "build"
|
|
52
|
+
Dynamic: license-file
|
|
53
|
+
|
|
54
|
+
==================
|
|
55
|
+
license-normaliser
|
|
56
|
+
==================
|
|
57
|
+
|
|
58
|
+
.. image:: https://raw.githubusercontent.com/barseghyanartur/license-normaliser/main/docs/_static/license_normaliser_logo.webp
|
|
59
|
+
:alt: License Normaliser Logo
|
|
60
|
+
:align: center
|
|
61
|
+
|
|
62
|
+
Comprehensive license normalization with a three-level hierarchy.
|
|
63
|
+
|
|
64
|
+
.. image:: https://img.shields.io/pypi/v/license-normaliser.svg
|
|
65
|
+
:target: https://pypi.python.org/pypi/license-normaliser
|
|
66
|
+
:alt: PyPI Version
|
|
67
|
+
|
|
68
|
+
.. image:: https://img.shields.io/pypi/pyversions/license-normaliser.svg
|
|
69
|
+
:target: https://pypi.python.org/pypi/license-normaliser/
|
|
70
|
+
:alt: Supported Python versions
|
|
71
|
+
|
|
72
|
+
.. image:: https://github.com/barseghyanartur/license-normaliser/actions/workflows/test.yml/badge.svg?branch=main
|
|
73
|
+
:target: https://github.com/barseghyanartur/license-normaliser/actions
|
|
74
|
+
:alt: Build Status
|
|
75
|
+
|
|
76
|
+
.. image:: https://readthedocs.org/projects/license-normaliser/badge/?version=latest
|
|
77
|
+
:target: http://license-normaliser.readthedocs.io
|
|
78
|
+
:alt: Documentation Status
|
|
79
|
+
|
|
80
|
+
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
|
|
81
|
+
:target: https://github.com/barseghyanartur/license-normaliser/#License
|
|
82
|
+
:alt: MIT
|
|
83
|
+
|
|
84
|
+
``license-normaliser`` is a comprehensive license normalization library that
|
|
85
|
+
maps any license representation (SPDX tokens, URLs, prose descriptions) to a
|
|
86
|
+
canonical three-level hierarchy.
|
|
87
|
+
|
|
88
|
+
Features
|
|
89
|
+
========
|
|
90
|
+
|
|
91
|
+
- **Three-level hierarchy** - LicenseFamily → LicenseName → LicenseVersion
|
|
92
|
+
- **Wide format support** - SPDX tokens, URLs, prose descriptions
|
|
93
|
+
- **Creative Commons support** - Full CC family with versions and IGO variants
|
|
94
|
+
- **Publisher-specific licenses** - Elsevier, Wiley, Springer, ACS, and more
|
|
95
|
+
- **Caching** - LRU caching for performance
|
|
96
|
+
- **CLI** - Command-line interface for quick normalization
|
|
97
|
+
|
|
98
|
+
Hierarchy
|
|
99
|
+
=========
|
|
100
|
+
|
|
101
|
+
The library uses a three-level hierarchy:
|
|
102
|
+
|
|
103
|
+
1. **LicenseFamily** - broad bucket: ``"cc"``, ``"osi"``, ``"copyleft"``,
|
|
104
|
+
``"publisher-tdm"``, ...
|
|
105
|
+
2. **LicenseName** - version-free: ``"cc-by"``, ``"cc-by-nc-nd"``, ``"mit"``,
|
|
106
|
+
``"wiley-tdm"``
|
|
107
|
+
3. **LicenseVersion** - fully resolved: ``"cc-by-3.0"``, ``"cc-by-nc-nd-4.0"``
|
|
108
|
+
|
|
109
|
+
Installation
|
|
110
|
+
============
|
|
111
|
+
|
|
112
|
+
With ``uv``:
|
|
113
|
+
|
|
114
|
+
.. code-block:: sh
|
|
115
|
+
|
|
116
|
+
uv pip install license-normaliser
|
|
117
|
+
|
|
118
|
+
Or with ``pip``:
|
|
119
|
+
|
|
120
|
+
.. code-block:: sh
|
|
121
|
+
|
|
122
|
+
pip install license-normaliser
|
|
123
|
+
|
|
124
|
+
Quick start
|
|
125
|
+
===========
|
|
126
|
+
|
|
127
|
+
.. code-block:: python
|
|
128
|
+
:name: test_quick_start
|
|
129
|
+
|
|
130
|
+
from license_normaliser import normalise_license
|
|
131
|
+
|
|
132
|
+
v = normalise_license("CC BY-NC-ND 4.0")
|
|
133
|
+
str(v) # "cc-by-nc-nd-4.0" ← LicenseVersion
|
|
134
|
+
str(v.license) # "cc-by-nc-nd" ← LicenseName
|
|
135
|
+
str(v.license.family) # "cc" ← LicenseFamily
|
|
136
|
+
|
|
137
|
+
Resolution pipeline (first match wins)
|
|
138
|
+
======================================
|
|
139
|
+
|
|
140
|
+
1. Direct registry lookup (cleaned lowercase key)
|
|
141
|
+
2. Alias table (prose variants, SPDX tokens, mixed-case short-forms)
|
|
142
|
+
3. Exact URL map (http/https, trailing-slash normalised, fragment-aware)
|
|
143
|
+
4. Structural CC URL regex (any creativecommons.org URL not in the map)
|
|
144
|
+
5. Prose keyword scan (full sentences from license documents)
|
|
145
|
+
6. Fallback (key = cleaned string, everything else unknown/None)
|
|
146
|
+
|
|
147
|
+
CLI usage
|
|
148
|
+
=========
|
|
149
|
+
|
|
150
|
+
Normalize a single license:
|
|
151
|
+
|
|
152
|
+
.. code-block:: sh
|
|
153
|
+
|
|
154
|
+
license-normaliser normalise "MIT"
|
|
155
|
+
# Output: mit
|
|
156
|
+
|
|
157
|
+
license-normaliser normalise --full "CC BY 4.0"
|
|
158
|
+
# Output:
|
|
159
|
+
# Key: cc-by-4.0
|
|
160
|
+
# URL: https://creativecommons.org/licenses/by/4.0/
|
|
161
|
+
# License: cc-by
|
|
162
|
+
# Family: cc
|
|
163
|
+
|
|
164
|
+
Batch normalize multiple licenses:
|
|
165
|
+
|
|
166
|
+
.. code-block:: sh
|
|
167
|
+
|
|
168
|
+
license-normaliser batch MIT "Apache-2.0" "CC BY 4.0"
|
|
169
|
+
# Output:
|
|
170
|
+
# MIT: mit
|
|
171
|
+
# Apache-2.0: apache-2.0
|
|
172
|
+
# CC BY 4.0: cc-by-4.0
|
|
173
|
+
|
|
174
|
+
Testing
|
|
175
|
+
=======
|
|
176
|
+
|
|
177
|
+
All tests run inside Docker to prevent accidental side effects:
|
|
178
|
+
|
|
179
|
+
.. code-block:: sh
|
|
180
|
+
|
|
181
|
+
make test
|
|
182
|
+
|
|
183
|
+
To test a specific Python version:
|
|
184
|
+
|
|
185
|
+
.. code-block:: sh
|
|
186
|
+
|
|
187
|
+
make test-env ENV=py312
|
|
188
|
+
|
|
189
|
+
License
|
|
190
|
+
=======
|
|
191
|
+
|
|
192
|
+
MIT
|
|
193
|
+
|
|
194
|
+
Support
|
|
195
|
+
=======
|
|
196
|
+
|
|
197
|
+
For issues, go to `GitHub <https://github.com/barseghyanartur/license-normaliser/issues>`_.
|
|
198
|
+
|
|
199
|
+
Author
|
|
200
|
+
======
|
|
201
|
+
|
|
202
|
+
Artur Barseghyan <artur.barseghyan@gmail.com>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
==================
|
|
2
|
+
license-normaliser
|
|
3
|
+
==================
|
|
4
|
+
|
|
5
|
+
.. image:: https://raw.githubusercontent.com/barseghyanartur/license-normaliser/main/docs/_static/license_normaliser_logo.webp
|
|
6
|
+
:alt: License Normaliser Logo
|
|
7
|
+
:align: center
|
|
8
|
+
|
|
9
|
+
Comprehensive license normalization with a three-level hierarchy.
|
|
10
|
+
|
|
11
|
+
.. image:: https://img.shields.io/pypi/v/license-normaliser.svg
|
|
12
|
+
:target: https://pypi.python.org/pypi/license-normaliser
|
|
13
|
+
:alt: PyPI Version
|
|
14
|
+
|
|
15
|
+
.. image:: https://img.shields.io/pypi/pyversions/license-normaliser.svg
|
|
16
|
+
:target: https://pypi.python.org/pypi/license-normaliser/
|
|
17
|
+
:alt: Supported Python versions
|
|
18
|
+
|
|
19
|
+
.. image:: https://github.com/barseghyanartur/license-normaliser/actions/workflows/test.yml/badge.svg?branch=main
|
|
20
|
+
:target: https://github.com/barseghyanartur/license-normaliser/actions
|
|
21
|
+
:alt: Build Status
|
|
22
|
+
|
|
23
|
+
.. image:: https://readthedocs.org/projects/license-normaliser/badge/?version=latest
|
|
24
|
+
:target: http://license-normaliser.readthedocs.io
|
|
25
|
+
:alt: Documentation Status
|
|
26
|
+
|
|
27
|
+
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
|
|
28
|
+
:target: https://github.com/barseghyanartur/license-normaliser/#License
|
|
29
|
+
:alt: MIT
|
|
30
|
+
|
|
31
|
+
``license-normaliser`` is a comprehensive license normalization library that
|
|
32
|
+
maps any license representation (SPDX tokens, URLs, prose descriptions) to a
|
|
33
|
+
canonical three-level hierarchy.
|
|
34
|
+
|
|
35
|
+
Features
|
|
36
|
+
========
|
|
37
|
+
|
|
38
|
+
- **Three-level hierarchy** - LicenseFamily → LicenseName → LicenseVersion
|
|
39
|
+
- **Wide format support** - SPDX tokens, URLs, prose descriptions
|
|
40
|
+
- **Creative Commons support** - Full CC family with versions and IGO variants
|
|
41
|
+
- **Publisher-specific licenses** - Elsevier, Wiley, Springer, ACS, and more
|
|
42
|
+
- **Caching** - LRU caching for performance
|
|
43
|
+
- **CLI** - Command-line interface for quick normalization
|
|
44
|
+
|
|
45
|
+
Hierarchy
|
|
46
|
+
=========
|
|
47
|
+
|
|
48
|
+
The library uses a three-level hierarchy:
|
|
49
|
+
|
|
50
|
+
1. **LicenseFamily** - broad bucket: ``"cc"``, ``"osi"``, ``"copyleft"``,
|
|
51
|
+
``"publisher-tdm"``, ...
|
|
52
|
+
2. **LicenseName** - version-free: ``"cc-by"``, ``"cc-by-nc-nd"``, ``"mit"``,
|
|
53
|
+
``"wiley-tdm"``
|
|
54
|
+
3. **LicenseVersion** - fully resolved: ``"cc-by-3.0"``, ``"cc-by-nc-nd-4.0"``
|
|
55
|
+
|
|
56
|
+
Installation
|
|
57
|
+
============
|
|
58
|
+
|
|
59
|
+
With ``uv``:
|
|
60
|
+
|
|
61
|
+
.. code-block:: sh
|
|
62
|
+
|
|
63
|
+
uv pip install license-normaliser
|
|
64
|
+
|
|
65
|
+
Or with ``pip``:
|
|
66
|
+
|
|
67
|
+
.. code-block:: sh
|
|
68
|
+
|
|
69
|
+
pip install license-normaliser
|
|
70
|
+
|
|
71
|
+
Quick start
|
|
72
|
+
===========
|
|
73
|
+
|
|
74
|
+
.. code-block:: python
|
|
75
|
+
:name: test_quick_start
|
|
76
|
+
|
|
77
|
+
from license_normaliser import normalise_license
|
|
78
|
+
|
|
79
|
+
v = normalise_license("CC BY-NC-ND 4.0")
|
|
80
|
+
str(v) # "cc-by-nc-nd-4.0" ← LicenseVersion
|
|
81
|
+
str(v.license) # "cc-by-nc-nd" ← LicenseName
|
|
82
|
+
str(v.license.family) # "cc" ← LicenseFamily
|
|
83
|
+
|
|
84
|
+
Resolution pipeline (first match wins)
|
|
85
|
+
======================================
|
|
86
|
+
|
|
87
|
+
1. Direct registry lookup (cleaned lowercase key)
|
|
88
|
+
2. Alias table (prose variants, SPDX tokens, mixed-case short-forms)
|
|
89
|
+
3. Exact URL map (http/https, trailing-slash normalised, fragment-aware)
|
|
90
|
+
4. Structural CC URL regex (any creativecommons.org URL not in the map)
|
|
91
|
+
5. Prose keyword scan (full sentences from license documents)
|
|
92
|
+
6. Fallback (key = cleaned string, everything else unknown/None)
|
|
93
|
+
|
|
94
|
+
CLI usage
|
|
95
|
+
=========
|
|
96
|
+
|
|
97
|
+
Normalize a single license:
|
|
98
|
+
|
|
99
|
+
.. code-block:: sh
|
|
100
|
+
|
|
101
|
+
license-normaliser normalise "MIT"
|
|
102
|
+
# Output: mit
|
|
103
|
+
|
|
104
|
+
license-normaliser normalise --full "CC BY 4.0"
|
|
105
|
+
# Output:
|
|
106
|
+
# Key: cc-by-4.0
|
|
107
|
+
# URL: https://creativecommons.org/licenses/by/4.0/
|
|
108
|
+
# License: cc-by
|
|
109
|
+
# Family: cc
|
|
110
|
+
|
|
111
|
+
Batch normalize multiple licenses:
|
|
112
|
+
|
|
113
|
+
.. code-block:: sh
|
|
114
|
+
|
|
115
|
+
license-normaliser batch MIT "Apache-2.0" "CC BY 4.0"
|
|
116
|
+
# Output:
|
|
117
|
+
# MIT: mit
|
|
118
|
+
# Apache-2.0: apache-2.0
|
|
119
|
+
# CC BY 4.0: cc-by-4.0
|
|
120
|
+
|
|
121
|
+
Testing
|
|
122
|
+
=======
|
|
123
|
+
|
|
124
|
+
All tests run inside Docker to prevent accidental side effects:
|
|
125
|
+
|
|
126
|
+
.. code-block:: sh
|
|
127
|
+
|
|
128
|
+
make test
|
|
129
|
+
|
|
130
|
+
To test a specific Python version:
|
|
131
|
+
|
|
132
|
+
.. code-block:: sh
|
|
133
|
+
|
|
134
|
+
make test-env ENV=py312
|
|
135
|
+
|
|
136
|
+
License
|
|
137
|
+
=======
|
|
138
|
+
|
|
139
|
+
MIT
|
|
140
|
+
|
|
141
|
+
Support
|
|
142
|
+
=======
|
|
143
|
+
|
|
144
|
+
For issues, go to `GitHub <https://github.com/barseghyanartur/license-normaliser/issues>`_.
|
|
145
|
+
|
|
146
|
+
Author
|
|
147
|
+
======
|
|
148
|
+
|
|
149
|
+
Artur Barseghyan <artur.barseghyan@gmail.com>
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "license-normaliser"
|
|
3
|
+
description = "Comprehensive license normalization with a three-level hierarchy."
|
|
4
|
+
readme = "README.rst"
|
|
5
|
+
version = "0.1"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"pydantic>=2.0",
|
|
9
|
+
]
|
|
10
|
+
authors = [
|
|
11
|
+
{ name = "Artur Barseghyan", email = "artur.barseghyan@gmail.com" },
|
|
12
|
+
]
|
|
13
|
+
maintainers = [
|
|
14
|
+
{ name = "Artur Barseghyan", email = "artur.barseghyan@gmail.com" },
|
|
15
|
+
]
|
|
16
|
+
license = "MIT"
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Programming Language :: Python :: 3.15",
|
|
27
|
+
"Programming Language :: Python",
|
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
|
+
]
|
|
30
|
+
keywords = [
|
|
31
|
+
"license",
|
|
32
|
+
"normalization",
|
|
33
|
+
"spdx",
|
|
34
|
+
"creative commons",
|
|
35
|
+
"open source",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
license-normaliser = "license_normaliser.cli:main"
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://github.com/barseghyanartur/license-normaliser/"
|
|
43
|
+
Repository = "https://github.com/barseghyanartur/license-normaliser/"
|
|
44
|
+
Issues = "https://github.com/barseghyanartur/license-normaliser/issues"
|
|
45
|
+
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
all = ["license-normaliser[dev,test,docs,build]"]
|
|
48
|
+
dev = [
|
|
49
|
+
"detect-secrets",
|
|
50
|
+
"doc8",
|
|
51
|
+
"ipython",
|
|
52
|
+
"mypy",
|
|
53
|
+
"ruff",
|
|
54
|
+
"uv",
|
|
55
|
+
]
|
|
56
|
+
test = [
|
|
57
|
+
"pytest",
|
|
58
|
+
"pytest-cov",
|
|
59
|
+
"pytest-codeblock",
|
|
60
|
+
]
|
|
61
|
+
docs = [
|
|
62
|
+
"sphinx",
|
|
63
|
+
"sphinx-autobuild",
|
|
64
|
+
"sphinx-rtd-theme>=1.3.0",
|
|
65
|
+
"sphinx-no-pragma",
|
|
66
|
+
"sphinx-markdown-builder",
|
|
67
|
+
"sphinx-llms-txt-link",
|
|
68
|
+
"sphinx-source-tree",
|
|
69
|
+
]
|
|
70
|
+
build = [
|
|
71
|
+
"build",
|
|
72
|
+
"twine",
|
|
73
|
+
"wheel",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
[tool.setuptools]
|
|
77
|
+
package-dir = {"" = "src"}
|
|
78
|
+
|
|
79
|
+
[tool.setuptools.packages.find]
|
|
80
|
+
where = ["src"]
|
|
81
|
+
include = ["license_normaliser", "license_normaliser.*"]
|
|
82
|
+
|
|
83
|
+
[build-system]
|
|
84
|
+
requires = ["setuptools>=41.0", "wheel"]
|
|
85
|
+
build-backend = "setuptools.build_meta"
|
|
86
|
+
|
|
87
|
+
[tool.ruff]
|
|
88
|
+
line-length = 88
|
|
89
|
+
lint.select = [
|
|
90
|
+
"B",
|
|
91
|
+
"C4",
|
|
92
|
+
"E",
|
|
93
|
+
"F",
|
|
94
|
+
"G",
|
|
95
|
+
"I",
|
|
96
|
+
"ISC",
|
|
97
|
+
"INP",
|
|
98
|
+
"N",
|
|
99
|
+
"PERF",
|
|
100
|
+
"Q",
|
|
101
|
+
"SIM",
|
|
102
|
+
]
|
|
103
|
+
lint.ignore = [
|
|
104
|
+
"G004",
|
|
105
|
+
"ISC003",
|
|
106
|
+
]
|
|
107
|
+
fix = true
|
|
108
|
+
src = ["src/license_normaliser"]
|
|
109
|
+
exclude = [
|
|
110
|
+
".bzr",
|
|
111
|
+
".direnv",
|
|
112
|
+
".eggs",
|
|
113
|
+
".git",
|
|
114
|
+
".hg",
|
|
115
|
+
".mypy_cache",
|
|
116
|
+
".nox",
|
|
117
|
+
".pants.d",
|
|
118
|
+
".ruff_cache",
|
|
119
|
+
".svn",
|
|
120
|
+
".tox",
|
|
121
|
+
".venv",
|
|
122
|
+
"__pypackages__",
|
|
123
|
+
"_build",
|
|
124
|
+
"buck-out",
|
|
125
|
+
"build",
|
|
126
|
+
"dist",
|
|
127
|
+
"node_modules",
|
|
128
|
+
"venv",
|
|
129
|
+
"docs",
|
|
130
|
+
]
|
|
131
|
+
target-version = "py310"
|
|
132
|
+
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
133
|
+
|
|
134
|
+
[tool.ruff.lint.isort]
|
|
135
|
+
known-first-party = ["license_normaliser"]
|
|
136
|
+
|
|
137
|
+
[tool.ruff.lint.per-file-ignores]
|
|
138
|
+
"conftest.py" = [
|
|
139
|
+
"PERF203"
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
[tool.doc8]
|
|
143
|
+
ignore-path = [
|
|
144
|
+
"docs/requirements.txt",
|
|
145
|
+
"src/license_normaliser.egg-info/SOURCES.txt",
|
|
146
|
+
]
|
|
147
|
+
|
|
148
|
+
[tool.pytest.ini_options]
|
|
149
|
+
addopts = [
|
|
150
|
+
"-ra",
|
|
151
|
+
"-vvv",
|
|
152
|
+
"-q",
|
|
153
|
+
"--cov=license_normaliser",
|
|
154
|
+
"--ignore=.tox",
|
|
155
|
+
"--cov-report=html",
|
|
156
|
+
"--cov-report=term",
|
|
157
|
+
"--cov-append",
|
|
158
|
+
"--capture=no",
|
|
159
|
+
]
|
|
160
|
+
testpaths = [
|
|
161
|
+
"src/license_normaliser/tests",
|
|
162
|
+
".",
|
|
163
|
+
"**/*.rst",
|
|
164
|
+
"**/*.md",
|
|
165
|
+
]
|
|
166
|
+
pythonpath = ["src"]
|
|
167
|
+
norecursedirs = [".git", ".tox"]
|
|
168
|
+
|
|
169
|
+
[tool.coverage.run]
|
|
170
|
+
relative_files = true
|
|
171
|
+
omit = [".tox/*"]
|
|
172
|
+
source = ["license_normaliser"]
|
|
173
|
+
|
|
174
|
+
[tool.coverage.report]
|
|
175
|
+
show_missing = true
|
|
176
|
+
exclude_lines = [
|
|
177
|
+
"pragma: no cover",
|
|
178
|
+
"@overload",
|
|
179
|
+
]
|
|
180
|
+
|
|
181
|
+
[tool.mypy]
|
|
182
|
+
check_untyped_defs = true
|
|
183
|
+
warn_unused_ignores = true
|
|
184
|
+
warn_redundant_casts = true
|
|
185
|
+
warn_unused_configs = true
|
|
186
|
+
ignore_missing_imports = true
|
|
187
|
+
|
|
188
|
+
[tool.sphinx-source-tree]
|
|
189
|
+
ignore = [
|
|
190
|
+
"*.egg-info",
|
|
191
|
+
"*.py,cover",
|
|
192
|
+
"*.pyc",
|
|
193
|
+
"*.pyo",
|
|
194
|
+
".DS_Store",
|
|
195
|
+
".coverage",
|
|
196
|
+
".coverage.*",
|
|
197
|
+
".git",
|
|
198
|
+
".hg",
|
|
199
|
+
".hypothesis",
|
|
200
|
+
".idea",
|
|
201
|
+
".mypy_cache",
|
|
202
|
+
".nox",
|
|
203
|
+
".pre-commit-config.yaml",
|
|
204
|
+
".pre-commit-hooks.yaml",
|
|
205
|
+
".pytest_cache",
|
|
206
|
+
".readthedocs.yaml",
|
|
207
|
+
".ruff_cache",
|
|
208
|
+
".secrets.baseline",
|
|
209
|
+
".svn",
|
|
210
|
+
".tox",
|
|
211
|
+
".venv",
|
|
212
|
+
".vscode",
|
|
213
|
+
"CHANGELOG.rst",
|
|
214
|
+
"CODE_OF_CONDUCT.rst",
|
|
215
|
+
"LICENSE",
|
|
216
|
+
"SECURITY.rst",
|
|
217
|
+
"Thumbs.db",
|
|
218
|
+
"__pycache__",
|
|
219
|
+
"build",
|
|
220
|
+
"codebin",
|
|
221
|
+
"dist",
|
|
222
|
+
"docs/Makefile",
|
|
223
|
+
"docs/_build",
|
|
224
|
+
"docs/_static",
|
|
225
|
+
"docs/changelog.rst",
|
|
226
|
+
"docs/code_of_conduct.rst",
|
|
227
|
+
"docs/customization",
|
|
228
|
+
"docs/make.bat",
|
|
229
|
+
"docs/requirements.txt",
|
|
230
|
+
"docs/security.rst",
|
|
231
|
+
"docs/source_tree.rst",
|
|
232
|
+
"docs/source_tree_full.rst",
|
|
233
|
+
"env",
|
|
234
|
+
"htmlcov",
|
|
235
|
+
"node_modules",
|
|
236
|
+
"venv",
|
|
237
|
+
"ARCHITECTURE.rst",
|
|
238
|
+
".coderabbit.yaml",
|
|
239
|
+
".coveralls",
|
|
240
|
+
"docs/full-llms.rst",
|
|
241
|
+
"docs/llms.rst",
|
|
242
|
+
"docs/contributor_guidelines.rst",
|
|
243
|
+
"docs/package.rst",
|
|
244
|
+
"docs/documentation.rst",
|
|
245
|
+
"docs/index.rst",
|
|
246
|
+
]
|
|
247
|
+
order = [
|
|
248
|
+
"README.rst",
|
|
249
|
+
"CONTRIBUTING.rst",
|
|
250
|
+
"AGENTS.md",
|
|
251
|
+
]
|
|
252
|
+
|
|
253
|
+
[[tool.sphinx-source-tree.files]]
|
|
254
|
+
output = "docs/full_llms.rst"
|
|
255
|
+
title = "Full project source-tree"
|
|
256
|
+
|
|
257
|
+
[[tool.sphinx-source-tree.files]]
|
|
258
|
+
output = "docs/llms.rst"
|
|
259
|
+
title = "Project source-tree"
|
|
260
|
+
ignore = [
|
|
261
|
+
"*.egg-info",
|
|
262
|
+
"*.py,cover",
|
|
263
|
+
"*.pyc",
|
|
264
|
+
"*.pyo",
|
|
265
|
+
".DS_Store",
|
|
266
|
+
".coverage",
|
|
267
|
+
".coverage.*",
|
|
268
|
+
".git",
|
|
269
|
+
".hg",
|
|
270
|
+
".hypothesis",
|
|
271
|
+
".idea",
|
|
272
|
+
".mypy_cache",
|
|
273
|
+
".nox",
|
|
274
|
+
".pre-commit-config.yaml",
|
|
275
|
+
".pre-commit-hooks.yaml",
|
|
276
|
+
".pytest_cache",
|
|
277
|
+
".readthedocs.yaml",
|
|
278
|
+
".ruff_cache",
|
|
279
|
+
".secrets.baseline",
|
|
280
|
+
".svn",
|
|
281
|
+
".tox",
|
|
282
|
+
".venv",
|
|
283
|
+
".vscode",
|
|
284
|
+
"CHANGELOG.rst",
|
|
285
|
+
"CODE_OF_CONDUCT.rst",
|
|
286
|
+
"LICENSE",
|
|
287
|
+
"SECURITY.rst",
|
|
288
|
+
"Thumbs.db",
|
|
289
|
+
"__pycache__",
|
|
290
|
+
"build",
|
|
291
|
+
"codebin",
|
|
292
|
+
"dist",
|
|
293
|
+
"docs/Makefile",
|
|
294
|
+
"docs/_build",
|
|
295
|
+
"docs/_static",
|
|
296
|
+
"docs/changelog.rst",
|
|
297
|
+
"docs/code_of_conduct.rst",
|
|
298
|
+
"docs/customization",
|
|
299
|
+
"docs/make.bat",
|
|
300
|
+
"docs/requirements.txt",
|
|
301
|
+
"docs/security.rst",
|
|
302
|
+
"docs/source_tree.rst",
|
|
303
|
+
"docs/source_tree_full.rst",
|
|
304
|
+
"env",
|
|
305
|
+
"htmlcov",
|
|
306
|
+
"node_modules",
|
|
307
|
+
"venv",
|
|
308
|
+
"examples",
|
|
309
|
+
"docs",
|
|
310
|
+
"ARCHITECTURE.rst",
|
|
311
|
+
".coderabbit.yaml",
|
|
312
|
+
".coveralls",
|
|
313
|
+
"docs/full-llms.rst",
|
|
314
|
+
"docs/llms.rst",
|
|
315
|
+
"docs/contributor_guidelines.rst",
|
|
316
|
+
"docs/package.rst",
|
|
317
|
+
"docs/documentation.rst",
|
|
318
|
+
"docs/index.rst",
|
|
319
|
+
]
|