Skip to content

feat(plugin): Introduce plugin support for document conversion#772

Closed
ayoub-ibm wants to merge 2 commits intodocling-project:mainfrom
ayoub-ibm:feature/plugin-support
Closed

feat(plugin): Introduce plugin support for document conversion#772
ayoub-ibm wants to merge 2 commits intodocling-project:mainfrom
ayoub-ibm:feature/plugin-support

Conversation

@ayoub-ibm
Copy link
Copy Markdown

This change enables users to extend the document conversion process with custom logic through plugins.

  • Introduced a PluginManager to handle preprocessing and postprocessing plugins in DocumentConverter.
  • Updated DocumentConverter to accept and initialize a list of plugins.
  • Implemented plugin execution within the document processing pipeline, enabling custom modifications before and after conversion.
  • Updated ConversionResult to include metadata about the plugins used during conversion.
  • Updated the CLI to accept plugin paths and load them dynamically.
  • Expanded documentation with examples for creating and using plugins.
  • Added test cases to verify plugin integration and ensure correct execution in various scenarios.

Checklist:

  • Documentation has been updated.
  • Examples have been added.
  • Tests have been added.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 18, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dolfim-ibm
Copy link
Copy Markdown
Member

@ayoub-ibm Thanks for this feature proposal. We are reviewing if the high-level concepts make sense in the overall Docling design. Will keep you posted.

Meanwhile, we noticed your commits are missing the DCO sign-off. Here are some instructions for adding it

To add your Signed-off-by line to every commit in this branch:

Ensure you have a local copy of your branch by checking out the pull request locally via command line.
In your local branch, run: git rebase HEAD~1 --signoff
Force push your changes to overwrite the branch: git push --force-with-lease origin feature/plugin-support

dolfim-ibm and others added 2 commits January 20, 2025 12:11
…lize the interface (docling-project#742)

* fix get image with cropbox

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* allow the usage of backends in the enrich models and generalize the interface

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* move logic in BaseTextImageEnrichmentModel

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* renaming

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

---------

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Signed-off-by: Ayoub El Bouchtili <Ayoub.elbouchtili@gmail.com>
This change enables users to extend the document conversion process with custom logic through plugins.

- Introduced a PluginManager to handle preprocessing and postprocessing plugins in DocumentConverter.
- Updated DocumentConverter to accept and initialize a list of plugins.
- Implemented plugin execution within the document processing pipeline, enabling custom modifications before and after conversion.
- Updated ConversionResult to include metadata about the plugins used during conversion.
- Updated the CLI to accept plugin paths and load them dynamically.
- Expanded documentation with examples for creating and using plugins.
- Added test cases to verify plugin integration and ensure correct execution in various scenarios.

Signed-off-by: Ayoub El Bouchtili <Ayoub.elbouchtili@gmail.com>
@ayoub-ibm ayoub-ibm force-pushed the feature/plugin-support branch from 54a7f82 to 224d633 Compare January 20, 2025 11:11
@ayoub-ibm
Copy link
Copy Markdown
Author

@dolfim-ibm Thanks for the feedback.

I've corrected the missing DCO sign-off. My apologies for the oversight.

I'll also be adding more to the "Concepts" section soon to better explain and showcase the plugins implementation.

@maxjeblick maxjeblick mentioned this pull request Mar 5, 2025
4 tasks
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 28, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@PeterStaar-IBM
Copy link
Copy Markdown
Member

Closing this PR for now.

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.

3 participants