Merged
Conversation
shreyanid
reviewed
Oct 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1330.
Added
typing-extensionsas an explicit dependency (it was previously an implicit dependency viadataclasses-json).This dependency should be explicit, since we import from it directly in
unstructured.documents.elements. This has the added benefit thatTypedDictwill be available for Python 3.7 users.Other changes:
pip-compileversion-sync.shthat caused an error when using the sync functionality when syncing to a dev version from a release version.Testing:
To test the Python 3.7 functionality, in a Python 3.7 environment install the base requirements and run
This also works on
mainastyping_extensionsis a requirement. However if youpip uninstall typing-extensions, and run the above code, it should fail. So this update makes suretyping-extensionsdoesn't get lost if the other dependencies move around.To reproduce the
version-sync.shbug that was fixed, inmain, increment the most recent version inCHANGELOG.mdwhile leaving the version in__version__.py. Then add the following lines toversion-sync.shto simulate a particular set of circumstances, starting on line 114:Then run
make version-sync.The expected behavior is that the version in
__version__.pyis changed to the new version to matchCHANGELOG.md, but instead it exits with an error.The fix was to only do the version incrementation check when the script is running in
-cor "check" mode.