-
Notifications
You must be signed in to change notification settings - Fork 0
fix: resolve critical and minor issues from C++ subsystem validation #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| cmake_minimum_required(VERSION 3.14) | ||
| project(CuraFrame VERSION 3.0.0 LANGUAGES CXX) | ||
|
|
||
| set(CMAKE_CXX_STANDARD 17) | ||
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
| set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
|
||
| # All constraint-bundle translation units | ||
| set(BUNDLE_SOURCES | ||
| constraints/anti_infective/AntiInfectiveBundle.cpp | ||
| constraints/cardiac/CardiacBundle.cpp | ||
| constraints/cns/CNSBundle.cpp | ||
| constraints/formulation/FormulationBundle.cpp | ||
| constraints/hepatic/HepaticBundle.cpp | ||
| constraints/immunologic/ImmunologicBundle.cpp | ||
| constraints/metabolic/MetabolicBundle.cpp | ||
| constraints/oncology/OncologyBundle.cpp | ||
| constraints/pkpd/PKPDBundle.cpp | ||
| constraints/renal/RenalBundle.cpp | ||
| constraints/safety/SafetyBundle.cpp | ||
| constraints/systemic_exposure/SystemicExposureBundle.cpp | ||
| ) | ||
|
|
||
| # Scoring subsystem translation units | ||
| set(SCORING_SOURCES | ||
| scoring/WeightProfile.cpp | ||
| scoring/WeightedScoringEngine.cpp | ||
| scoring/ScoringPipeline.cpp | ||
| ) | ||
|
|
||
| # Static library bundling all C++ constraint and scoring logic. | ||
| # The repository root is exposed as the include root so that all relative | ||
| # includes (e.g. "constraint_core/Candidate.hpp" or "../scoring/...") resolve | ||
| # correctly regardless of which translation unit is being compiled. | ||
| add_library(curaframe_cpp STATIC | ||
| ${BUNDLE_SOURCES} | ||
| ${SCORING_SOURCES} | ||
| ) | ||
|
|
||
| target_include_directories(curaframe_cpp PUBLIC | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
| ) | ||
|
|
||
| target_compile_options(curaframe_cpp PRIVATE | ||
| $<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-Wall -Wextra -Wpedantic> | ||
| $<$<CXX_COMPILER_ID:MSVC>:/W4> | ||
| ) | ||
|
|
||
| # NOTE: Each bundle uses the REGISTER_CONSTRAINT_BUNDLE self-registration macro, | ||
| # which installs a static initialiser in its own translation unit. When linking | ||
| # this library into an executable, force the linker to include every object file | ||
| # so that all initialisers run, even those with no externally referenced symbols: | ||
| # | ||
| # GCC / Clang (Linux): | ||
| # target_link_libraries(my_app PRIVATE | ||
| # -Wl,--whole-archive curaframe_cpp -Wl,--no-whole-archive) | ||
| # | ||
| # Clang (macOS): | ||
| # target_link_libraries(my_app PRIVATE | ||
| # -Wl,-force_load,$<TARGET_FILE:curaframe_cpp>) | ||
| # | ||
| # MSVC: | ||
| # target_link_libraries(my_app PRIVATE /WHOLEARCHIVE:curaframe_cpp) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "AntiInfectiveBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("AntiInfective", AntiInfectiveBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "CardiacBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Cardiac", CardiacBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "CNSBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("CNS", CNSBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "FormulationBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Formulation", FormulationBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "HepaticBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Hepatic", HepaticBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "ImmunologicBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Immunologic", ImmunologicBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "MetabolicBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Metabolic", MetabolicBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "OncologyBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Oncology", OncologyBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "PKPDBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("PKPD", PKPDBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "RenalBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Renal", RenalBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "SafetyBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("Safety", SafetyBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| #include "SystemicExposureBundle.hpp" | ||
| #include "../../constraint_core/ConstraintRegistry.hpp" | ||
|
|
||
| REGISTER_CONSTRAINT_BUNDLE("SystemicExposure", SystemicExposureBundle) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| [build-system] | ||
| requires = ["setuptools>=61.0"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "CuraFrame" | ||
| version = "3.0.0" | ||
| description = "Constraint-driven therapeutic design reasoning framework." | ||
| requires-python = ">=3.9" | ||
|
Comment on lines
+5
to
+9
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| #include "WeightProfile.hpp" | ||
|
|
||
| // Intentionally left blank or simple implementations if needed. | ||
| // Weight profiles are currently fully implemented inline in the header for simplicity and polymorphism. | ||
| // All WeightProfile methods are implemented inline in WeightProfile.hpp because | ||
| // the class relies entirely on virtual dispatch with small, default-valued | ||
| // implementations that benefit from inlining. This translation unit exists to | ||
| // compile the header as part of the curaframe_cpp static library, ensuring that | ||
| // the vtable and RTTI for WeightProfile, DefaultResearchProfile, and | ||
| // HighSafetyProfile are emitted exactly once. | ||
|
Comment on lines
+3
to
+8
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description says the build compiles "11 bundle TUs", but
BUNDLE_SOURCEShere lists 12 bundles (includingsystemic_exposure). Please update the PR description or the source list so they match.