Add cbcflow testing#116
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces end-to-end/CI coverage around CBCFlow usage and broader workflow execution, alongside a bugfix to improve CBCFlow run correctness (notably around analysis directory layout and scheduler/monitor plumbing).
Changes:
- Updates tests, scripts, docs, and configs to use the
analyses/directory instead ofC01_offline/. - Adds new testing modules (monitor helpers/API, optional dependencies, strategies, HTML reporting) plus HTCondor-based CI workflows.
- Introduces/extends infrastructure modules (strategies expansion, scheduler utilities, pydantic-based priors, lazy file logging, plugin command discovery).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_pipelines/test_lalinference.py | Update git-add paths to new analyses/ layout for pipeline test data. |
| tests/test_pipelines/test_bayeswave.py | Update git-add and DAG path assertions to analyses/ layout. |
| tests/test_pesummary_subject_analysis.py | Add SubjectAnalysis tests for PESummary combination behavior. |
| tests/test_optional_dependencies.py | Add tests for optional/required dependency semantics. |
| tests/test_monitor_helpers.py | Add unit tests for new monitor helper functions. |
| tests/test_monitor_api.py | Add unit tests for new programmatic monitor API. |
| tests/test_logging.py | Add tests for lazy/rotating file logging behavior. |
| tests/test_html_report.py | Add tests for HTML report rendering enhancements. |
| tests/test_data/test_strategy_single.yaml | Add test blueprint for single-parameter strategy expansion. |
| tests/test_data/test_strategy_matrix.yaml | Add test blueprint for matrix strategy expansion. |
| tests/test_data/test_strategy_event.yaml | Add test event blueprint used by strategy tests. |
| tests/test_data/blueprints/test_analysis_blueprint.yaml | Add minimal analysis blueprint fixture. |
| tests/test_custom_states.py | Add unit tests for custom monitor states/handlers. |
| tests/test_cli_manage.py | Update path assertions to match analyses/ directory structure. |
| tests/test_blueprints/subject_test_pipeline.yaml | Add blueprint for testing SubjectTestPipeline. |
| tests/test_blueprints/simple_test_pipeline.yaml | Add blueprint for testing SimpleTestPipeline. |
| tests/test_blueprints/project_test_pipeline.yaml | Add blueprint for testing ProjectTestPipeline. |
| tests/test_blueprints/lalinference_quick_test.yaml | Add quick LALInference blueprint fixture. |
| tests/test_blueprints/gwosc_quick_test.yaml | Add quick GWOSC configuration blueprint fixture. |
| tests/test_blueprints/gwosc_get_data.yaml | Add GW data download analysis blueprint fixture. |
| tests/test_blueprints/gwosc_event.yaml | Add a GWOSC-style event blueprint fixture. |
| tests/test_blueprints/bilby_quick_test.yaml | Add quick bilby analysis blueprint fixture. |
| tests/test_blueprints/bayeswave_quick_test.yaml | Add quick BayesWave analysis blueprint fixture. |
| tests/test_blueprints.py | Add importability smoke test for blueprints module. |
| tests/test_asimov.py | Update version-detection tests to use importlib.metadata errors. |
| tests/test_application.py | Add tests validating strategy blueprint expansion into analyses. |
| tests/test_analysis.py | Ensure tmp directory is reset before analysis tests run. |
| tests/mock_gwdatafind_server.py | Add mock GWDataFind HTTP server used for isolated tests. |
| tests/manual_test_priors.py | Add manual prior-system integration script (non-automated). |
| tests/integration/test_gwtc2d1.py | Update pipeline category directory from C01_offline to analyses. |
| tests/integration/GW190426190642.yaml | Update calibration/PSD paths to analyses/. |
| scripts/find_calibration.py | Update commit destinations to analyses/calibration/. |
| scripts/check-ifo.py | Update commit destinations to analyses/calibration/. |
| sandbox/make-nonspin.py | Use repository default branch instead of assuming master. |
| sandbox/gitlab-issue-tests.py | Update run category paths to analyses/. |
| pyproject.toml | Add dependencies/entry points incl. pydantic and testing pipelines. |
| examples/strategy_examples.yaml | Add strategy usage examples. |
| examples/scheduler_example.py | Add scheduler API example script. |
| examples/pesummary_subject_analysis.yaml | Add PESummary SubjectAnalysis blueprint examples. |
| examples/dependency-examples.yaml | Add dependency specification examples (optional/AND/OR/negation). |
| examples/demo_html_output.py | Add demo script for HTML dependency/stale indicators. |
| examples/demo_graph_fix.py | Add demo script for dependency graph/modal dependency data. |
| examples/README.rst | Add examples directory documentation (rst). |
| examples/README.md | Add examples directory documentation (md). |
| examples/MODAL_DEPENDENCIES_GUIDE.md | Document new modal dependency display behavior. |
| docs/source/user-guide/running.rst | Update docs output examples to analyses/ directory naming. |
| docs/source/test-interface.rst | Update docs path example to analyses/ directory naming. |
| docs/source/scheduler-integration.rst | Add scheduler integration guide. |
| docs/source/python-api.rst | Add docs for Python API usage. |
| docs/source/priors.md | Add documentation for pydantic-based priors/interfaces. |
| docs/source/index.rst | Wire new docs pages into the Sphinx index. |
| docs/source/config.rst | Update docs examples to analyses/ directory naming. |
| docs/source/conf.py | Enable sphinx autodoc for pydantic models. |
| docs/source/build-process.rst | Update docs examples to analyses/ directory naming. |
| docs/source/blueprints.rst | Expand docs for new dependency syntax + strategies. |
| docs/source/api/schedulers.rst | Add API docs entry for scheduler module. |
| docs/source/api/project.rst | Add API docs entry for Project class. |
| docs/source/analyses.rst | Document optional dependencies and SubjectAnalysis usage. |
| conda/environment.yaml | Add conda environment dependency list for CI-like installs. |
| asimov/strategies.py | Add strategy expansion implementation. |
| asimov/scheduler_utils.py | Add scheduler configuration helpers/decorator/job mapping. |
| asimov/priors.py | Add pydantic-based prior specification + interface base classes. |
| asimov/pipelines/testing/init.py | Add minimal testing pipelines package exports. |
| asimov/pipelines/testing/README.md | Document testing pipelines and their purpose/usage. |
| asimov/pipelines/rift.py | Switch DAG submission to scheduler API + analyses/ paths. |
| asimov/pipelines/lalinference.py | Add LALInference prior interface + switch DAG submission to scheduler API. |
| asimov/pipelines/bayeswave.py | Switch DAG submission to scheduler API + analyses/ default category. |
| asimov/olivaw.py | Add plugin command discovery + project-aware click group + entry_points compat. |
| asimov/monitor_helpers.py | Add reusable monitor helpers for state transitions. |
| asimov/monitor_context.py | Add context object for monitor state handlers. |
| asimov/monitor_api.py | Add programmatic monitor API (run_monitor/status/list). |
| asimov/ledger.py | Make ledger location absolute + improve backward compatibility for project analyses. |
| asimov/git.py | Add default-branch detection + modernize repo init defaults + update logic. |
| asimov/configs/subjecttestpipeline.ini | Add template config for SubjectTestPipeline. |
| asimov/configs/simpletestpipeline.ini | Add template config for SimpleTestPipeline. |
| asimov/configs/projecttestpipeline.ini | Add template config for ProjectTestPipeline. |
| asimov/configs/lalinference.ini | Use prior interface in template + update amporder access. |
| asimov/configs/bilby.ini | Use prior interface + pipeline helpers (sampler kwargs, additional files). |
| asimov/configs/README.rst | Document scheduler configuration in configs README. |
| asimov/condor.py | Prefer htcondor2 when available + route submit/delete through scheduler abstraction. |
| asimov/cli/project.py | Update logging config key + robust python executable detection + set up file logging during init. |
| asimov/cli/manage.py | Ensure file logging setup for manage commands + adjust submission logic and SubjectAnalysis readiness gating. |
| asimov/cli/blueprint.py | Add asimov blueprint validate command. |
| asimov/asimov.conf | Update calibration directory default to analyses. |
| asimov/init.py | Switch to importlib.metadata/resources + add lazy, rotating, thread-safe file logging setup. |
| LICENSE | Update license text to MIT-style grant statement. |
| IMPLEMENTATION.md | Add implementation notes for dependency management + docs pointers. |
| CHANGELOG.rst | Add extensive 0.7.0-alpha2 changelog entry. |
| .gitlab-ci.yml | Add HTCondor CI job to exercise project creation/apply steps. |
| .github/workflows/testing-pipelines.yml | Add HTCondor-based end-to-end workflow for testing pipelines. |
| .github/workflows/python-app.yml | Expand test matrix + add tag-based publish workflow. |
| .github/workflows/docs.yml | Add Sphinx multiversion docs build/deploy workflow. |
| .github/workflows/cbcflow-tests.yml | Add CBCFlow integration workflow (allowed to fail). |
| .github/actions/wait-for-files/action.yml | Add composite action to wait for output artifacts in HTCondor tests. |
| .github/actions/setup-htcondor/action.yml | Add composite action to bring up HTCondor in workflow container. |
| .github/actions/setup-asimov-env/action.yml | Add composite action to provision conda env + install asimov. |
| .github/actions/run-asimov-command/action.yml | Add composite action to run asimov commands as submituser. |
| .github/actions/create-submit-user/action.yml | Add composite action to create submituser with permissions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
pipe.submit_dag() is not consistently a scalar across pipelines (e.g., BayesWave returns a tuple like (int(cluster_id),)). Casting a tuple to int will raise TypeError and break submissions for those pipelines. Normalize cluster_id the same way you already do later in this file (treat list/tuple as sequence and take the first element) before assigning analysis.job_id.
| cluster_id = pipe.submit_dag(dryrun=dryrun) | |
| # Normalize cluster_id in case some pipelines return a sequence | |
| if isinstance(cluster_id, (list, tuple)): | |
| cluster_id = cluster_id[0] |
There was a problem hiding this comment.
self.event is not defined anywhere in the shown GitRepo class, so this warning path can raise AttributeError while already handling an exception, masking the original failure and breaking get_default_branch(). Log a stable attribute like self.directory (or the remote URL if you have it) instead of self.event.
There was a problem hiding this comment.
This file is named like a conda environment YAML, but it is not a valid environment.yaml format (it lacks name: and dependencies: keys). If CI/scripts run conda env create -f conda/environment.yaml, it will fail to parse. Convert it to a standard conda env spec (or rename it to something like conda/requirements.txt / conda/spec.txt if it’s intended to be used with conda install --file).
| name: bayeswave-env | |
| channels: | |
| - conda-forge | |
| dependencies: | |
| - bayeswave | |
| - bayeswaveutils | |
| - bilby_pipe | |
| - asimov-gwdata | |
| - pip |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Description
This PR adds end-to-end testing for CBCFlow and fixes a minor bug which prevented proper CBCFlow running.
Type of Change