Skip to content

Conversation

@hubert-rutkowski85
Copy link
Contributor

@hubert-rutkowski85 hubert-rutkowski85 commented Feb 28, 2024

The PR adds tests:

  • unit tests comparing response between gzipped and not-gzipped files, for different content types, also for non-set ungzipped content type, and for single and multiple files in various combinations.
  • simple smoke tests

To test only new unit tests:

PYTHONPATH=. python -m pytest -v test_general/api/test_gzip.py --disable-warnings

@hubert-rutkowski85 hubert-rutkowski85 linked an issue Feb 28, 2024 that may be closed by this pull request
@hubert-rutkowski85 hubert-rutkowski85 marked this pull request as ready for review February 29, 2024 18:10
@hubert-rutkowski85
Copy link
Contributor Author

hubert-rutkowski85 commented Feb 29, 2024

I know I need to update the requirements/ test.txt and base.txt with correct packages, but had some pip-compile issues not seeing venv and couldn't finish it today, but it's detail and don't want to wait with review request. EDIT: the failing test is failing for me also on main, so it's rather not caused by my changes. EDIT2: pip-compile is fixed, that test passes, but a new one fails (maybe it's caused by some library update, works on localhost):

FAILED test_general/api/test_app.py::test_languages_and_ocr_languages_raises_error - Failed: DID NOT RAISE <class 'ValueError'>

EDIT3: oh noes, it passess on main https://github.com/Unstructured-IO/unstructured-api/actions/runs/8144148394/job/22257691407 , but it also fails when I include pip-compile requirements changes. So it makes sense some dependency changed. Now need to bisect to find the One...

Problem was caused by duplication of text inside 2 examples (fake-email.eml and fake-email-image-embedded.eml) which caused the 2 elements to have the same hash, almost same metadata, but sometimes a different position in list.
@hubert-rutkowski85 hubert-rutkowski85 merged commit 3c97466 into main Mar 13, 2024
@hubert-rutkowski85 hubert-rutkowski85 deleted the 86-ability-to-accept-gzip-compressed-files-hubert branch March 13, 2024 16:38
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.

Ability to accept gzip compressed files

4 participants