Skip to content

Main prerelease 3 8 0 #1432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 55 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3352378
update to Python 3.12.4 images, develop branch
erikspears Jul 11, 2024
b34c0d8
update Python version in unit tests yml too
erikspears Jul 11, 2024
c70369f
Merge pull request #1389 from swirlai/ds-2507
dnicodemus Jul 11, 2024
b28fef0
updated db.dist cherry-picked from pre-release branch
erikspears Jul 11, 2024
0ba7df7
Merge pull request #1390 from swirlai/db-dist-update
dnicodemus Jul 11, 2024
700e331
small spelling fix
dnicodemus Jul 16, 2024
a3f80af
Merge pull request #1393 from swirlai/release-3_6_0-develop
dnicodemus Jul 16, 2024
b9a4da2
ci(spyglass): remove old workflows
monteiro-alan Jul 30, 2024
cd22900
Fix RequireQueryInTitleResultProcessor
sid-swirl Aug 16, 2024
801d79a
Merge pull request #1402 from swirlai/DS-2732a
dnicodemus Aug 16, 2024
fef5d07
Fix error llm
sid-swirl Aug 20, 2024
3cdfe46
Merge pull request #1405 from swirlai/DS-2747
erikspears Aug 20, 2024
ce9b750
pin NLTK for now
erikspears Aug 20, 2024
69797f8
Merge pull request #1406 from swirlai/ds-2748
erikspears Aug 20, 2024
5a29f88
update SWIRL domain throughout
erikspears Aug 20, 2024
e746e20
update db.dist to pick up SP config changes
erikspears Aug 20, 2024
e3f8618
Merge pull request #1408 from swirlai/ds-2752
dnicodemus Aug 20, 2024
6e2b427
update banner.py version on develop
erikspears Aug 20, 2024
88a72cb
Merge pull request #1409 from swirlai/ds-2751
dnicodemus Aug 20, 2024
2c5b56b
Merge branch 'develop' into DS-2543
monteiroalan-swirl Aug 21, 2024
7fb36c7
Merge pull request #1396 from swirlai/DS-2543
erikspears Aug 21, 2024
a9b95a4
feat: add more details on the rag prompt
igorsbrito01 Sep 5, 2024
1e7390e
Merge pull request #1423 from swirlai/DS-2634
dnicodemus Sep 9, 2024
c909859
update Celery and spaCy pins in requirements.txt
erikspears Sep 16, 2024
8130247
Merge pull request #1425 from swirlai/ds-2896
dnicodemus Sep 16, 2024
9b68f01
update to use latest stable Python 3.12.5; also update testing-wip.ya…
erikspears Sep 16, 2024
3a8a9fe
Merge pull request #1426 from swirlai/ds-2897
dnicodemus Sep 16, 2024
6704f04
updates to support NLTK 3.9.x series; move NLTK data load commands to…
erikspears Sep 16, 2024
c6b6b38
Merge pull request #1427 from swirlai/ds-2900
dnicodemus Sep 16, 2024
22db185
bring over fix for a specific 'select item' issue
erikspears Sep 16, 2024
f3794a5
Merge pull request #1428 from swirlai/ds-2901
dnicodemus Sep 16, 2024
656a250
fix the PATCH button on the endpoints
erikspears Sep 16, 2024
5bb697b
Update Dockerfile syntax
erikspears Sep 16, 2024
1f2fecc
Dockerfile updates; removal of SA Docker infra we no longer need; upd…
erikspears Sep 16, 2024
89693ac
Merge pull request #1430 from swirlai/ds-2903
erikspears Sep 16, 2024
b7ec4ce
Merge branch 'develop' into ds-2902
erikspears Sep 16, 2024
0dba39c
Merge pull request #1429 from swirlai/ds-2902
erikspears Sep 16, 2024
8dbe1a0
fix QT unit test for update status code check
erikspears Sep 16, 2024
8b0f550
Merge branch 'develop' into ds-2902
erikspears Sep 16, 2024
37b2ad1
Merge pull request #1431 from swirlai/ds-2902
erikspears Sep 16, 2024
22dc698
Merged changes from release 3.8.0.0 branch
dnicodemus Sep 17, 2024
6087c06
pip freeze requirements under Python 3.12.5, for the release to main
erikspears Sep 17, 2024
8ffa332
Cherry pick from DS-2710
dnicodemus Sep 20, 2024
76d0aa0
Feature DS-2710, still needs requirements pin
dnicodemus Sep 20, 2024
2b61ddf
freeze requirements.txt under Python 3.12.5
erikspears Sep 20, 2024
4c808fc
cherry pick for DS-2944
dnicodemus Sep 23, 2024
0fac8ba
cherry pick for DS-2944 from release branch
dnicodemus Sep 23, 2024
34ae6cb
Merge branch 'main_prerelease_3_8_0' of github.com:swirlai/swirl-sear…
dnicodemus Sep 23, 2024
62f884e
Fresh db.dist for the prerelease branch
erikspears Sep 24, 2024
52ba4c9
Merge pull request #1435 from swirlai/ds-2939
erikspears Sep 24, 2024
d331af0
DS-2940 setup unit tests with output processing, pr decoration (#1436)
peterswirl Sep 24, 2024
c536a25
temporary adjustment to the QA Suite workflow for prerelease branch t…
erikspears Sep 24, 2024
fe49c63
reset QA Suite workflow back to main/master targets for release
erikspears Sep 25, 2024
05cba74
Merge pull request #1438 from swirlai/feature/require_spell_check
dnicodemus Sep 24, 2024
4abf1aa
adjust default image in testing-wip workflow for the release
erikspears Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Build and Push
name: Docker Build

on:
# Manual trigger only
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.4'
python-version: '3.12.5'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/spell-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,26 @@ on:
paths:
- "docs/**"

pull_request:
# Run for all PRs to develop - means PR cannot merge until unit tests pass
branches:
- develop
- main
# Skip non-code changes
paths-ignore:
- '.github/**'
- 'integrations/**'
- 'swirl-infra/**'
- 'db.sqlite3.dist'
# Allows manual run of this workflow from the Actions tab (on any branch)
workflow_dispatch:

permissions:
contents: read
actions: read
checks: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.4'
python-version: '3.12.5'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.4'
python-version: '3.12.5'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/testing-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ name: Testing WIP
on:
workflow_dispatch:
inputs:
qa_image: # Input the QA Repo image to use
description: 'QA Repo image to use'
required: true
default: 'automated-tests-master' # Default image if none specified
behave_tags: # Input the Behave tag(s) to run
description: 'Behave tag(s) to run'
required: true
default: 'estest' # Default tag if none specified
default: 'qa_suite,community' # Default tag if none specified

jobs:
wip-tests:
Expand All @@ -37,7 +41,7 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.4'
python-version: '3.12.5'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand Down Expand Up @@ -65,7 +69,7 @@ jobs:
echo "========"
cat .env.qa
echo "========"
docker run --net=host --env-file .env.qa -t swirlai/swirl-search-qa:automated-tests-master sh -c "behave --tags=${{ github.event.inputs.behave_tags }}"
docker run --net=host --env-file .env.qa -t swirlai/swirl-search-qa:${{ github.event.inputs.qa_image }} sh -c "behave --tags=${{ github.event.inputs.behave_tags }}"
- name: Upload Log Files
if: always()
uses: actions/upload-artifact@v4
Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
name: Unit Tests

on:
# Manual trigger only
pull_request:
# Run for all PRs to develop - means PR cannot merge until unit tests pass
branches:
- develop
# Skip non-code changes
paths-ignore:
- '.github/**'
- 'integrations/**'
- 'swirl-infra/**'
- 'docs/**'
- 'README.md'
- 'db.sqlite3.dist'
workflow_dispatch:

jobs:
permissions:
contents: read
actions: read
checks: write
pull-requests: write

build:
jobs:
unit-tests:
runs-on: ubuntu-latest

steps:
Expand All @@ -15,14 +31,15 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.4'
python-version: '3.12.5'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
- name: Install the Unit Tests
run: ./install-test.sh
- name: Run the Unit Tests
run: pytest
# generate a JUnit XML report for the test results
run: pytest --junitxml=reports/junit.xml --tb=short --ignore=integrations
- name: Upload Log Files
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -31,3 +48,9 @@ jobs:
path: |
logs/
/var/log/syslog*

- name: Publish Unit Test Results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: reports/junit.xml
26 changes: 0 additions & 26 deletions DevUtils/docker/sw-start-sa.sh

This file was deleted.

82 changes: 30 additions & 52 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,59 +1,37 @@
# Use an official Python runtime as a parent image
FROM python:3.12.4-slim-bookworm

# Upgrade pip to the specified version or higher
RUN pip install --no-cache-dir --upgrade 'pip>=24.0'

# try to upgrade to a more recent version of openssl
RUN apt-get update
RUN apt-get -y upgrade openssl

# install jq
RUN apt-get -y install jq

# RUN sudo echo 'nameserver 8.8.8.8'>/etc/resolv.conf
RUN apt-get update -y
RUN apt-get install apt-file -y
RUN apt-file update
RUN apt-get install -y python3-dev build-essential
RUN apt-get install -y procps
RUN apt-get install -y libpq-dev

RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade grpcio

ADD requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# install redis
RUN apt-get install -y redis-server

# install requirements
RUN python -m spacy download en_core_web_lg
RUN python -m nltk.downloader stopwords
RUN python -m nltk.downloader punkt

# Copy Swirl App to container
RUN mkdir /app
FROM python:3.12.5-slim-bookworm

# Update, upgrade and install packages in a single RUN to reduce layers
RUN apt-get update && apt-get install -y \
apt-file \
build-essential \
jq \
libpq-dev \
procps \
python3-dev \
redis-server \
&& apt-file update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Copy application files (see .dockerignore for list of exclusions)
COPY . /app
COPY ./db.sqlite3.dist /app/db.sqlite3
COPY ./.env.docker /app/.env
COPY ./install-ui.sh /app/install-ui.sh
ADD ./swirl /app/swirl
COPY ./download-nltk-resources.sh /app/

# Install Galaxy UI
RUN mkdir -p /app/swirl/static/galaxy
COPY --from=swirlai/spyglass:latest /usr/src/spyglass/ui/dist/spyglass/browser/. /app/swirl/static/galaxy
COPY --from=swirlai/spyglass:latest /usr/src/spyglass/ui/config-swirl-demo.db.json /app/
WORKDIR /app

ADD ./swirl_server /app/swirl_server
ADD ./SearchProviders /app/SearchProviders
ADD ./DevUtils /app/DevUtils
ADD ./Data /app/Data
ADD ./uploads /app/uploads
ADD ./swirl.py /app/swirl.py
ADD ./swirl_load.py /app/swirl_load.py
ADD ./manage.py /app/manage.py
# Optimize pip and Python installations
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir --upgrade grpcio

WORKDIR /app
# Swirl install requirements
RUN python -m spacy download en_core_web_lg && \
./download-nltk-resources.sh

# Install the Galaxy UI
COPY --from=swirlai/spyglass:preview /usr/src/spyglass/ui/dist/spyglass/browser/. /app/swirl/static/galaxy
COPY --from=swirlai/spyglass:preview /usr/src/spyglass/ui/config-swirl-demo.db.json /app/

EXPOSE 8000
Binary file modified db.sqlite3.dist
Binary file not shown.
12 changes: 11 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
services:
redis:
image: redis
image: redis:latest
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
app:
image: swirlai/swirl-search:latest
ports:
- "8000:8000"
depends_on:
redis:
condition: service_healthy
command: >
sh -c 'rm -fr ./.swirl && python swirl.py setup && mkdir -p static/api/config &&
/usr/bin/jq ".default" ./config-swirl-demo.db.json | sed -e "s/<msal-app-id>/$MSAL_APP_ID/" \
Expand Down
4 changes: 4 additions & 0 deletions download-nltk-resources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

python -c "import nltk; nltk.download('stopwords')"
python -c "import nltk; nltk.download('punkt_tab')"
3 changes: 1 addition & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ else
fi

echo "$PROG Downloading NLTK modules..."
python -m nltk.downloader stopwords
python -m nltk.downloader punkt
./download-nltk-resources.sh

echo "$PROG If no errors occurred, run python swirl.py setup"
Loading