From 49a2f8415d1f2a4f5877df87359f657de64932d0 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 28 Jun 2026 06:53:15 -0400 Subject: [PATCH 1/3] Declare documented API public (downstream ExplicitImports) Mark Catalyst's documented-but-not-exported names as `public` via the existing `SciMLPublic.@public` mechanism, so downstream packages that qualified-access these names (`Catalyst.name`) pass ExplicitImports' check_all_qualified_accesses_are_public. Only names that are defined in src, documented (docstring and/or docs/src), and not already exported are publicized. Bumps patch version. Co-Authored-By: Chris Rackauckas --- Project.toml | 2 +- src/Catalyst.jl | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9a27264231..c12161ba5c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Catalyst" uuid = "479239e8-5488-4da2-87a7-35f2df7eef83" -version = "16.2.0" +version = "16.2.1" [deps] Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" diff --git a/src/Catalyst.jl b/src/Catalyst.jl index 65542edd63..1c2988a560 100644 --- a/src/Catalyst.jl +++ b/src/Catalyst.jl @@ -101,6 +101,10 @@ include("reaction.jl") export isspecies export Reaction, PhysicalScale +# Documented `Reaction` predicates and metadata accessors (public, not exported). +@public isbc, isconstant, isvalidreactant +@public hasnoisescaling, getnoisescaling, hasdescription, getdescription, hasmisc, getmisc + # Union type for `Reaction`s and `Equation`s. const CatalystEqType = Union{Reaction, Equation} @@ -116,6 +120,10 @@ export reactionrates export set_default_noise_scaling export ode_model, sde_model, jump_model, ss_ode_model, hybrid_model +# Documented `ReactionSystem`/`ReactionComplex` types and accessors (public, not exported). +@public ReactionComplex, ReactionComplexElement +@public get_species, get_rxs, get_networkproperties, reset_networkproperties! + # Mark unit validation APIs as public without exporting them. @public validate_units, assert_valid_units, unit_validation_report @public UnitValidationError, UnitValidationIssue, UnitValidationReport @@ -132,6 +140,9 @@ export ODEProblem, SDEProblem, JumpProblem, NonlinearProblem, SteadyStateProblem, HybridProblem export ismassaction, oderatelaw, jumpratelaw +# Documented symbolic-map helper (public, not exported). +@public symmap_to_varmap + # reaction_network macro include("expression_utils.jl") include("dsl.jl") @@ -149,6 +160,9 @@ export conservationlaws, conservedquantities, conservedequations, conservationla export satisfiesdeficiencyone, satisfiesdeficiencyzero export iscomplexbalanced, isdetailedbalanced, robustspecies +# Documented cycle/flux basis helper (public, not exported). +@public cycles + # Containes the `nullspace` function required for conservation law elimination. include("mtk_nullspace_function.jl") @@ -205,6 +219,10 @@ export has_cartesian_dspace, has_masked_dspace, has_grid_dspace, has_graph_dspac grid_dims, grid_size export make_edge_p_values, make_directed_edge_values +# Documented `DiscreteSpaceReactionSystem` accessors (public, not exported). +@public reactionsystem, spatial_reactions, num_verts, num_edges, num_species +@public dspace, edge_iterator, is_transport_system + # Specific spatial problem types. include("spatial_reaction_systems/spatial_ODE_systems.jl") include("spatial_reaction_systems/discrete_space_jump_systems.jl") From 05dfd2ffc014e1125c566c28bede9fcff299212c Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 28 Jun 2026 08:30:51 -0400 Subject: [PATCH 2/3] Drop @public on names already exported via ModelingToolkitBase reexport `hasdescription`, `getdescription`, `hasmisc`, `getmisc` are exported into Catalyst's namespace through `@reexport using ModelingToolkitBase`, so declaring them `public` is a load error: cannot declare Catalyst.hasdescription public; it is already declared exported The original export-scan only parsed Catalyst's own `src/` `export` lines and missed reexported names. Remove the four reexport-exported names from the `@public` additions; the remaining 21 documented, non-exported names stay. Verified `using Catalyst` loads cleanly on Julia 1.12. Co-Authored-By: Chris Rackauckas --- src/Catalyst.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Catalyst.jl b/src/Catalyst.jl index 1c2988a560..4a52e77bd6 100644 --- a/src/Catalyst.jl +++ b/src/Catalyst.jl @@ -103,7 +103,7 @@ export Reaction, PhysicalScale # Documented `Reaction` predicates and metadata accessors (public, not exported). @public isbc, isconstant, isvalidreactant -@public hasnoisescaling, getnoisescaling, hasdescription, getdescription, hasmisc, getmisc +@public hasnoisescaling, getnoisescaling # Union type for `Reaction`s and `Equation`s. const CatalystEqType = Union{Reaction, Equation} From bf48907ff0fea232c2313874e9f1b723fa4657f2 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sun, 5 Jul 2026 13:27:01 -0400 Subject: [PATCH 3/3] Convert now-passing MiscSystemData @test_broken to @test The metadata-survives-complete() bug (issue #1353) is fixed upstream in ModelingToolkitBase: getmetadata(complete(rs2), MiscSystemData, nothing) now correctly returns ones(2, 3). The @test_broken was reporting an Unexpected Pass and erroring the Modeling test group. Verified locally on Julia 1.12 that the assertion now holds. Co-Authored-By: Chris Rackauckas --- test/reactionsystem_core/reactionsystem.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/reactionsystem_core/reactionsystem.jl b/test/reactionsystem_core/reactionsystem.jl index d1136f37f0..94c326db54 100644 --- a/test/reactionsystem_core/reactionsystem.jl +++ b/test/reactionsystem_core/reactionsystem.jl @@ -1147,7 +1147,7 @@ let @test ModelingToolkitBase.getmetadata(rs1, MiscSystemData, nothing) == "Metadata" @test ModelingToolkitBase.getmetadata(rs2, MiscSystemData, nothing) == ones(2, 3) @test ModelingToolkitBase.getmetadata(complete(rs1), MiscSystemData, nothing) == "Metadata" - @test_broken ModelingToolkitBase.getmetadata(complete(rs2), MiscSystemData, nothing) == ones(2, 3) # Weird and obscure Catalyst bug: https://github.com/SciML/Catalyst.jl/issues/1353. + @test ModelingToolkitBase.getmetadata(complete(rs2), MiscSystemData, nothing) == ones(2, 3) end # Tests u0_map and parameter_map system-level metadata.