unstructured/scripts/pip-compile.sh
Roman Isecke bd49cfbab7
feat: adds Azure Cognitive Search (full text) destination connector (#1459)
### Description
New [Azure Cognitive
Search](https://azure.microsoft.com/en-us/products/ai-services/cognitive-search)
destination connector added. Writes each json element from the created
json files via partition and writes that content to an index.

**Bonus bug fix:** Due to a recent change where the default version of
python used in the repo was bumped to `3.10` from `3.8`, this means
running `pip-compile` now runs it against that version rather than the
lowest we support which is still `3.8`. This breaks the setup for those
lower versions because some of the versions pulled in by `pip-compile`
exist for `3.10` but not `3.8`. `pip-compile` was updates to run as a
script that checks the version of python being used first, which helps
guarantee that all dependencies meet the minimum python version
requirement.

Closes out https://github.com/Unstructured-IO/unstructured/issues/1466
2023-09-25 10:27:42 -04:00

19 lines
521 B
Bash
Executable File

#!/usr/bin/env bash
# python version must match lowest supported (3.8)
major=3
minor=8
if ! python -c "import sys; assert sys.version_info.major == $major and sys.version_info.minor == $minor"; then
echo "python version not equal to expected $major.$minor: $(python --version)"
exit 1
fi
for file in requirements/*.in; do
if [[ "$file" =~ "constraints" ]]; then
continue;
fi;
echo "running: pip-compile --upgrade $file"
pip-compile --upgrade "$file"
done
cp requirements/build.txt docs/requirements.txt