Skip to content

Increase test coverage#4

Merged
deemonic merged 41 commits intodoxswap-v1.0.0from
increase-test-coverage
Mar 20, 2025
Merged

Increase test coverage#4
deemonic merged 41 commits intodoxswap-v1.0.0from
increase-test-coverage

Conversation

@deemonic
Copy link
Copy Markdown
Collaborator

This pull request includes multiple changes to improve the document conversion package blaspsoft/doxswap. The most important changes involve adding support for more file formats, updating the GitHub Actions workflow, and modifying the ConvertibleFormat interface to handle multiple MIME types.

Support for more file formats:

  • Added support for multiple new file formats such as bmp, csv, doc, jpg, odp, ods, png, ppt, pptx, rtf, svg, tiff, txt, xls, xlsx, and xml in .gitattributes to use Git LFS.
  • Registered new formats in src/FormatRegistry.php and updated the getMimeTypes method in various format classes to return an array of MIME types instead of a single MIME type. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

GitHub Actions workflow updates:

  • Updated .github/workflows/main.yml to include steps for setting up Git LFS and listing files in the repository. Also added the fileinfo extension for PHP and ensured the correct environment setup for Laravel and LibreOffice.

Interface and validation changes:

  • Modified the ConvertibleFormat interface's getMimeType method to getMimeTypes to return an array of MIME types.
  • Removed the ConversionValidator class, and integrated its functionalities into FormatRegistry. [1] [2] [3]

Dependency updates:

  • Updated composer.json to change the version of the package and its dependencies to dev-main. [1] [2]

These changes collectively enhance the functionality and compatibility of the document conversion package by supporting more file formats and improving the setup and validation processes.

@deemonic deemonic merged commit 3d73f9b into doxswap-v1.0.0 Mar 20, 2025
2 checks passed
@deemonic deemonic deleted the increase-test-coverage branch March 20, 2025 15:43
deemonic added a commit that referenced this pull request Mar 26, 2025
* Feature/add imagick as driver (#2)

* created conversion strategy interface

* added libreoffice and imagick strategies

* added a new converter class

* added driver and drivers array to config

* added contructor to strategies

* wip conversion validator

* wip

* created InputFileNotFoundException

* added a driver override method

* created cleanup service

* implemented cleanup strategy

* wip

* finished FileHandler

* removed ConversionService

* added todo for LibreOffice strategy

* Feature/implement registry (#3)

* wip

* updated disk in libreoffice strategy

* minor refactor and test for Format Registry

* added OdtFormat to registry

* added RtfFormat to the registry

* added TxtFormat to registry

* added HtmlFormat to registry

* added XmlFormat to registry

* added XlsxFormat to registry

* added OdsFormat to registry

* added XlsFormat to registry

* added PptxFormat to registry

* added PptFormat to registry

* added OdpFormat to registry

* added SvgFormat to registry

* added JpgFormat to registry

* added PngFormat to registry

* added BmpFormat to registry

* added TiffFormat to registry

* updated strategies

* undo composer changes

* Increase test coverage (#4)

* removed unused ConversionValidator

* added tests for cleanup

* added basic tests for Filename class

* added test for docx

* Add sample docs for integration tests

* debug mimetype

* updated libre_office path for gitgub action test

* workflow test

* workflow test

* test workflow

* test workflow

* tes workflow

* updated libre office path

* added fileinfo to php in workflow

* added logs for mime detection

* testing logging

* testing workflow

* testing workflow

* adedd lfs files to workflow

* removed log statements

* added tests for Doc and BMP formats

* added CSV tests

* added html, jpg and odp tests

* wip

* updated ods smaple file

* added detect mimetype from zip method

* odt and png tests added

* added ppt conversion test

* added pptx and rtf tests

* added svg tests

* added tiff tests

* addd txt tests

* added xls test

* added xlsx test

* added xml test

* added libre office path to laravel env environment

* updated libreoffice path

* debug bmp in workflow

* updated mime types to array

* set libre office path

* added image/x-ms-bmp to bmp mimetypes

* Feature/imagick-and-refactor (#5)

* wip mark implementation

* wip markdown

* added imagick strategy + minor refactor

* refactored conversion result

* updated tests and added imagick to github workflow

* refactored cleanup service

* updated readme + added webp and gif support

* added tests for gif and webp

* adding gif and webp sample files

* updated cleanup class tests

* updated readme and testcase

* added potrace install to the workflow

* updated test case

* updated readme

* added sponsors section to readme + funding.yml
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.

1 participant