Skip to content

IM2Deep 2.0 API#18

Open
rodvrees wants to merge 29 commits intomainfrom
new-api
Open

IM2Deep 2.0 API#18
rodvrees wants to merge 29 commits intomainfrom
new-api

Conversation

@rodvrees
Copy link
Member

@rodvrees rodvrees commented Jan 8, 2026

No description provided.

@rodvrees rodvrees added this to the v2.0 milestone Jan 8, 2026
@rodvrees rodvrees marked this pull request as ready for review January 19, 2026 13:36
@rodvrees rodvrees requested a review from Copilot January 19, 2026 13:36
@rodvrees rodvrees requested a review from RalfG January 19, 2026 13:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces IM2Deep 2.0 API, a major refactoring from version 1.2.0 to 2.0.0-beta. The changes modernize the codebase with comprehensive test coverage, refactored architecture using PyTorch Lightning, and an improved API design with better separation of concerns.

Changes:

  • Complete API refactoring with new modular structure (core, calibration, model_ops, constants)
  • Added comprehensive test suite with 9 test modules covering ~90% of functionality
  • Replaced DeepLC-based models with native PyTorch Lightning implementations
  • Updated dependencies: removed version constraint on deeplc, added torch and lightning as core dependencies
  • Enhanced CLI with better argument handling and profiling support

Reviewed changes

Copilot reviewed 27 out of 36 changed files in this pull request and generated 29 comments.

Show a summary per file
File Description
tests/* New comprehensive test suite with fixtures, unit tests, and integration tests
pytest.ini Pytest configuration with markers for integration and slow tests
pyproject.toml Updated dependencies: removed deeplc constraint and er extras, added torch/lightning
im2deep/utils.py Major expansion with input parsing, validation, CCS conversion, and CLI utilities
im2deep/_model_ops.py New file for PyTorch model loading and prediction operations
im2deep/core.py New high-level API with predict() and predict_and_calibrate() functions
im2deep/constants.py New file centralizing model paths, configurations, and physical constants
im2deep/calibration.py Refactored calibration with abstract base class and LinearCCSCalibration implementation
im2deep/_architecture.py New file with PyTorch Lightning model architectures (IM2Deep, IM2DeepMulti, IM2DeepMultiTransfer)
im2deep/_exceptions.py Minor formatting improvements to exception classes
im2deep/main.py Major CLI refactor with DefaultCommandGroup, improved argument handling, and profiling
im2deep/init.py Updated to version 2.0.0-beta with new API exports
README.md Comprehensive documentation update with CLI examples and API usage
.github/workflows/test.yml New CI/CD workflow for automated testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants