Add context manager to load workflow resources#166
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new workflow() context manager to centralize Parsl configuration + lifecycle management so callers can run Chiltepin workflows without directly interacting with Parsl.
Changes:
- Introduces
src/chiltepin/workflow.pyprovidingworkflow(),workflow_from_file(), andworkflow_from_dict(). - Updates tests to use the new context manager instead of manually calling
parsl.load()/cleanup. - Updates documentation and CI test commands to reflect the new workflow API and pytest invocation.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/chiltepin/workflow.py |
New context managers wrapping configure.load() + parsl.load() with cleanup and optional Parsl file logging. |
src/chiltepin/__init__.py |
Exposes workflow helpers from the package root for simpler imports. |
tests/test_workflow.py |
Adds coverage for the new context managers (dict/file configs, aliases, cleanup behavior). |
tests/test_tasks.py |
Replaces manual Parsl setup/teardown fixture with workflow(...). |
tests/test_parsl_hello.py |
Uses workflow(...) for Parsl lifecycle in integration tests. |
tests/test_parsl_mpi.py |
Uses workflow(...) for Parsl lifecycle in MPI integration tests. |
tests/test_globus_compute_hello.py |
Uses workflow(...) for Parsl lifecycle in Globus Compute integration tests. |
tests/test_globus_compute_mpi.py |
Uses workflow(...) for Parsl lifecycle in Globus Compute + MPI integration tests. |
tests/test_data.py |
Uses workflow(...) for Parsl lifecycle in data tests. |
docs/quickstart.rst |
Updates examples to use the workflow context manager (but currently has a broken import/usage mismatch). |
docs/configuration.rst |
Updates configuration loading docs to use workflow(...). |
docs/data.rst |
Updates data workflow example to use workflow(...). |
docs/testing.rst |
Updates pytest command examples. |
docs/container.rst |
Updates container pytest command examples. |
.github/workflows/test-suite.yaml |
Updates CI pytest invocation options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ❌ FAIL (Coverage: 98.28% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
1 similar comment
📊 Test Coverage ReportStatus: ❌ FAIL (Coverage: 98.28% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ❌ FAIL (Coverage: 99.79% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ❌ Coverage report not available Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .. note:: | ||
| The default **"local"** resource is always available, regardless of the ``include`` | ||
| parameter. You do not need to add "local" to the include list to use it. This ensures | ||
| you always have a fallback resource available for tasks. |
There was a problem hiding this comment.
The note says the default "local" resource is always available regardless of include, but there are important edge cases: (1) if a user defines their own local resource and omits it from include, the workflow will fall back to the default local instead of the user-defined one; and (2) include containing "local" may currently error if "local" is not present in the config. Clarifying these behaviors here would prevent user confusion.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test Coverage ReportStatus: ✅ PASS (Coverage: 100.00% | Threshold: 100%)
Coverage report generated by pytest-cov. Full HTML report available in workflow artifacts. |
This udpate adds a workflow context manager that wraps
parsl.load()so that users do not have to interact with Parsl to use Chiltepin. It allows resource configs to be loaded with an include option. It also allows for custom paths for runinfo and parsl logging.