Code quality improvements - #92
Merged
Merged
Conversation
- SteepestDecent -> SteepestDescent (class, header, Python name) - Timer.ellapsed -> Timer.elapsed - deprecated aliases SteepestDecent and Timer.ellapsed remain available - rename test_iga_rotation_copling_ad.py -> test_iga_rotation_coupling_ad.py
- move all register_python methods and trampoline classes into a dedicated bindings layer (src/bindings/, one TU per group) - core headers under include/eqlib/ no longer depend on pybind11; they compile as a plain C++ library - guard the python section of the vendored hyperjet so it only compiles when pybind11 is included - drop redundant explicit GIL acquisition in the lambda elements (pybind11's std::function caster handles this) - make members that are exposed via Python public (Problem type aliases, element setters, lambda ComputeFunction) - mark get_or_default inline (ODR violation surfaced by multiple TUs) - PYBIND11_OVERLOAD_PURE -> PYBIND11_OVERRIDE_PURE - splitting into six translation units also enables parallel builds
- pre-commit: clang-format, ruff (check + format), whitespace/eol hooks - .clang-tidy with bugprone/performance/modernize checks - lint job in CI runs pre-commit on all files - reformat codebase (clang-format + ruff)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 4 of the modernization plan (follow-up to #91), in four commits:
fix:Misspelled public names correctedSteepestDecent→SteepestDescent(class, header, Python name),Timer.ellapsed→Timer.elapsedtest_iga_rotation_copling_ad.py→..._coupling_...build:C++20refactor:Python bindings decoupled from the C++ coreregister_pythonmethods and trampoline classes moved to a dedicated bindings layer (src/bindings/, one TU per group: core, elements, solvers, problem, objectives)include/eqlib/no longer depends on pybind11 — verified by compiling a pure C++ TU without pybind11 on the include pathLog.hinclude inProblem.h, ODR violation inSettings.h(get_or_defaultnot inline)PYBIND11_OVERLOAD_PURE→PYBIND11_OVERRIDE_PURE; redundant explicit GIL acquisition removed from lambda elementschore:pre-commit + clang-tidy + CI lint job.clang-tidyconfig (bugprone/performance/modernize) for local useVerification
pre-commit run --all-filespassesBehavior notes