-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from flepied/tests
add integration tests to the run-tests Github action
- Loading branch information
Showing
7 changed files
with
87 additions
and
9 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 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 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 |
---|---|---|
|
@@ -3,8 +3,14 @@ SHELL := /bin/bash | |
all: compose.yaml | ||
|
||
compose.yaml: poetry.lock | ||
VER=$$(poetry run pip freeze|grep chromadb==|sed "s/.*==//") \ | ||
&& poetry run pip freeze|grep chromadb \ | ||
&& test -n "$$VER" \ | ||
&& echo $$VER _ | ||
&& sed -i -e "[email protected]/chroma-core/chroma:.*@ghcr.io/chroma-core/chroma:$$VER@" compose.yaml | ||
set -x && \ | ||
. .venv/bin/activate && \ | ||
VER=$$(pip3 freeze|grep chromadb==|sed "s/.*==//") && \ | ||
pip3 freeze && \ | ||
test -n "$$VER" && \ | ||
echo "$$VER" && \ | ||
sed -i -e "[email protected]/chroma-core/chroma:.*@ghcr.io/chroma-core/chroma:$$VER@" compose.yaml | ||
|
||
poetry.lock: pyproject.toml | ||
poetry lock --no-update | ||
touch poetry.lock |
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 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,45 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
sudo apt-get install inotify-tools | ||
|
||
mkdir $HOME/.second-brain $HOME/Notes | ||
|
||
cat > .env <<EOF | ||
SRCDIR=$HOME/Notes | ||
DSTDIR=$HOME/.second-brain | ||
EOF | ||
|
||
bash -x ./install-systemd-services.sh | ||
|
||
cat > $HOME/Notes/langchain.md <<EOF | ||
## References | ||
- https://docs.langchain.com/docs/ | ||
- https://github.com/kyrolabs/awesome-langchain | ||
Plan-and-Solve Prompting: Improving Zero-Shot | ||
Chain-of-Thought Reasoning by Large Language Models | ||
https://arxiv.org/pdf/2305.04091.pdf | ||
EOF | ||
|
||
TRY=0 | ||
docker-compose ps | ||
while [ $TRY -lt 24 ]; do | ||
TRY=$(( TRY + 1 )) | ||
if docker-compose logs | grep -q "Application startup complete"; then | ||
break | ||
fi | ||
docker-compose logs | ||
sleep 5 | ||
done | ||
|
||
sudo journalctl -u sba-md | ||
sudo journalctl -u sba-txt | ||
|
||
RES=$(poetry run ./similarity.py "What is langchain?") | ||
echo "$RES" | ||
test -n "$RES" | ||
|
||
# integration-test.sh ends here |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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