Phlex v0.3.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 explicit data-product providersPHLEX_REGISTER_SOURCE(...)opener for registering a user-defined input sourcePHLEX_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.3.0 is the third prototype release of the Phlex framework. The purpose of the v0.3.0 release is to allow early adopters of Phlex to continue exercising the functionalities provided by Phlex v0.2.0, while testing a few new features, such as:
- Support for reading data products from FORM files
- A user-defined API for registering input sources, from which data-product providers are implicitly registered
- Algorithms that operate on a data layer downstream of an unfold and that receive data products produced by that unfold
- A renamed and simplified product-selection grammar (
product_selector) in which the creator name is optional - Native Numba support for transforms, enabling GIL-free execution of JIT-compiled algorithms
Instructions for building code that uses Phlex and running simple Phlex jobs can be found in the phlex-examples repository.
Note
Phlex v0.3.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
-
FORM improvements
- FORM gains a revised source infrastructure, writing of fundamental types through
TTree, a technology loop across storage backends, output-metadata writing, reading of FORM input files (without metadata) via aphlex::source, and an initialRNTupledraft (#552, #597, #599, #612, #625, #647, #635, #674).
- FORM gains a revised source infrastructure, writing of fundamental types through
-
API to register input sources and implicitly registered providers
- Phlex v0.3.0 introduces a
phlex::sourcebase class, thePHLEX_REGISTER_SOURCEopener, and theg.add_source<T>(...)registration, along with aphlex::provider_bundleclass (see #637). - Data-product providers can now be implicitly registered from a user-defined source, so users no longer need to register each provider explicitly (#630).
- The
phlex::index_generatortype allows a source to lazily emit data-cell indices, supporting driver coroutines (#618). - Drivers can now access configured sources in a type-safe way, with driver functions receiving typed source parameters resolved from the registered sources (#658).
- Phlex v0.3.0 introduces a
-
Algorithms downstream of an unfold may consume that unfold's data products
-
Simplified product-selection grammar
-
Native Numba support
- Numba-compiled transforms can now be called directly through a libffi-based dispatch, bypassing the Python interpreter (and the GIL) during graph execution and enabling strong scaling. This initial support covers transforms operating on builtin scalar types (#626).
-
Experimental
layer_pathabstraction for hierarchy paths- A new
phlex::experimental::layer_pathclass replaces the prior string-based representation of hierarchy paths used by theindex_routerand related infrastructure (#640).
- A new
-
Hardened code base and tooling
- Hundreds of
clang-tidyfindings (bugprone, cert, clang-analyzer, cppcoreguidelines, performance, portability, and modernize checks) have been resolved across the code base in preparation for tightening enforcement. - Shared libraries are now armored with explicit symbol visibility, and a Sphinx/Doxygen/Breathe documentation framework has been added for the
phlexandphlex::experimentalAPIs (#322, #323).
- Hundreds of
Included Pull Requests
- A more inclusive handling of Catch2's use of
__COUNTER__by @greenc-FNAL in #478 - Metaprogramming using Boost.CallableTraits and Boost.MP11 by @beojan in #444
- Update pre-commit hooks, including
markdownlint-cli2by @greenc-FNAL in #481 - Add Perfetto profiling support to CI workflow by @greenc-FNAL in #341
- Armor shared libraries with symbol visibility; add _internal companions and build-type-aware optimizations by @Copilot in #322
- Apply pre-commit changes pursuant to #481 by @knoepfel in #482
- Make generated macros consistent with UPPER_CASE convention by @knoepfel in #483
- Add Sphinx/Doxygen/Breathe documentation framework for phlex and phlex::experimental API by @Copilot in #323
- Fix clang-tidy --export-fixes race condition; use run-clang-tidy by @greenc-FNAL in #486
- Use
DISABLEDtest property fordifferent_hierarchiestest by @knoepfel in #492 clang-tidy: resolvebugprone-random-generator-seedby @greenc-FNAL in #490clang-tidy: fixbugprone-reserved-identifierby @greenc-FNAL in #489clang-tidy: resolvebugprone-throwing-static-initializationby @greenc-FNAL in #472clang-tidy: resolvebugprone-exception-escapeby @greenc-FNAL in #491clang-tidy: resolve bugprone-multi-level-implicit-pointer-conversion by @greenc-FNAL in #494clang-tidy: resolvebugprone-return-const-ref-from-parameterby @greenc-FNAL in #499clang-tidy: resolvebugprone-implicit-widening-of-multiplication-resultby @greenc-FNAL in #496- maintenance/clang tidy script improvements by @greenc-FNAL in #502
clang-tidy: resolvebugprone-unchecked-optional-accessby @greenc-FNAL in #495clang-tidy: resolvebugprone-macro-parenthesesby @greenc-FNAL in #500clang-tidy: resolvebugprone-narrowing-conversionsby @greenc-FNAL in #497- improve error handling consistency by @wlav in #525
clang-tidy: resolverand()-relatedcert-*issues by @greenc-FNAL in #527clang-tidy: resolvecert-dcl50-cpp(modernize-avoid-variadic-functions) by @greenc-FNAL in #529clang-tidy: resolvecert-err33-c(dangerous return discard fromlibcfunctions) by @greenc-FNAL in #528clang-tidy: resolvecert-oop54-cppby @greenc-FNAL in #526- Add branch push triggers for
release/*branches by @greenc-FNAL in #531 clang-tidy: resolveclang-analyzer-coreproblems by @greenc-FNAL in #538- Test that repeaters never emit data products for flush counts of 0 by @knoepfel in #533
- Provide actionable diagnostic data when the problem location is outside Phlex by @greenc-FNAL in #537
clang-tidy: resolvecppcoreguidelines-avoid-non-const-global-variablesby @greenc-FNAL in #544clang-tidy: resolvecppcoreguidelines-noexcept-move-operationsby @greenc-FNAL in #549- Fix real heap leaks in py_callback registrations; suppress Boost false positive by @greenc-FNAL in #541
clang-tidy: resolvecppcoreguidelines-explicit-virtual-functionsby @greenc-FNAL in #545clang-tidy: resolvecppcoreguidelines-missing-std-forwardby @greenc-FNAL in #547clang-tidy: resolvecppcoreguidelines-avoid-const-or-ref-data-membersby @greenc-FNAL in #543- Revised implementation of FORM source infrastructure by @wwuoneway in #552
clang-tidy: resolvecppcoreguidelines-init-variablesby @greenc-FNAL in #546clang-tidy: resolvecppcoreguidelines-no-mallocby @greenc-FNAL in #548clang-tidy: resolveperformance-avoid-endlby @greenc-FNAL in #563clang-tidy: resolvecppcoreguidelines-rvalue-reference-param-not-movedby @greenc-FNAL in #559clang-tidy: resolveperformance-no-int-to-ptrby @greenc-FNAL in #564clang-tidy: resolvecppcoreguidelines-pro-type-member-initby @greenc-FNAL in #555clang-tidy: resolvecppcoreguidelines-special-member-functionsby @greenc-FNAL in #560clang-tidy: resolvecppcoreguidelines-use-default-member-initby @greenc-FNAL in #556clang-tidy: resolvecppcoreguidelines-pro-type-varargby @greenc-FNAL in #558clang-tidy: resolvecppcoreguidelines-pro-type-union-accessby @greenc-FNAL in #557clang-tidy: resolvecppguidelines-pro-type-*cast*by @greenc-FNAL in #554clang-tidy: resolvecppcoreguidelines-owning-memoryby @greenc-FNAL in #551- Add clang-tidy new-issue detection for modified lines by @greenc-FNAL in #539
- FORM Missing Branch Error Message by @aolivier23 in #570
- Replace
char const*withchar*as appropriate by @knoepfel in #572 - Add git-ai-commit script for AI-powered commit message generation by @greenc-FNAL in #567
- Initial support for kilocode (
fnal-litellm) by @greenc-FNAL in #568 - Fix bugs in CI scripts and workflows; add test suites and improve documentation by @greenc-FNAL in #573
- Update CI container and Spack configuration for improved build reliability by @greenc-FNAL in #575
- Accommodate oneTBB 2023.0.0 resource-limiting interface by @knoepfel in #576
- Avoid maybe-uninitialized GCC warnings by @knoepfel in #577
- Improve
scripts/testing and ergonomics by @greenc-FNAL in #578 - Improve error handling in git-ai-commit and add comprehensive tests by @greenc-FNAL in #579
clang-tidy: resolveperformance-faster-string-findby @greenc-FNAL in #584clang-tidy: resolveperformance-move-const-argby @greenc-FNAL in #587clang-tidy: resolveperformance-inefficient-string-vector-operationby @greenc-FNAL in #586clang-tidy: resolveperformance-enum-sizeby @greenc-FNAL in #583clang-tidy: document incidental fix ofperformance-type-promotion-in-math-fnby @greenc-FNAL in #589clang-tidy: resolvemodernize-use-nullptrby @greenc-FNAL in #592clang-tidy: resolvegoogle-explicit-constructorby @greenc-FNAL in #581- Optimize FORM storage init by replacing double find with insert(...).first by @wwuoneway in #582
- Adopt Claude-suggested optimization for
async_driverby @knoepfel in #596 - Provider adjustments in anticipation of v0.3 by @knoepfel in #580
- FORM TTree Write Fundamental Types by @aolivier23 in #597
- Form Test Writing Fundamental Types by @aolivier23 in #599
- Fix compilation with GCC 16 by @beojan in #601
- Exclude
scripts/path fromunittestscode coverage by @knoepfel in #598 clang-tidy: resolveportability-template-virtual-member-functionby @greenc-FNAL in #591clang-tidy: resolveperformance-unnecessary-copy-initializationby @greenc-FNAL in #590- Move provider API away from misusing product_query for outputs by @beojan in #602
- Support multi-layer algorithms that receive a data product from an unfold by @knoepfel in #571
- Fix clang-tidy PR comments for fork PRs via workflow_run by @greenc-FNAL in #610
- More workflow and documentation improvements by @greenc-FNAL in #611
- FORM Testing Loop Over Technologies by @aolivier23 in #612
- Optimize some hot paths by @knoepfel in #603
clang-tidy: resolveperformance-inefficient-string-concatenationby @greenc-FNAL in #585- Add coverage monitoring analysis report for May 2026 by @greenc-FNAL in #593
- Product query (now
product_selector) cleanup and rename by @beojan in #616 clang-tidy: resolveperformance-no-automatic-moveby @greenc-FNAL in #588- Some cleanups per @beojan, etc. by @knoepfel in #615
- Accommodate
product_specificationAPI change by @knoepfel in #620 - Fix CodeQL PR comment: alert count collapse and non-filtered report link by @Copilot in #617
- Make creator name optional by @beojan in #621
- Constrain exposed API of graph-proxy objects by @knoepfel in #624
- Introduce
phlex::index_generatorto support driver coroutines by @knoepfel in #618 - FORM Test Technology Loop Part 2 by @aolivier23 in #625
- Omit
asserts from code-coverage results by @knoepfel in #634 - Refactor edge-making into clearer stages by @knoepfel in #633
- Change location of
jsonnetimage by @greenc-FNAL in #645 - Support
phlex::sources and implicit providers by @knoepfel in #637 - fix(devcontainer): drop --format=docker from buildOptions by @Ahmed-Idani in #606
- Improve AI integration with devcontainer and tools by @greenc-FNAL in #646
- Introduce layer_path class by @beojan in #640
- chore: use standalone action repositories by @greenc-FNAL in #639
- Use
zendesk/setup-jsonnetaction for reliablego-jsonnetretrieval by @greenc-FNAL in #649 - Form write output metadata by @wwuoneway in #647
- Fix fold-result type by @knoepfel in #650
- FORM RNTuple Draft by @aolivier23 in #635
- Update CI container image to support Numba and libffi by @knoepfel in #657
- Bump actions/checkout from 6.0.3 to 7.0.0 by @app/dependabot in #655
- Bump Framework-R-D/action-configure-cmake from 1 to 2 by @app/dependabot in #654
- Bump actions/setup-python from 6.2.0 to 6.3.0 by @app/dependabot in #660
- Fix emplacement of implicit providers for multiple downstream nodes by @knoepfel in #664
- Initial Numba support by @wlav in #626
- Add stage name to handle by @beojan in #663
- revert the metadata part introduced in PR647 by @wwuoneway in #665
- Fix latent memory error exposed by
fixed_hierarchy_testby @knoepfel in #668 - Bump Framework-R-D/action-complete-pr-comment from 1 to 2 by @app/dependabot in #669
- Bump Framework-R-D/action-run-change-detection from 1 to 2 by @app/dependabot in #670
- Bump Framework-R-D/action-post-clang-tidy-results from 1 to 2 by @app/dependabot in #671
- Bump Framework-R-D/action-handle-fix-commit from 1 to 2 by @app/dependabot in #672
- Fix workflow-dispatch action triggering of code-coverage by @knoepfel in #673
- FORM read files without metadata by @wwuoneway in #674
- Allow drivers to access configured sources by @knoepfel in #658
- workaround for numpy 2.5 typing origin change by @wlav in #675
- Form read extend data type by @wwuoneway in #676
- Explicitly include Cet CMake modules by @greenc-FNAL in #678
- Rationalize namespaces by @knoepfel in #679
New Contributors
- @Ahmed-Idani made their first contribution in #606
Full Changelog: v0.2.0...v0.3.0