Skip to content

Implicit class_path provenance says what implied it - #1001

Merged
mauvilsa merged 2 commits into
mainfrom
provenance-implicit-by
Oct 5, 2026
Merged

mauvilsa merged 2 commits into
mainfrom
provenance-implicit-by

Conversation

@mauvilsa

@mauvilsa mauvilsa commented Oct 5, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

  • Provenance of a subclass class_path that was not given, but derived from the type (e.g. a config with only init args such as {"opt": {"lr": 0.5}}), is now shown as implicit and what implied it, e.g. # implicit, from config file cfg.yaml:1, instead of being attributed directly to that source as if it had been given there.
  • Applies to command line arguments, config files, environment variables, defaults, lists of subclasses and callables returning a class.

Before submitting

  • Did you read the contributing guideline?
  • If you used a coding agent, did you fully understand and validate all generated code and ensure it follows the contributing guidelines?
  • Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • [n/a] If this is a bug fix, did you verify that the tests fail without the code fix?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG including a pull request link? (not for typos, docs, test updates, or minor internal changes/refactors)

@mauvilsa mauvilsa added enhancement New feature or request refactor Improvements to the quality of the code labels Oct 5, 2026
@mauvilsa
mauvilsa deployed to sonarcloud October 5, 2026 05:15 — with GitHub Actions Active
@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Tracks where implicit class paths came from in config parsing.

The PR appears safe to merge; no actionable defect was established.

Summary

The PR distinguishes subclass class paths inferred from a type from class paths explicitly supplied by a user.

  • Carries the source that implied a class path through provenance propagation and renders it in provenance comments.
  • Documents the output and adds tests for defaults, config files, command-line arguments, lists, and callable return types.

Reviews (1) · Last reviewed commit: "Implicit class_path provenance says what..."

@mauvilsa
mauvilsa deployed to sonarcloud October 5, 2026 05:26 — with GitHub Actions Active
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

@mauvilsa
mauvilsa merged commit cac526c into main Oct 5, 2026
29 of 30 checks passed
@mauvilsa
mauvilsa deleted the provenance-implicit-by branch October 5, 2026 05:28

This branch was successfully deployed

1 active deployment
sonarcloud — 165391cd Deployed Oct 5, 2026 by mauvilsa via sonarcloud #941
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactor Improvements to the quality of the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant