Skip to content

build(deps): split up dependencies by document type #986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 49 commits into from
Aug 1, 2023

Conversation

MthwRobinson
Copy link
Contributor

@MthwRobinson MthwRobinson commented Jul 27, 2023

Summary

Closes #611. Updates the dependencies to create a slim base installation + extras for each document type. The all-docs extra includes the dependencies for all doc types. The local-inference extra still remains as an alias for all-docs since that's the extra many currently users use to install all of the dependencies.

As a follow on, the PDF and image requirements could be broken down further by strategy.

Testing

  • In a fresh virtual environment, run make install-base and pip install -r requirements/test.txt and pip install -e .. The following tests should pass:
    • pytest test_unstructured/partition/test_text.py
    • pytest test_unstructured/partition/test_email.py
    • pytest test_unstructured/partition/test_html_partition.py
    • pytest test_unstructured/partition/test_text.py
    • pytest test_unstructured/partition/test_xml_partition.py
  • Run make install-csv. The following tests should pass:
    • pytest test_unstructured/partition/test_csv.py
    • pytest test_unstructured/partition/test_tsv.py
  • Run make install-docx. The following tests should pass:
    • pytest test_unstructured/partition/test_doc.py
    • pytest test_unstructured/partition/test_docx.py
  • Run make install-odt. The following tests should pass:
    • pytest test_unstructured/partition/test_odt.py
  • Run make install-pypandoc. The following tests should pass:
    • pytest test_unstructured/partition/test_epub.py
    • pytest test_unstructured/partition/test_org.py
    • pytest test_unstructured/partition/test_rst.py
    • pytest test_unstructured/partition/test_rtf.py
  • Run make install-markdown. The following tests should pass:
    • pytest test_unstructured/partition/test_md.py
  • Run make install-msg. The following tests should pass:
    • pytest test_unstructured/partition/test_msg.py
  • Run make install-pdf-image. The following tests should pass:
    • pytest test_unstructured/partition/test_pdf.py
    • pytest test_unstructured/partition/test_image.py
  • Run make install-pptx. The following tests should pass:
    • pytest test_unstructured/partition/test_ppt.py
    • pytest test_unstructured/partition/test_pptx.py
  • Run make install-xlsx. The following tests should pass:
    • pytest test_unstructured/partition/test_xlsx.py
  • Run make install-ci and pip install argilla weaviate-client. make test should pass

Test test_unstructured/partition/test_json.py is currently a little weird because there are tests in there that use partition, making it hard to test partition_json isolation. I opened #993 to address that.

@MthwRobinson MthwRobinson requested review from qued and cragwolfe July 28, 2023 20:40
@MthwRobinson MthwRobinson marked this pull request as ready for review July 28, 2023 20:40
@cragwolfe
Copy link
Contributor

The pattern looks good to me. Hoping to merge #997 ahead of this to get the field name change released first.

Copy link
Contributor

@qued qued left a comment

Choose a reason for hiding this comment

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

LGTM, a few comments and suggestions.

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.

feat/make some dependencies optional
3 participants