Skip to content

Modernize repository #64

@nbassler

Description

@nbassler

Project to bring the codebase up to modern standards.

No physics logic changes — tooling and infrastructure only.

Branch

  • Rename mastermain on GitHub and update CI references

Formatting & Style

  • Add .clang-format config (based on LLVM or Google style, C11 mode)
  • Run clang-format across all source files and commit

Testing Infrastructure

  • Rename test executable to dedx_test (conflicts with CTest reserved name)
  • Move enable_testing() to root CMakeLists.txt
  • Add ctest --output-on-failure step to GitHub Actions workflow
  • Add clang-format workflow (separate clang-format.yml)
  • Rewrite test.c as individually registered CTest cases (deleted — superseded by test_*.c)
  • Remove loadTest.c and its 9 legacy add_test entries (superseded by test_*.c)
  • Move existing install/consumer smoke test to CTest
  • Expand test coverage

CI/CD

  • Add ctest --test-dir build step to GitHub Actions workflow
  • Add clang-format check workflow
  • Remove continue-on-error: true and valgrind step from ci.yml (once CI is green)
  • Add clang-tidy or cppcheck static analysis step
  • Consider adding a code coverage step (gcov + codecov.io)

Code Quality

  • [-] Resolve 5 outstanding TODO/FIXME comments in source (wont fix, moved to Resolve outstanding TODO/FIXME comments in source #74)
    • Possible memory leak in dedx.c (dedx_allocate_workspace)
    • Broken path check in dedx_file_access.c
    • ion_a vs ion_A naming ambiguity in dedx_tools.c
  • Audit dedx_file_access.c static 256-byte buffer for safety (fixed: folder[512])
  • [-] Refactor global mutable folder into workspace/config struct (wont fix here, move to Refactor global mutable \folder #70)

CMake

  • Bump cmake_minimum_required to 3.21
  • Use target_include_directories consistently instead of legacy include_directories
  • Enable testing unconditionally via enable_testing() in root CMakeLists.txt
  • Version derived from git tag via git describe, no more manual version bumping
  • dedx_config.h generated to build dir, removed from git tracking
  • CMAKE_EXPORT_COMPILE_COMMANDS ON (needed for clangd)
  • Fixed binary_table build ordering with add_dependencies + $<TARGET_FILE:dedx_build_bin>
  • Make binary table generation (dedx_build_bin) an opt-in option

VS Code Integration

  • Add .vscode/tasks.json (cmake configure, build, test tasks)
  • Add .vscode/settings.json (clangd path, format-on-save)
  • Add .vscode/extensions.json (recommend clangd, CMake Tools)
  • Add .vscode/launch.json with working debug configuration
  • Add CMakePresets.json for build presets

Python Bindings

  • Migrate from deprecated distutils to pyproject.toml + setuptools
  • Test bindings on Python 3.12+
  • Add Python binding tests to CI

Documentation

  • Add Doxygen config and annotate public API headers (dedx.h, dedx_wrappers.h)
  • Expand README.md (currently 3 lines)
  • Remove dead Sourceforge URLs from docs

Cleanup

  • /gui/ wxWidgets frontend — remove since it is unmaintained
  • Update Sphinx doc theme (pydata-sphinx-theme 0.8.1 → current)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions