From cfbcb19386acb094477fec11a7889f73cc4ef8db Mon Sep 17 00:00:00 2001 From: NotoriousRebel <36310667+NotoriousRebel@users.noreply.github.com> Date: Mon, 24 Aug 2026 20:07:27 -0400 Subject: [PATCH] fix: complete ty CI migration --- .github/workflows/theHarvester.yml | 2 +- AGENTS.md | 2 +- CHANGELOG.md | 2 +- CONTRIBUTING.md | 2 +- tests/test_runtime_dependencies.py | 7 ++++--- tests/test_workflow_contract.py | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/theHarvester.yml b/.github/workflows/theHarvester.yml index 1fad2c38..418dd86d 100644 --- a/.github/workflows/theHarvester.yml +++ b/.github/workflows/theHarvester.yml @@ -60,4 +60,4 @@ jobs: run: pytest - name: Type check with ty - run: ty theHarvester + run: ty check diff --git a/AGENTS.md b/AGENTS.md index b784f3c2..3518f762 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,7 +31,7 @@ Read [CONTEXT.md](CONTEXT.md) before changing discovery semantics, result or evi - Full tests: `uv run pytest` - Lint: `uv run ruff check .` - Formatting: `uv run ruff format --check .` -- Typing: `uv run mypy theHarvester` +- Typing: `uv run ty check` Run focused checks first and expand according to risk. Report any skipped check and its reason. diff --git a/CHANGELOG.md b/CHANGELOG.md index 52f423a6..d73e1e8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,7 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Reworked routine CI to use read-only permissions, non-mutating Ruff checks, offline tests, and explicit opt-in live provider checks ([72e5820f](https://github.com/laramies/theHarvester/commit/72e5820f)). - Grouped GitHub Actions, Python, and Docker Dependabot updates with a seven-day cooldown, and added a seven-day `uv` dependency freshness window ([7a947b66](https://github.com/laramies/theHarvester/commit/7a947b66), [52a79cdb](https://github.com/laramies/theHarvester/commit/52a79cdb)). - Updated runtime dependencies: `aiohttp` to `3.14.3`, `beautifulsoup4` to `4.15.0`, `certifi` to `2026.6.17`, `fastapi` to `0.138.1`, and `uvicorn` to `0.52.1`. -- Updated development dependencies: `mypy` to `2.1.0`, `pytest` to `9.1.1`, `pytest-asyncio` to `1.4.0`, `pytest-playwright` to `0.8.0`, and `ruff` to `0.16.1`. +- Replaced `mypy` with `ty` `0.0.72` for type checking, and updated `pytest` to `9.1.1`, `pytest-asyncio` to `1.4.0`, `pytest-playwright` to `0.8.0`, and `ruff` to `0.16.3`. - Updated CI and container maintenance pins, including `actions/checkout`, `astral-sh/setup-uv`, `astral-sh/ruff-action`, `github/codeql-action`, StepSecurity Harden-Runner, Docker actions, and the Python base image. - Expanded offline regression coverage for discovery providers, configuration contracts, logging, output, documentation, workflow policy, and scope boundaries. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94836d7a..cf80a10d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,7 +72,7 @@ Before submitting, run the non-mutating quality checks and full test suite: uv run ruff check . uv run ruff format --check . uv run pytest -uv run mypy theHarvester +uv run ty check ``` Before a release, manually dispatch the **Release validation** workflow against diff --git a/tests/test_runtime_dependencies.py b/tests/test_runtime_dependencies.py index f464fe62..f79249ac 100644 --- a/tests/test_runtime_dependencies.py +++ b/tests/test_runtime_dependencies.py @@ -36,10 +36,11 @@ def test_unused_packages_are_not_direct_development_requirements() -> None: development = _dependency_names(project['dependency-groups']['dev']) locked = {package['name'] for package in lock['package']} - assert development.isdisjoint({'mypy-extensions', 'ty', 'types-certifi', 'types-chardet', 'wheel'}) - assert {'ty', 'types-certifi', 'types-chardet', 'wheel'}.isdisjoint(locked) + assert development.isdisjoint({'mypy', 'mypy-extensions', 'types-certifi', 'types-chardet', 'wheel'}) + assert {'mypy', 'mypy-extensions', 'types-certifi', 'types-chardet', 'wheel'}.isdisjoint(locked) + assert 'ty' in development assert 'exclude-newer-package' not in project['tool']['uv'] - assert 'ty' not in project['tool'] + assert 'mypy' not in project['tool'] def test_runtime_imports_without_optional_json_extensions() -> None: diff --git a/tests/test_workflow_contract.py b/tests/test_workflow_contract.py index 5755f0f6..87ebd030 100644 --- a/tests/test_workflow_contract.py +++ b/tests/test_workflow_contract.py @@ -21,7 +21,7 @@ def test_python_version_policy_requires_314() -> None: assert project['project']['requires-python'] == '>=3.14' assert 'Programming Language :: Python :: 3.12' not in project['project']['classifiers'] assert 'Programming Language :: Python :: 3.13' not in project['project']['classifiers'] - assert project['tool']['mypy']['python_version'] == '3.14' + assert project['tool']['ty']['src']['include'] == ['theHarvester'] assert project['tool']['uv']['pip']['python-version'] == '3.14' assert project['tool']['ruff']['target-version'] == 'py314' bug_report = (PROJECT_ROOT / '.github' / 'ISSUE_TEMPLATE' / 'bug_report.yml').read_text(encoding='utf-8') @@ -42,7 +42,7 @@ def test_routine_ci_is_read_only_and_offline() -> None: assert 'git push' not in commands assert 'theHarvester -d' not in commands assert '\npytest\n' in f'\n{commands.strip()}\n' - assert 'mypy theHarvester' in commands + assert '\nty check\n' in f'\n{commands.strip()}\n' assert routine_job['strategy']['matrix']['python-version'] == ['3.14']