From 5e87e1f042997b5ab906fe4df21832ccd004aed0 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Thu, 7 Nov 2024 05:08:28 -0500 Subject: [PATCH] feat!: remove licensecheck --- calcipy/tasks/all_tasks.py | 1 - calcipy/tasks/pack.py | 12 ------------ docs/README.md | 1 - docs/docs/CHANGELOG.md | 4 ++++ docs/docs/CODE_TAG_SUMMARY.md | 4 ++-- docs/docs/DEVELOPER_GUIDE.md | 4 ++-- tests/tasks/test_pack.py | 3 +-- 7 files changed, 9 insertions(+), 20 deletions(-) diff --git a/calcipy/tasks/all_tasks.py b/calcipy/tasks/all_tasks.py index facb8341..200a1107 100644 --- a/calcipy/tasks/all_tasks.py +++ b/calcipy/tasks/all_tasks.py @@ -71,7 +71,6 @@ def with_progress(items: Any, offset: int = 0) -> TaskList: _OTHER_TASKS = [ lint.pre_commit.with_kwargs(no_update=True), # pyright: ignore[reportFunctionMemberAccess] nox.noxfile.with_kwargs(session='tests'), # pyright: ignore[reportFunctionMemberAccess] - pack.check_licenses, pack.lock, tags.collect_code_tags, test.check, # Expected to fail for calcipy diff --git a/calcipy/tasks/pack.py b/calcipy/tasks/pack.py index 7792981e..ef4ff0f8 100644 --- a/calcipy/tasks/pack.py +++ b/calcipy/tasks/pack.py @@ -44,18 +44,6 @@ def publish(ctx: Context, *, to_test_pypi: bool = False) -> None: run(ctx, cmd) -@task() -def check_licenses(ctx: Context) -> None: - """Check licenses for compatibility with `licensecheck`.""" - res = run(ctx, 'which licensecheck', warn=True, hide=True) - if not res or res.exited == 1: - uvx_res = run(ctx, 'uvx licensecheck', warn=True) - if not uvx_res or uvx_res.exited == 1: - LOGGER.error('Failed to use `uv` to run licensecheck. See: https://docs.astral.sh/uv') - else: - run(ctx, 'licensecheck') - - # TODO: Add unit test @task( help={ diff --git a/docs/README.md b/docs/README.md index 0cf47235..11927bad 100644 --- a/docs/README.md +++ b/docs/README.md @@ -91,7 +91,6 @@ Global Task Options: Subcommands: pack.bump-tag Experiment with bumping the git tag using `griffe` (experimental). - pack.check-licenses Check licenses for compatibility with `licensecheck`. pack.install-extras Run poetry install with all extras. pack.lock Ensure poetry.lock is up-to-date. pack.publish Build the distributed format(s) and publish. diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index 29235d1a..33cc3f9a 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -1,5 +1,9 @@ ## Unreleased +### Feat + +- remove 'stale' module and pytest-recording + ## 4.3.0 (2024-10-31) ### Feat diff --git a/docs/docs/CODE_TAG_SUMMARY.md b/docs/docs/CODE_TAG_SUMMARY.md index 131f0eb9..4c5c8a16 100644 --- a/docs/docs/CODE_TAG_SUMMARY.md +++ b/docs/docs/CODE_TAG_SUMMARY.md @@ -6,8 +6,8 @@ | PLANNED | Also see how https://docs.astral.sh/ruff/configuration/#shell-autocompletion | 2024-10-10 | [calcipy/cli.py:112](https://github.com/KyleKing/calcipy/blame/8c9b14b336b2d8f28e2e946018d9add3f260bdfe/calcipy/cli.py#L112) | | TODO | How to capture output? | 2024-10-05 | [calcipy/collection.py:50](https://github.com/KyleKing/calcipy/blame/22a490ebc56994f3269b7a83071e88b8b3fd5f89/calcipy/collection.py#L38) | | TODO | Handle ">=3.0.0,<4" | 2024-10-05 | [calcipy/experiments/sync_package_dependencies.py:48](https://github.com/KyleKing/calcipy/blame/22a490ebc56994f3269b7a83071e88b8b3fd5f89/calcipy/experiments/sync_package_dependencies.py#L48) | -| TODO | Add unit test | 2024-07-06 | [calcipy/tasks/pack.py:59](https://github.com/KyleKing/calcipy/blame/e45ecadfa5b994d9c0a2a47138fa0e083261e3eb/calcipy/tasks/pack.py#L57) | -| TODO | Add unit test | 2024-07-06 | [calcipy/tasks/pack.py:93](https://github.com/KyleKing/calcipy/blame/e45ecadfa5b994d9c0a2a47138fa0e083261e3eb/calcipy/tasks/pack.py#L91) | +| TODO | Add unit test | 2024-07-06 | [calcipy/tasks/pack.py:47](https://github.com/KyleKing/calcipy/blame/e45ecadfa5b994d9c0a2a47138fa0e083261e3eb/calcipy/tasks/pack.py#L57) | +| TODO | Add unit test | 2024-07-06 | [calcipy/tasks/pack.py:81](https://github.com/KyleKing/calcipy/blame/e45ecadfa5b994d9c0a2a47138fa0e083261e3eb/calcipy/tasks/pack.py#L91) | | PLANNED | finish updating docstrings for Returns | 2024-10-08 | [pyproject.toml:149](https://github.com/KyleKing/calcipy/blame/9cf3c6d2d9820cec475d35bdb7c53fc83627a4b2/pyproject.toml#L161) | | PLANNED | Add unit test for sync_package_dependencies.py | 2024-10-07 | [tests/experiments/test_sync_package_dependencies.py:1](https://github.com/KyleKing/calcipy/blame/dbe495b3653edb2fd06f9e3865619707d941ed87/tests/experiments/test_sync_package_dependencies.py#L1) | diff --git a/docs/docs/DEVELOPER_GUIDE.md b/docs/docs/DEVELOPER_GUIDE.md index 90bee8fb..cae8998b 100644 --- a/docs/docs/DEVELOPER_GUIDE.md +++ b/docs/docs/DEVELOPER_GUIDE.md @@ -77,11 +77,11 @@ poetry config pypi-token.pypi ... | `calcipy/tasks/lint.py` | 38 | 2 | 0 | 86.2% | | `calcipy/tasks/most_tasks.py` | 29 | 0 | 0 | 100.0% | | `calcipy/tasks/nox.py` | 8 | 0 | 0 | 100.0% | -| `calcipy/tasks/pack.py` | 47 | 13 | 0 | 62.0% | +| `calcipy/tasks/pack.py` | 39 | 10 | 0 | 64.9% | | `calcipy/tasks/tags.py` | 18 | 1 | 0 | 90.9% | | `calcipy/tasks/test.py` | 39 | 1 | 2 | 90.9% | | `calcipy/tasks/types.py` | 11 | 0 | 0 | 93.3% | -| **Totals** | 921 | 122 | 289 | 82.2% | +| **Totals** | 913 | 119 | 289 | 82.6% | Generated on: 2024-11-07 diff --git a/tests/tasks/test_pack.py b/tests/tasks/test_pack.py index 24169297..be29e152 100644 --- a/tests/tasks/test_pack.py +++ b/tests/tasks/test_pack.py @@ -4,7 +4,7 @@ from calcipy import can_skip from calcipy.tasks.executable_utils import python_dir -from calcipy.tasks.pack import check_licenses, install_extras, lock, publish +from calcipy.tasks.pack import install_extras, lock, publish @pytest.mark.parametrize( @@ -19,7 +19,6 @@ f'{python_dir()}/nox --error-on-missing-interpreters --session build_dist build_check', 'poetry publish', ]), - (check_licenses, {}, ['licensecheck']), ], ) def test_pack(ctx, task, kwargs, commands, monkeypatch):