Skip to content

feat: add dynamic task fields and URI providers - #128

Merged
D3f0 merged 5 commits into
mainfrom
feat/dynamic-task-fields
Aug 17, 2026
Merged

feat: add dynamic task fields and URI providers#128
D3f0 merged 5 commits into
mainfrom
feat/dynamic-task-fields

Conversation

@D3f0

@D3f0 D3f0 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #125.

  • Adds typed Field(default=...), Field(default_factory=...), and required Field() task parameter defaults.
  • Resolves omitted URI defaults through batched invoke_toolkit.field_resolver scheme providers.
  • Preserves explicit CLI/direct/pre-task values; Field factories and providers do not run in help, listing, or completion.
  • Adds intk -x create.package --provider <scheme> resolver-only package scaffolding.
  • Documents the Field/provider API and adds regression coverage for parsing, typing, lifecycle isolation, resolver failures, cache keys, and generated provider packages.

Versioning

invoke-toolkit derives its version from git tags. No static version file requires editing. The Unreleased changelog has been updated. The PR title intentionally has no [bump ...] keyword, so merge will not trigger an automatic release.

Validation

  • uv run pytest -q tests/test_fields.py tests/test_field_typing.py tests/test_annotated_help.py tests/test_file_completion.py tests/test_completion_with_choices.py tests/test_executor.py tests/extensions/test_create.py -k 'not create_package_create_venv_install_intk_and_package_and_list and not tasks_and_entrypoints_merge' -o addopts=''
    • 136 passed, 1 skipped, 2 deselected
  • uv run ty check src/invoke_toolkit/tasks/fields.py src/invoke_toolkit/field_resolvers.py src/invoke_toolkit/tasks/tasks.py src/invoke_toolkit/extensions/tasks/create.py tests/typecheck/fields.py
  • uv run ruff check src/invoke_toolkit/tasks/fields.py src/invoke_toolkit/field_resolvers.py src/invoke_toolkit/tasks/tasks.py src/invoke_toolkit/extensions/tasks/create.py tests/test_fields.py tests/test_field_typing.py tests/extensions/test_create.py tests/typecheck/fields.py tests/fixtures/future_fields.py

@D3f0

D3f0 commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

Additional developments on this branch

Since the original PR description was written, this branch also includes:

  • d478959 — Added task-local field resolvers, including resolver lifecycle isolation and related coverage.
  • d5aa57e — Stabilized Nox and CI test environments.
  • 5d628d6 — Made Nox sessions use isolated dependencies.
  • cfb0c7b — Fixed Pylint pre-commit issues and completed the related import/type cleanup.

Current verification

  • Full test suite: 725 passed, 18 skipped.
  • Pylint pre-commit hook: passed.
  • Branch is pushed and up to date with origin/feat/dynamic-task-fields.

@D3f0
D3f0 merged commit c1e30fd into main Aug 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Field defaults and pluggable URI providers

1 participant