Skip to content

Introduce resource preparation - #250

Open
jeipollack wants to merge 1 commit into
developfrom
249-refactor-resource-preparation
Open

Introduce resource preparation#250
jeipollack wants to merge 1 commit into
developfrom
249-refactor-resource-preparation

Conversation

@jeipollack

Copy link
Copy Markdown
Contributor

Summary

Introduce resource preparation as part of resource resolution, allowing missing required resources to be prepared through registered resource preparers.

Closes #249

What’s changed

  • Add RESOURCE_PREPARERS registry for resource preparation callables
  • Add prepare_resources helper to invoke resource preparers with resource configuration and dataset
  • Extend resolve() to prepare missing resources and combine them with caller-provided resources
  • Add/update unit tests for resource preparation and resource resolution
  • Extend RESOURCES_DEFAULT in conftest.py to support resource preparation tests

How to test / verify

  • Run tests in resources_test.py
  • CI passes.

Scope

Indicate the type of PR:

  • Feature
  • Bug fix
  • Hotfix
  • Documentation / process change
  • Internal / refactor
  • Release

Optionally, note if this PR is part of a larger milestone or set of related PRs.

Changelog

Did this PR introduce user-visible changes?
If yes, a Scriv changelog fragment must be added and committed.

  • Changelog fragment added (if applicable)

Reviewer Checklist

Reviewers should confirm the following before approving and merging:

  • The PR targets the correct base branch (develop, or main for release PRs)
  • The PR is assigned to the developer
  • Appropriate labels are applied
  • The PR is included in relevant projects and/or milestones
  • Description clearly explains what has changed
  • Issue references included, if applicable
  • Code and documentation adhere to current standards (ruff)
  • Documentation updates included, if relevant
  • CI tests are passing
  • All reviewer comments have been addressed

Next Steps / Notes (if applicable)

The resource-preparation mechanism currently provides the orchestration layer through RESOURCE_PREPARERS, but concrete resource preparers still need to be implemented.

In particular, a callable for preparing psf_models (e.g. through the PSF inference pipeline) will be added in a follow-up PR once the appropriate inference API has been defined.

- Add RESOURCE_PREPARERS registry for resource preparation callables
- Add prepare_resources helper to invoke resource preparers with configuration
- Add/update unit tests for resource preparation and resource resolution
- Extend RESOURCES_DEFAULT in conftest.py to support resource preparation tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

1 participant