Releases: Framework-R-D/phlex
Phlex v0.2.0
Important
This is a prototype release. It is known to have incomplete functionality with respect to the Phlex conceptual design; backwards compatibility of API is not guaranteed. The following API is intended for use:
PHLEX_REGISTER_ALGORITHMS(...)opener for registering physics algorithmsPHLEX_REGISTER_PROVIDERS(...)opener for registering data-product providersPHLEX_REGISTER_DRIVER(...)opener for registering a user-defined framework-driver function- Anything in the top-level
phlexnamespace
Any interface (namespaces, functions, classes, etc.) that contains the strings experimental, internal, or detail should not be directly used.
Phlex v0.2.0 is the second prototype release of the Phlex framework. The purpose of the v0.2.0 release is to allow early adopters of Phlex to continue exercising the basic functionalities provided by Phlex v0.1.0, while testing a few new features, such as:
- A user-defined API for registering C++ framework drivers according to fixed hierarchies
- A richer grammar for specifying data products that serve as input to algorithms
- Python providers that can emit Python data products
- Writing user-defined C++ data products to framework files
Instructions for building code that uses Phlex and running simple Phlex jobs can be found in the phlex-examples repository.
Note
Phlex v0.2.0 uses C++23. You will need a compiler with sufficient C++23 support to build and install this release (GCC 15, LLVM 21, etc.)
Specific Features
-
API to register C++ fixed-hierarchy drivers
- Users will be able to specify a fixed hierarchy by which data cells can be processed by the framework (see the interface described at the top of #443 for an example)
- Hierarchies as read from input files are not yet supported
- For most users, it will be sufficient to continue using the
generate_layersdriver plugin as provided in Phlex v0.1.0 and described at #145.
-
Product specification with the creator name
- Phlex v0.2.0 replaces the
"<product_name>"_in("<data layer>")syntax with a more expressive syntax that specifies product constraints:where the- "<product_name>"_in("<data layer>") + { .creator = "<product_creator>", .layer = "<data layer>", .suffix = "<product suffix>" }
suffixfield is only necessary when disambiguating between products of the same type created by an algorithm.
- Phlex v0.2.0 replaces the
-
Provide access to product creator name, suffix, and phase name through handles
- The
phlex::handle<T>interface now provides access to the product creator and product suffix (not provided in Phlex v0.1.0) in addition to the product itself and its data-cell index.
- The
-
Algorithms that can access multiple data products from different data layers of the same hierarchy path
- A hierarchy path is a path defined as a chain of data-cell indices generated by
data_cell_cursor::yield_child(...)invocations - In #443, allowed paths include
job -> run -> subrun -> spill,job -> run,job -> run -> calibration_period, etc. - With Phlex v0.2.0, multiple data products that belong to the same hierarchy path may appear as arguments to a user's algorithm.
- A hierarchy path is a path defined as a chain of data-cell indices generated by
-
Providers that can emit Python data products
- See one of the Phlex unit tests for an example of how this can be done
- An example will soon be provided in the phlex-examples repository.
-
Writing user-defined C++ data products to framework files
- Users interested in doing this should contact the FORM developers for explicit instructions.
-
Switch from C++20 to C++23
- Upgrading to C++23 brings the implementation into conformance with the Phlex CDR
-
Enable writing of data products from providers to the output
- This was not supported with Phlex v0.1.0. With Phlex v0.2.0, and data products provided by providers are suitable for writing to a FORM output file.
Included Pull Requests
- Support the installation and use of
actto test and run GitHub workflows by @greenc-FNAL in #222 - Add Project Context & Workflow section to copilot-instructions.md by @Copilot in #236
- Replace moribund
cmake-formatwithgersemiby @greenc-FNAL in #169 - Add minor clarifications and cautions to INSTALLATION.md by @marcpaterno in #237
- Apply gersemi formatting by @greenc-FNAL in #239
- Convert Boost JSON string to
std::string_viewby @knoepfel in #225 - Fix #220 by @beojan in #241
- run_phlex needs to depend publicly on the library its public headers use by @pcanal in #242
- VSCode dev container setup and workspace config by @greenc-FNAL in #87
- Switch to
dynamic_castinstead of string comparison for product retrieval by @knoepfel in #203 - Fix AI hallucination (no such mount option
required=false) by @greenc-FNAL in #246 - Simplify implementation for forming input arguments by @knoepfel in #244
- Safer
product_queryconstruction by @knoepfel in #205 - Increase ruff's target python version to 3.12 by @wlav in #247
- New copilot instructions re the purpose of comments by @greenc-FNAL in #251
- Use
find_packagearguments to mandate NumPy by @knoepfel in #219 - Fix CodeQL workflow: correct alert collection bug and improve fork PR handling by @greenc-FNAL in #249
- Fix workflow naming per @knoepfel report by @greenc-FNAL in #254
- Add Python test coverage by @greenc-FNAL in #250
- Export Python symbols globally for
pymoduleby @knoepfel in #253 - Include python and py-numpy as roots of CI environment by @knoepfel in #255
- fix(ci): Ensure CodeQL comment workflow only runs on success by @google-labs-jules[bot] in #258
- Improve Workflow Robustness and Feedback by @google-labs-jules[bot] in #256
- Update how type information is passed from Phlex to FORM by @pcanal in #252
- Shift
async_drivergear into park if exception from workflow graph by @knoepfel in #269 - Refactor workflows for external repositories by @greenc-FNAL in #262
- Remove unwanted ":" from headings in
REUSABLE_WORKFLOWS.mdby @greenc-FNAL in #271 - Quote
$GITHUB_OUTPUTwhere used by @greenc-FNAL in #277 - Add workflow_dispatch to all relevant workflows by @greenc-FNAL in #272
- Add markdownlint check and fix workflows by @greenc-FNAL in #274
- Add jsonnet-format check and fix workflows by @greenc-FNAL in #273
- Restore integer representation of
nprocvalue by @knoepfel in #283 - JSON parsing changes from new product query by @beojan in #282
- Use native CMake functionality for stripping trailing whitespace by @knoepfel in #285
- Upgrade Phlex to build with C++23 by @knoepfel in #284
- Revert to
cmake-buildworkflow from themainbranch by @knoepfel in #289 - Homogenize "count" interface by @knoepfel in #287
- Update CI container by @knoepfel in #294
- Restore
configure-cmakeaction frommainbranch by @knoepfel in #295 - Workflow standardization and improvements by @greenc-FNAL in #290
- Fix workflow execution: coverage/build on workflow_dispatch, build on push to main by @Copilot in #296
- Set auto-merge (subject to branch protections) on dependabot PRs by @greenc-FNAL in #297
- Safety and correctness improvements by @greenc-FNAL in #300
- Remove vestigial inheritance from
std::enable_shared_from_thisby @knoepfel in #293 - Add phlex::identifier by @beojan in #288
- Enable coverage monitoring for non-test Python modules by @Copilot in #304
- Rename
product_store::id()toproduct_store::index()by @kno...
Phlex v0.1.0
Important
This is a prototype release. It is known to have incomplete functionality with respect to the Phlex conceptual design; backwards compatibility of API is not guaranteed. The following API is intended for use:
PHLEX_REGISTER_ALGORITHMS(...)opener for registering physics algorithmsPHLEX_REGISTER_PROVIDERS(...)opener for registering data-product providers- Anything in the top-level
phlexnamespace
Any interface (namespaces, functions, classes, etc.) that contains the strings experimental, internal, or detail should not be directly used.
Phlex v0.1.0 is the first prototype release of the Phlex framework. The purpose of the v0.1.0 release is to allow early adopters of Phlex to exercise its basic functionalities, which include:
- Specifying C++ algorithms as operators to the
transform,observe,fold, andunfoldhigher-order functions - Specifying Python algorithms as operators to the
transformandobservehigher-order functions - Executing
phlexprograms using Jsonnet/JSON runtime configurations that load compiled plugins - Configuring a Phlex-provided driver to produce a user-defined hierarchy (a tree) of data layers
- Writing data products with basic types to Phlex output files through FORM
- Accessing data-cell information through
phlex::handle<T>objects for data products being used by algorithms
Instructions for building code that uses Phlex and running simple Phlex jobs can be found in the phlex-examples repository.
Specific Features
Phlex v0.1.0 provides the following capabilities:
- API to register algorithms for C++ and Python
- Phlex executable
- Configuration
- Supported language is Jsonnet
- Ability to configure which modules are loaded (includes ability to configure which algorithms specified in the module are registered)
- Ability to configure a Phlex-provided driver regarding which layers should be emitted
- Product specification
- C++ language type
- Global product "name"
- Data layer
- Higher-order functions
- Transform (C++, Python)
- Observer (C++, Python)
- Fold (C++)
- Unfold (C++)
- Access to product information (including data-cell ID) through handles
- Algorithms that can access multiple data products from the same data layer
- Python algorithm that can consume a data product produced by a C++ algorithm
- C++ algorithm that can consume a data product produced by a Python algorithm
- C++ providers that can emit C++ data products
Included Pull Requests
- Optionally build with experimental FORM integration by @greenc-FNAL in #1
- Place form subdirectory at the top level by @knoepfel in #2
- Include formatting info for
std::atomic<>by @greenc-FNAL in #3 - Space between quotes and suffix is deprecated in C++23 by @greenc-FNAL in #4
- Tweak CMake style to match Cetmodules by @greenc-FNAL in #6
- More
spdlog/fmtfixes/improvements by @greenc-FNAL in #5 - Initial form prototype by @gemmeren in #8
- Remove dependence on boost backtrace by @wddgit in #12
- Remove set functions by @gemmeren in #13
- Form updates by @gemmeren in #11
- Ensure that ReadVector runs after WriteVector by @knoepfel in #23
- Continuous Integration on github Actions by @aolivier23 in #25
- Allow py:phlex to work without installing header files (use source instead) by @pcanal in #28
- Use configuration for I/O, plus general cleanup by @barnaliy in #22
- Apply clang-format 20 by @knoepfel in #26
- Warn only once per build directory about missing DOT by @pcanal in #30
- Ask github clangformat action's shell to not interpret comment by @pcanal in #31
- Remove for_each(...) registration API by @knoepfel in #34
- Adjust registration API for predicates and observers by @knoepfel in #35
- Remove need for
detail::port_names(...)by @knoepfel in #37 - Use Boost PFR in
node_catalogby @knoepfel in #38 - Change observer/predicate API to use input_family(...) by @knoepfel in #39
- Verify that a data product can be a vector of abstract types by @knoepfel in #40
- Use
simple_ptr_mapand other cleanups by @knoepfel in #41 - Apply clang-format to concept definitions by @knoepfel in #42
- Use different implementation for
when(...)clause by @knoepfel in #43 - FORM container config by @aolivier23 in #36
- Workflow lint tweaks and rename for clarity by @greenc-FNAL in #47
- Actions for cmake-format by @greenc-FNAL in #48
- Turn reusable parts of cmake-build into composite actions by @greenc-FNAL in #51
- Add support and preliminary configuration for clang-tidy by @greenc-FNAL in #49
- Update CI container with dev tools by @greenc-FNAL in #55
- Refactoring to avoid unnecessary includes and minimize template instantiations by @knoepfel in #44
- Copilot instructions by @greenc-FNAL in #52
- Remove now-unnecessary inputs and conditional actions by @greenc-FNAL in #58
- Allow generator specification for actions by @greenc-FNAL in #56
- Add support and actions for coverage monitoring by @greenc-FNAL in #50
clang-tidy-checkshould use composable actions to retain context by @greenc-FNAL in #59- Fix
coverage.shpath normalization by @greenc-FNAL in #64 - Add logic to bypass unneeded container load/workflow by @greenc-FNAL in #62
- Fix filtering race condition by @knoepfel in #65
- Resolve
[clang-diagnostic-error]issues when runningclang-tidyby @greenc-FNAL in #69 - Update and use image; fix/improve clang-tidy use by @greenc-FNAL in #77
- Disable CMake module scanning to prevent
clang-diagnostic-errorby @greenc-FNAL in #79 - Preliminary integration with Cetmodules 4 by @greenc-FNAL in #7
- Integrate clang-tidy with PR comments by @google-labs-jules[bot] in #80
- Improve coverage test reporting by @greenc-FNAL in #63
- Tweaks to clang-tidy configuration by @knoepfel in #82
- Create and schedule weekly CodeQL checks by @greenc-FNAL in #83
- Do not override clang-tidy header filter on command line by @knoepfel in #84
- [clang-tidy] Disable strict nodiscard and implicit Boolean conversion checks by @knoepfel in #88
- Update registration for transforms, folds, unfolds, and output modules by @knoepfel in #60
- maintenance/copilot instructions markdown by @greenc-FNAL in #89
- Adjust header guards to use LLVM style by @knoepfel in #93
- Remove unused code when forming graph by @knoepfel in #92
- Overhaul coverage tooling for GCC and Clang by @greenc-FNAL in #94
- Improvements to CI image, including installation of Ruff by @greenc-FNAL in #97
- Fix schema issue by @greenc-FNAL in #98
- Re-work image generation by @greenc-FNAL in #100
- Fix reference to removed image in coverage workflow by @greenc-FNAL in #103
- Adjust unfold so that it doesn't need a multiplexer by @knoepfel in #95
- Restore erroneously-removed sourcing of
entrypoint.shby @greenc-FNAL in #115 - Clang-tidy configuration adjustment by @knoepfel in #102
- Produce PR comment with summary on new or resolved alerts by @greenc-FNAL in #114
- Handles are valid upon construction by @knoepfel in #96
- R...