-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUG][TST] Fix thin client package test (#2497)
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Fix thin client package bug introduced by #2466 by @tazarov - Do this as opposed to #2490 - as it is cleaner and more explicit. Making it less brittle to changes. - New functionality - .. ## Test plan *How are these changes tested?* - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?*
- Loading branch information
Showing
5 changed files
with
42 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
pip_install_from_tarball() { | ||
local tarball=$(readlink -f $1) | ||
if [ -f "$tarball" ]; then | ||
echo "Testing PIP package from tarball: $tarball" | ||
else | ||
echo "Could not find PIP package: $tarball" | ||
return 1 | ||
fi | ||
|
||
# Create temporary project dir | ||
local dir=$(mktemp -d) | ||
|
||
echo "Building python project dir at $dir ..." | ||
|
||
cd $dir | ||
|
||
python3 -m venv venv | ||
|
||
source venv/bin/activate | ||
|
||
pip install $tarball | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# Sanity check to ensure package is installed correctly | ||
|
||
source ./install.sh | ||
|
||
pip_install_from_tarball $1 | ||
|
||
python -c "import chromadb; api = chromadb.Client(); print(api.heartbeat())" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# Sanity check to ensure package is installed correctly | ||
|
||
source ./install.sh | ||
|
||
pip_install_from_tarball $1 | ||
|
||
python -c "import chromadb; print(chromadb.__version__)" |