lice3 0.14.0__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.
Files changed (79) hide show
  1. lice3-0.14.0/.github/workflows/publish.yml +87 -0
  2. lice3-0.14.0/.github/workflows/test.yml +36 -0
  3. lice3-0.14.0/.gitignore +53 -0
  4. lice3-0.14.0/.pre-commit-config.yaml +50 -0
  5. lice3-0.14.0/CHANGELOG.md +154 -0
  6. lice3-0.14.0/CONTRIBUTING.md +214 -0
  7. lice3-0.14.0/LICENSE +29 -0
  8. lice3-0.14.0/Makefile +47 -0
  9. lice3-0.14.0/PKG-INFO +345 -0
  10. lice3-0.14.0/README.md +314 -0
  11. lice3-0.14.0/docs/changelog.md +1 -0
  12. lice3-0.14.0/docs/configuration.md +37 -0
  13. lice3-0.14.0/docs/contributing.md +1 -0
  14. lice3-0.14.0/docs/css/extra.css +12 -0
  15. lice3-0.14.0/docs/future_plans.md +1 -0
  16. lice3-0.14.0/docs/index.md +45 -0
  17. lice3-0.14.0/docs/installation.md +38 -0
  18. lice3-0.14.0/docs/integration.md +211 -0
  19. lice3-0.14.0/docs/overview.md +122 -0
  20. lice3-0.14.0/docs/usage.md +233 -0
  21. lice3-0.14.0/lice3/__init__.py +7 -0
  22. lice3-0.14.0/lice3/api/__init__.py +5 -0
  23. lice3-0.14.0/lice3/api/api.py +146 -0
  24. lice3-0.14.0/lice3/api/exceptions.py +63 -0
  25. lice3-0.14.0/lice3/config.py +56 -0
  26. lice3-0.14.0/lice3/constants.py +124 -0
  27. lice3-0.14.0/lice3/core.py +234 -0
  28. lice3-0.14.0/lice3/helpers.py +378 -0
  29. lice3-0.14.0/lice3/templates/__init__.py +1 -0
  30. lice3-0.14.0/lice3/templates/template-afl3.txt +187 -0
  31. lice3-0.14.0/lice3/templates/template-agpl3-header.txt +15 -0
  32. lice3-0.14.0/lice3/templates/template-agpl3.txt +662 -0
  33. lice3-0.14.0/lice3/templates/template-al2.txt +156 -0
  34. lice3-0.14.0/lice3/templates/template-apache-header.txt +13 -0
  35. lice3-0.14.0/lice3/templates/template-apache.txt +207 -0
  36. lice3-0.14.0/lice3/templates/template-bsd2.txt +24 -0
  37. lice3-0.14.0/lice3/templates/template-bsd3.txt +27 -0
  38. lice3-0.14.0/lice3/templates/template-cc0-header.txt +8 -0
  39. lice3-0.14.0/lice3/templates/template-cc0.txt +121 -0
  40. lice3-0.14.0/lice3/templates/template-cc_by-header.txt +7 -0
  41. lice3-0.14.0/lice3/templates/template-cc_by.txt +319 -0
  42. lice3-0.14.0/lice3/templates/template-cc_by_nc-header.txt +7 -0
  43. lice3-0.14.0/lice3/templates/template-cc_by_nc.txt +334 -0
  44. lice3-0.14.0/lice3/templates/template-cc_by_nc_nd-header.txt +7 -0
  45. lice3-0.14.0/lice3/templates/template-cc_by_nc_nd.txt +308 -0
  46. lice3-0.14.0/lice3/templates/template-cc_by_nc_sa-header.txt +7 -0
  47. lice3-0.14.0/lice3/templates/template-cc_by_nc_sa.txt +360 -0
  48. lice3-0.14.0/lice3/templates/template-cc_by_nd-header.txt +7 -0
  49. lice3-0.14.0/lice3/templates/template-cc_by_nd.txt +293 -0
  50. lice3-0.14.0/lice3/templates/template-cc_by_sa-header.txt +7 -0
  51. lice3-0.14.0/lice3/templates/template-cc_by_sa.txt +359 -0
  52. lice3-0.14.0/lice3/templates/template-cddl.txt +331 -0
  53. lice3-0.14.0/lice3/templates/template-edl.txt +28 -0
  54. lice3-0.14.0/lice3/templates/template-epl.txt +216 -0
  55. lice3-0.14.0/lice3/templates/template-eupl.txt +288 -0
  56. lice3-0.14.0/lice3/templates/template-gpl2-header.txt +17 -0
  57. lice3-0.14.0/lice3/templates/template-gpl2.txt +266 -0
  58. lice3-0.14.0/lice3/templates/template-gpl3-header.txt +15 -0
  59. lice3-0.14.0/lice3/templates/template-gpl3.txt +621 -0
  60. lice3-0.14.0/lice3/templates/template-isc.txt +16 -0
  61. lice3-0.14.0/lice3/templates/template-lgpl.txt +165 -0
  62. lice3-0.14.0/lice3/templates/template-mit.txt +20 -0
  63. lice3-0.14.0/lice3/templates/template-mpl-header.txt +3 -0
  64. lice3-0.14.0/lice3/templates/template-mpl.txt +373 -0
  65. lice3-0.14.0/lice3/templates/template-ofl.txt +96 -0
  66. lice3-0.14.0/lice3/templates/template-unlicense.txt +24 -0
  67. lice3-0.14.0/lice3/templates/template-wtfpl-header.txt +4 -0
  68. lice3-0.14.0/lice3/templates/template-wtfpl.txt +13 -0
  69. lice3-0.14.0/lice3/templates/template-zlib.txt +20 -0
  70. lice3-0.14.0/lice3/tests/__init__.py +1 -0
  71. lice3-0.14.0/lice3/tests/conftest.py +69 -0
  72. lice3-0.14.0/lice3/tests/test_api.py +187 -0
  73. lice3-0.14.0/lice3/tests/test_cli.py +140 -0
  74. lice3-0.14.0/lice3/tests/test_lice.py +549 -0
  75. lice3-0.14.0/mkdocs.yml +60 -0
  76. lice3-0.14.0/pyproject.toml +160 -0
  77. lice3-0.14.0/requirements-dev.txt +243 -0
  78. lice3-0.14.0/requirements.txt +45 -0
  79. lice3-0.14.0/uv.lock +2618 -0
@@ -0,0 +1,87 @@
1
+ name: Publish
2
+
3
+ 'on':
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ name: Build distribution
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v6
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v7
22
+ with:
23
+ enable-cache: true
24
+ cache-dependency-glob: "uv.lock"
25
+
26
+ - name: Set up Python
27
+ run: uv python install 3.12
28
+
29
+ - name: Verify tag matches project version
30
+ if: startsWith(github.ref, 'refs/tags/')
31
+ env:
32
+ TAG: ${{ github.ref_name }}
33
+ run: |
34
+ python3 - "$TAG" <<'PY'
35
+ import pathlib
36
+ import sys
37
+ import tomllib
38
+
39
+ tag = sys.argv[1].removeprefix("v")
40
+ pyproject = tomllib.loads(
41
+ pathlib.Path("pyproject.toml").read_text(encoding="utf-8")
42
+ )
43
+ version = pyproject["project"]["version"]
44
+ if tag != version:
45
+ sys.exit(
46
+ f"Tag {tag!r} does not match project.version {version!r}"
47
+ )
48
+ print(f"Version OK: {version}")
49
+ PY
50
+
51
+ - name: Build sdist and wheel
52
+ run: uv build
53
+
54
+ - name: Validate the built artifacts
55
+ run: uvx twine check --strict dist/*
56
+
57
+ - name: Upload artifacts
58
+ uses: actions/upload-artifact@v4
59
+ with:
60
+ name: dist
61
+ path: dist/
62
+ if-no-files-found: error
63
+
64
+ publish:
65
+ name: Publish to PyPI
66
+ needs: build
67
+ runs-on: ubuntu-latest
68
+ environment:
69
+ name: pypi
70
+ url: https://pypi.org/p/lice3
71
+ permissions:
72
+ id-token: write # required for Trusted Publishing (OIDC)
73
+
74
+ steps:
75
+ - name: Download artifacts
76
+ uses: actions/download-artifact@v4
77
+ with:
78
+ name: dist
79
+ path: dist/
80
+
81
+ - name: Publish to PyPI
82
+ uses: pypa/gh-action-pypi-publish@release/v1
83
+ # If you prefer an API token over Trusted Publishing, uncomment the
84
+ # two lines below and add the token as a repository/environment secret
85
+ # named PYPI_API_TOKEN (username is always `__token__`).
86
+ # with:
87
+ # password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,36 @@
1
+ name: Tests
2
+
3
+ 'on':
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ name: Test (Python ${{ matrix.python-version }})
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
18
+
19
+ env:
20
+ # Force every `uv run` inside `make` to use the matrix interpreter.
21
+ UV_PYTHON: ${{ matrix.python-version }}
22
+
23
+ steps:
24
+ - uses: actions/checkout@v6
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v7
28
+ with:
29
+ enable-cache: true
30
+ cache-dependency-glob: "uv.lock"
31
+
32
+ - name: Set up Python ${{ matrix.python-version }}
33
+ run: uv python install ${{ matrix.python-version }}
34
+
35
+ - name: Run lint, type-check and tests
36
+ run: make test
@@ -0,0 +1,53 @@
1
+ # Python bytecode / packaging
2
+ *.py[cod]
3
+ *__pycache__*
4
+ *.egg
5
+ *.egg-info
6
+ dist
7
+ build
8
+ *.whl
9
+
10
+ # Virtual environments
11
+ .venv/
12
+ venv/
13
+ env/
14
+ ENV/
15
+
16
+ # Tooling caches
17
+ .mypy_cache/
18
+ .pytest_cache/
19
+ .ruff_cache/
20
+ .tox/
21
+ .nox/
22
+ .hypothesis/
23
+ .cache/
24
+ *.cache
25
+
26
+ # Test / coverage artifacts
27
+ .coverage
28
+ .coverage.*
29
+ coverage.xml
30
+ htmlcov/
31
+ nosetests.xml
32
+ junit*.xml
33
+
34
+ # Build / docs
35
+ site/
36
+ .mkdocs_cache/
37
+
38
+ # Editors / OS
39
+ .vscode/
40
+ .idea/
41
+ *.swp
42
+ *.swo
43
+ .DS_Store
44
+ Thumbs.db
45
+
46
+ # Local env / misc
47
+ .changelog_generator.toml
48
+ .python-version
49
+ .envrc
50
+ .env
51
+ api-test.py
52
+ repopack-output.txt
53
+ *.log
@@ -0,0 +1,50 @@
1
+ ci:
2
+ autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
3
+ repos:
4
+ - repo: builtin
5
+ hooks:
6
+ - id: check-yaml
7
+ - id: trailing-whitespace
8
+ - id: check-toml
9
+ - id: check-merge-conflict
10
+ - id: end-of-file-fixer
11
+
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.15.2
14
+ hooks:
15
+ - id: ruff
16
+ name: "lint with ruff"
17
+ - id: ruff-format
18
+ name: "format with ruff"
19
+
20
+ - repo: https://github.com/pre-commit/mirrors-mypy
21
+ rev: "v1.19.1" # Use the sha / tag you want to point at
22
+ hooks:
23
+ - id: mypy
24
+ name: "run mypy"
25
+ additional_dependencies:
26
+ - pydantic
27
+
28
+ - repo: https://github.com/astral-sh/uv-pre-commit
29
+ # uv version.
30
+ rev: 0.10.5
31
+ hooks:
32
+ # Update the uv lockfile
33
+ - id: uv-lock
34
+ - id: uv-export
35
+ name: "Export dependencies to 'requirements.txt'"
36
+ args:
37
+ [
38
+ "--no-hashes",
39
+ "--no-dev",
40
+ "--no-emit-project",
41
+ "--output-file=requirements.txt",
42
+ ]
43
+ - id: uv-export
44
+ name: "Export dev dependencies to 'requirements-dev.txt'"
45
+ args:
46
+ [
47
+ "--no-hashes",
48
+ "--no-emit-project",
49
+ "--output-file=requirements-dev.txt",
50
+ ]
@@ -0,0 +1,154 @@
1
+ # Changelog
2
+
3
+ This is an auto-generated log of all the changes that have been made to the
4
+ project since release 0.7.0.
5
+
6
+ For the original changelog, please refer to the "OLD_CHANGELOG.md" file in the repository.
7
+
8
+ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
+
10
+
11
+ ## [0.14.0](https://github.com/Khabib73/lice3/releases/tag/v0.14.0) (November 23, 2026)
12
+
13
+ **Dependency Updates**
14
+
15
+ - Update all runtime dependencies to their latest releases: `rich` 15.0.0,
16
+ `typer` 0.29.x, `pyperclip` 1.11.0, `simple-toml-settings` 0.13.1 and
17
+ `single-source` 0.4.0.
18
+ - Update all development dependencies to their latest releases, including
19
+ `pytest` 9.2.0, `pytest-cov` 7.1.0, `coverage` 7.17.x, `ruff` 0.17.6,
20
+ `mypy` 2.4.1, `mkdocs-material` 9.8.x, `mkdocs` 1.6.1, `poethepoet` 0.49.0,
21
+ `prek` 0.5.11 and `github-changelog-md` 0.10.0.
22
+ - Support the current Python releases, from 3.10 up to 3.15, in both the
23
+ package classifiers and the CI test matrix.
24
+
25
+ ## [0.13.0](https://github.com/seapagan/lice2/releases/tag/0.13.0) (November 13, 2024)
26
+
27
+ **New Features**
28
+
29
+ - Migrate from poetry to uv for dependency and project management ([#72](https://github.com/seapagan/lice2/pull/72)) by [seapagan](https://github.com/seapagan)
30
+
31
+ **Dependency Updates**
32
+
33
+ - Bump ruff from 0.6.3 to 0.6.4 ([#47](https://github.com/seapagan/lice2/pull/47)) by [dependabot[bot]](https://github.com/apps/dependabot)
34
+ - Bump pymarkdownlnt from 0.9.22 to 0.9.23 ([#46](https://github.com/seapagan/lice2/pull/46)) by [dependabot[bot]](https://github.com/apps/dependabot)
35
+ - Bump cryptography from 43.0.0 to 43.0.1 ([#43](https://github.com/seapagan/lice2/pull/43)) by [dependabot[bot]](https://github.com/apps/dependabot)
36
+ - Bump mkdocs-autorefs from 1.1.0 to 1.2.0 ([#42](https://github.com/seapagan/lice2/pull/42)) by [dependabot[bot]](https://github.com/apps/dependabot)
37
+ - Bump ruff from 0.6.2 to 0.6.3 ([#41](https://github.com/seapagan/lice2/pull/41)) by [dependabot[bot]](https://github.com/apps/dependabot)
38
+ - Bump mkdocs-material from 9.5.33 to 9.5.34 ([#40](https://github.com/seapagan/lice2/pull/40)) by [dependabot[bot]](https://github.com/apps/dependabot)
39
+ - Bump mkdocs from 1.6.0 to 1.6.1 ([#39](https://github.com/seapagan/lice2/pull/39)) by [dependabot[bot]](https://github.com/apps/dependabot)
40
+ - Bump poethepoet from 0.27.0 to 0.28.0 ([#38](https://github.com/seapagan/lice2/pull/38)) by [dependabot[bot]](https://github.com/apps/dependabot)
41
+
42
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.12.0...0.13.0) | [`Diff`](https://github.com/seapagan/lice2/compare/0.12.0...0.13.0.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.12.0...0.13.0.patch)
43
+
44
+ ## [0.12.0](https://github.com/seapagan/lice2/releases/tag/0.12.0) (September 02, 2024)
45
+
46
+ **New Features**
47
+
48
+ - Add some more licenses in common usage ([#34](https://github.com/seapagan/lice2/pull/34)) by [seapagan](https://github.com/seapagan)
49
+ - Add more language options ([#33](https://github.com/seapagan/lice2/pull/33)) by [seapagan](https://github.com/seapagan)
50
+ - Add an API so that lice can be used inside other applications ([#31](https://github.com/seapagan/lice2/pull/31)) by [seapagan](https://github.com/seapagan)
51
+ - Provide an optional JSON output, listing licenses and languages for easier integration into other tools like a GUI ([#30](https://github.com/seapagan/lice2/pull/30)) by [seapagan](https://github.com/seapagan)
52
+ - Add '--version' flag to the CLI ([#29](https://github.com/seapagan/lice2/pull/29)) by [seapagan](https://github.com/seapagan)
53
+
54
+ **Testing**
55
+
56
+ - Tweak some of the test layouts and contents ([#32](https://github.com/seapagan/lice2/pull/32)) by [seapagan](https://github.com/seapagan)
57
+
58
+ **Refactoring**
59
+
60
+ - Refactor some of the logic in the CLI ([#35](https://github.com/seapagan/lice2/pull/35)) by [seapagan](https://github.com/seapagan)
61
+
62
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.11.0...0.12.0) | [`Diff`](https://github.com/seapagan/lice2/compare/0.11.0...0.12.0.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.11.0...0.12.0.patch)
63
+
64
+ ## [0.11.0](https://github.com/seapagan/lice2/releases/tag/0.11.0) (August 28, 2024)
65
+
66
+ **New Features**
67
+
68
+ - Add option to copy directly to clipboard ([#27](https://github.com/seapagan/lice2/pull/27)) by [seapagan](https://github.com/seapagan)
69
+
70
+ **Dependency Updates**
71
+
72
+ - Bump rich from 13.7.1 to 13.8.0 ([#26](https://github.com/seapagan/lice2/pull/26)) by [dependabot[bot]](https://github.com/apps/dependabot)
73
+ - Bump ruff from 0.6.1 to 0.6.2 ([#25](https://github.com/seapagan/lice2/pull/25)) by [dependabot[bot]](https://github.com/apps/dependabot)
74
+ - Bump mypy from 1.11.1 to 1.11.2 ([#24](https://github.com/seapagan/lice2/pull/24)) by [dependabot[bot]](https://github.com/apps/dependabot)
75
+ - Bump mkdocs-autorefs from 1.0.1 to 1.1.0 ([#23](https://github.com/seapagan/lice2/pull/23)) by [dependabot[bot]](https://github.com/apps/dependabot)
76
+ - Bump typer from 0.12.4 to 0.12.5 ([#22](https://github.com/seapagan/lice2/pull/22)) by [dependabot[bot]](https://github.com/apps/dependabot)
77
+
78
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.10.2...0.11.0) | [`Diff`](https://github.com/seapagan/lice2/compare/0.10.2...0.11.0.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.10.2...0.11.0.patch)
79
+
80
+ ## [0.10.2](https://github.com/seapagan/lice2/releases/tag/0.10.2) (August 26, 2024)
81
+
82
+ **Closed Issues**
83
+
84
+ - Formatting issue with 'c', 'java' style and languages using the same comment template ([#17](https://github.com/seapagan/lice2/issues/17)) by [seapagan](https://github.com/seapagan)
85
+
86
+ **New Features**
87
+
88
+ - Add markdown mapping (same as HTML) ([#19](https://github.com/seapagan/lice2/pull/19)) by [seapagan](https://github.com/seapagan)
89
+
90
+ **Bug Fixes**
91
+
92
+ - Fix bug "formatting issue with 'c', 'java' style" ([#18](https://github.com/seapagan/lice2/pull/18)) by [seapagan](https://github.com/seapagan)
93
+
94
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.10.1...0.10.2) | [`Diff`](https://github.com/seapagan/lice2/compare/0.10.1...0.10.2.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.10.1...0.10.2.patch)
95
+
96
+ ## [0.10.1](https://github.com/seapagan/lice2/releases/tag/0.10.1) (August 26, 2024)
97
+
98
+ Purely a documentation fix so that the updated README gets to PyPI
99
+
100
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.10.0...0.10.1) | [`Diff`](https://github.com/seapagan/lice2/compare/0.10.0...0.10.1.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.10.0...0.10.1.patch)
101
+
102
+ ## [0.10.0](https://github.com/seapagan/lice2/releases/tag/0.10.0) (August 26, 2024)
103
+
104
+ **Bug Fixes**
105
+
106
+ - Fix extra spaces and CR in output ([#14](https://github.com/seapagan/lice2/pull/14)) by [seapagan](https://github.com/seapagan)
107
+
108
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.9.0...0.10.0) | [`Diff`](https://github.com/seapagan/lice2/compare/0.9.0...0.10.0.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.9.0...0.10.0.patch)
109
+
110
+ ## [0.9.0](https://github.com/seapagan/lice2/releases/tag/0.9.0) (August 24, 2024)
111
+
112
+ **New Features**
113
+
114
+ - Convert CLI from 'argparse' to 'typer' ([#8](https://github.com/seapagan/lice2/pull/8)) by [seapagan](https://github.com/seapagan)
115
+ - Add config file functionality ([#7](https://github.com/seapagan/lice2/pull/7)) by [seapagan](https://github.com/seapagan)
116
+
117
+ **Testing**
118
+
119
+ - Improve test coverage ([#9](https://github.com/seapagan/lice2/pull/9)) by [seapagan](https://github.com/seapagan)
120
+
121
+ **Documentation**
122
+
123
+ - Create a docs website for the project ([#11](https://github.com/seapagan/lice2/pull/11)) by [seapagan](https://github.com/seapagan)
124
+
125
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.8.0...0.9.0) | [`Diff`](https://github.com/seapagan/lice2/compare/0.8.0...0.9.0.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.8.0...0.9.0.patch)
126
+
127
+ ## [0.8.0](https://github.com/seapagan/lice2/releases/tag/0.8.0) (August 19, 2024)
128
+
129
+ **New Features**
130
+
131
+ - Add prettier output for the listing of licenses and languages ([#4](https://github.com/seapagan/lice2/pull/4)) by [seapagan](https://github.com/seapagan)
132
+
133
+ **Refactoring**
134
+
135
+ - Major refactor into separate files ([#5](https://github.com/seapagan/lice2/pull/5)) by [seapagan](https://github.com/seapagan)
136
+ - Move templates into subfolder ([#3](https://github.com/seapagan/lice2/pull/3)) by [seapagan](https://github.com/seapagan)
137
+ - Refactor with strict ruff and mypy linting ([#1](https://github.com/seapagan/lice2/pull/1)) by [seapagan](https://github.com/seapagan)
138
+
139
+ **Documentation**
140
+
141
+ - Add new CHANGELOG and consolidate the old ones ([#6](https://github.com/seapagan/lice2/pull/6)) by [seapagan](https://github.com/seapagan)
142
+
143
+ **Dependency Updates**
144
+
145
+ - Bump pre-commit from 3.5.0 to 3.8.0 ([#2](https://github.com/seapagan/lice2/pull/2)) by [dependabot[bot]](https://github.com/apps/dependabot)
146
+
147
+ [`Full Changelog`](https://github.com/seapagan/lice2/compare/0.7.0...0.8.0) | [`Diff`](https://github.com/seapagan/lice2/compare/0.7.0...0.8.0.diff) | [`Patch`](https://github.com/seapagan/lice2/compare/0.7.0...0.8.0.patch)
148
+
149
+ ## [0.7.0](https://github.com/seapagan/lice2/releases/tag/0.7.0) (August 18, 2024)
150
+
151
+ This is the first release of this new fork. Main thing was getting the Python 3.12 compatibility fixed.
152
+
153
+ ---
154
+ *This changelog was generated using [github-changelog-md](http://changelog.seapagan.net/) by [Seapagan](https://github.com/seapagan)*
@@ -0,0 +1,214 @@
1
+
2
+ # Contributing to Lice3 <!-- omit in toc -->
3
+
4
+ Thank you for your interest in contributing to Lice3! We welcome
5
+ all contributions, big or small.
6
+
7
+ If you are not sure where to start, please take a look at the [open
8
+ issues](https://github.com/Khabib73/lice3/issues). If you have an
9
+ idea for a new feature or would like to report a bug, please open a new issue.
10
+
11
+ We also welcome contributions to the documentation. If you find any errors or
12
+ would like to suggest improvements, please open a new issue or submit a pull
13
+
14
+ ## Prerequisites
15
+
16
+ - Since this is a [Python](https://www.python.org/) project, you will need to have
17
+ Python installed on your machine. You can download the latest version of Python
18
+ from the [official website](https://www.python.org/downloads/) or using your
19
+ Operating system's package manager.
20
+
21
+ - I'd recommend using [pyenv](https://github.com/pyenv/pyenv) to manage your
22
+ Python installations, the
23
+ [pyenv-installer](https://github.com/pyenv/pyenv-installer) works for Linux and
24
+ Mac OS X. For Windows, you can use the
25
+ [pyenv-win](https://github.com/pyenv-win/pyenv-win) port. See
26
+ [here](https://github.com/pyenv-win/pyenv-win#installation ) for installation
27
+ instructions. If you use `uv` (recommended and described below), it can install
28
+ Python for you, much quicker and easier than using `pyenv`.
29
+
30
+ - This project requires **Python 3.9** or higher.
31
+
32
+ - We use [uv](https://docs.astral.sh/uv/) to manage our dependencies. You should
33
+ have this installed as well. You can install `uv` by following the instructions
34
+ on their [website](https://docs.astral.sh/uv/getting-started/installation/).
35
+
36
+ `uv` can be used to actually install Python, even if you do not have it
37
+ installed locally (either by system, pyenv or similar).
38
+
39
+ For example, to install Python 3.12 using `uv`, you can run the following command:
40
+
41
+ ```console
42
+ uv python install 3.12
43
+ ```
44
+
45
+ If you already have a Python version installed, uv will use this.
46
+
47
+ ## Getting Started
48
+
49
+ Before you start contributing, please make sure you have read and understood our
50
+ [Code of
51
+ Conduct](https://github.com/Khabib73/lice3/blob/main/CODE_OF_CONDUCT.md) and
52
+ [License](https://github.com/Khabib73/lice3/blob/main/LICENSE).
53
+
54
+ To get started, follow these steps:
55
+
56
+ 1. Fork the repository and clone it to your local machine.
57
+ 2. Install the required dependencies (see [next section](#install-dependencies)).
58
+ 3. Create a new branch for your changes: `git checkout -b my-new-feature`.
59
+ 4. Make your changes and commit them: `git commit -am 'Add some feature'`.
60
+ 5. Push your changes to your fork: `git push origin my-new-feature`.
61
+ 6. Create a new pull request.
62
+
63
+ ## Install Dependencies
64
+
65
+ Run the following command to install the required dependencies:
66
+
67
+ ```console
68
+ uv sync
69
+ ```
70
+
71
+ The `.venv` folder is already in the `.gitignore` file so will not be committed
72
+ to the repository. This is where the virtual environment will be created.
73
+
74
+ You then need to activate the virtual environment:
75
+
76
+ ```console
77
+ source .venv/bin/activate
78
+ ```
79
+
80
+ From here you can start working on the project. If you are using an IDE such as
81
+ VSCode or PyCharm, you can set their Python interpreter setting to use
82
+ the virtual environment that has just been created.
83
+
84
+ ## Install Git Pre-Commit hooks
85
+
86
+ Please do this if you are intending to submit a PR. It will check commits
87
+ locally before they are pushed up to the Repo.
88
+
89
+ ```console
90
+ $ pre-commit install
91
+ pre-commit installed at .git/hooks/pre-commit
92
+ ```
93
+
94
+ This will ensure that all code meets the required linting standard before being
95
+ committed.
96
+
97
+ ## Run pre-commit manually
98
+
99
+ You can run these checks manually on all staged files using the below command :
100
+
101
+ ```console
102
+ poe pre
103
+ ```
104
+
105
+ ## Testing
106
+
107
+ We are using [pytest](https://docs.pytest.org/) for testing. Tests will
108
+ automatically be run when you submit a pull request. You can also run them
109
+ manually using the following command:
110
+
111
+ ```console
112
+ pytest
113
+ ```
114
+
115
+ If you add any new features, please add tests for them. This will help us to
116
+ ensure that the code is working as expected and will prevent any regressions.
117
+
118
+ ## Changelog
119
+
120
+ The changelog is automatically generated using
121
+ [github-changelog-md](https://changelog.seapagan.net), so please do not edit it
122
+ manually.
123
+
124
+ For maintainers, there is a POE task that will run this and update the changelog
125
+ file.
126
+
127
+ ```console
128
+ poe changelog
129
+ ```
130
+
131
+ You would also need to add a GitHub Personal Access Token to a local config file
132
+ as usual. See the section in that tools
133
+ [Documentation](https://changelog.seapagan.net/installation/#setup-a-github-pat)
134
+ for information.
135
+
136
+ **However, you should NOT include a change to the `CHANGELOG.md` file in any
137
+ Pull Requests. This will be handled by the maintainers when a new release is
138
+ made**. Your GitHub username will be added to the changelog automatically beside
139
+ your PR.
140
+
141
+ ## Convenience Tasks
142
+
143
+ There are a few other convenience tasks that can be run using the `poe` command.
144
+ These are defined in the `pyproject.toml` file.
145
+
146
+ Each of these tasks can have extra options added which will be passed to the
147
+ underlying tool.
148
+
149
+ Run **`mypy`** on the code base in strict mode:
150
+
151
+ ```console
152
+ poe mypy
153
+ ```
154
+
155
+ Format the code using **`ruff format`**:
156
+
157
+ ```console
158
+ poe format
159
+ ```
160
+
161
+ Lint the code using **`ruff check`**:
162
+
163
+ ```console
164
+ poe ruff
165
+ ```
166
+
167
+ Run `ruff`, `mypy` and `format` at the same time:
168
+
169
+ ```console
170
+ poe lint
171
+ ```
172
+
173
+ ## Documentation Tasks
174
+
175
+ These are to help with developing and updating the documentation.
176
+
177
+ - `poe docs:serve` - Serve the MkDocs locally for testing and development
178
+ - `poe docs:serve:all` - Same as above, but opens to all interfaces so you can
179
+ view it on other devices on your network
180
+ - `poe docs:build` - Build the MkDocs site into the `dist` folder
181
+ - `poe docs:publish` - Publish the docs to your GitHub pages. **Note that only
182
+ those with write-access to this repo can do this**.
183
+
184
+ ## Guidelines
185
+
186
+ Here are some guidelines to follow when contributing to Lice3:
187
+
188
+ - Do not update the version number in the `pyproject.toml` file. This will be
189
+ done by the maintainers when a new release is made.
190
+ - Follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide. The
191
+ pre-commit hooks will check for this. We are using
192
+ [Ruff](https://docs.astral.sh/ruff/) as both a linter and code formatter.
193
+ - Try to have no linting errors or warnings. The pre-commit hooks will check for
194
+ this also.
195
+ - [MyPy](https://mypy.readthedocs.io/en/stable/) is installed and we are using
196
+ type hints. Please try to add type hints to your code. If you see any areas of
197
+ the code that are missing type hints, please feel free to open a PR and add
198
+ them 😁!
199
+ - Write clear and concise commit messages.
200
+ - Write tests for your code.
201
+ - Make sure your code passes all tests before submitting a pull request.
202
+ - Document your code using
203
+ [docstrings](https://www.python.org/dev/peps/pep-0257/).
204
+ - Use [GitHub issues](https://github.com/Khabib73/lice3/issues)
205
+ to report bugs or suggest new features.
206
+
207
+ ## Contact
208
+
209
+ If you have any questions or need help with contributing, please contact me
210
+ **@Khabib73** on GitHub. You can also use the [GitHub
211
+ Discussions](https://github.com/Khabib73/lice3/discussions)
212
+ feature.
213
+
214
+ Happy contributing!
lice3-0.14.0/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ Copyright (c) 2013, Jeremy Carbaugh
2
+ (c) 2024, Grant Ramsay
3
+ (с) 2026, Khabib Shakhbanov
4
+
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without modification,
8
+ are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice,
11
+ this list of conditions and the following disclaimer.
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+ * Neither the name of lice3 nor the names of its contributors
16
+ may be used to endorse or promote products derived from this software
17
+ without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
lice3-0.14.0/Makefile ADDED
@@ -0,0 +1,47 @@
1
+ SHELL := /usr/bin/env bash
2
+ UV ?= uv
3
+ .DEFAULT_GOAL := help
4
+
5
+ .PHONY: help
6
+ help: ## Show the help message
7
+ @echo 'Usage: make [target]'
8
+ @echo ''
9
+ @echo 'Available targets:'
10
+ @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
11
+
12
+ .PHONY: install
13
+ install: ## Install project dependencies with uv
14
+ $(UV) sync
15
+
16
+ .PHONY: format
17
+ format: ## Format code with ruff
18
+ $(UV) run ruff format .
19
+ $(UV) run ruff check --fix .
20
+
21
+ .PHONY: lint
22
+ lint: ## Run linting checks (ruff)
23
+ $(UV) run ruff check --output-format=concise .
24
+ $(UV) run ruff format --check --diff .
25
+
26
+ .PHONY: type-check
27
+ type-check: ## Run type checking (mypy)
28
+ $(UV) run mypy . --strict
29
+
30
+ .PHONY: unit
31
+ unit: ## Run unit tests with pytest
32
+ $(UV) run pytest
33
+
34
+ .PHONY: package
35
+ package: ## Check package dependencies
36
+ $(UV) pip check
37
+
38
+ .PHONY: pre
39
+ pre: ## Run pre-commit checks with prek
40
+ $(UV) run prek run --all-files
41
+
42
+ .PHONY: docs
43
+ docs: ## Serve documentation locally
44
+ $(UV) run mkdocs serve
45
+
46
+ .PHONY: test
47
+ test: lint type-check unit package ## Run all checks (lint, type-check, unit, package)