Skip to content

Commit

Permalink
Merge pull request #1464 from swirlai/main_prerelease_3_9_0
Browse files Browse the repository at this point in the history
Main prerelease 3 9 0
  • Loading branch information
erikspears authored Nov 13, 2024
2 parents 45c64f6 + 8cbd8e9 commit 52086fc
Show file tree
Hide file tree
Showing 27 changed files with 384 additions and 155 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
- name: Build and Push Swirl Docker Image
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
Expand All @@ -25,8 +25,8 @@ jobs:
- name: Update the Docker Repo Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME_X }}
password: ${{ secrets.DOCKER_PASSWORD_X }}
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
repository: swirlai/swirl-search
- name: Upload Log Files
if: always()
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/qa-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.5'
python-version: '3.12.6'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
- name: Setup Swirl
run: python swirl.py setup
- name: Install the Latest Galaxy UI
run: ./install-ui.sh
run: ./install-ui.sh -p
env:
MSAL_CB_PORT: 8000
MSAL_HOST: localhost
Expand All @@ -46,17 +46,30 @@ jobs:
python swirl.py start
env:
ALLOWED_HOSTS: localhost,host.docker.internal
- name: Decode BigQuery token and create JSON file
run: |
echo "$BIGQUERY_TOKEN_BASE64" | base64 --decode > "${{ github.workspace }}/token.json"
env:
BIGQUERY_TOKEN_BASE64: ${{ secrets.QA_BIGQUERY_TOKEN_BASE64 }}
- name: Run the QA Suite
run: |
echo "SWIRL_TEST_HOST=localhost" > .env.qa
echo "MSAL_HOST=localhost" >> .env.qa
echo "MSAL_CB_PORT=8000" >> .env.qa
echo "QA_ADMIN_PW=${{ secrets.QA_ADMIN_PW }}" >> .env.qa
echo "QA_OPENAI_KEY=${{ secrets.QA_OPENAI_KEY }}" >> .env.qa
echo "QA_NLR_USERNAME=${{ secrets.QA_NLR_USERNAME }}" >> .env.qa
echo "QA_NLR_PASSWORD=${{ secrets.QA_NLR_PASSWORD }}" >> .env.qa
echo "QA_CRUNCHBASE_KEY=${{ secrets.QA_CRUNCHBASE_KEY }}" >> .env.qa
echo "QA_BLOCKCHAIN_KEY=${{ secrets.QA_BLOCKCHAIN_KEY }}" >> .env.qa
echo "QA_YOUTRACK_TOKEN=${{ secrets.QA_YOUTRACK_TOKEN }}" >> .env.qa
echo "QA_GITHUB_TOKEN=${{ secrets.QA_GITHUB_TOKEN }}" >> .env.qa
echo "BIGQUERY_TOKEN_PATH=${{ github.workspace }}/token.json" >> .env.qa
echo "QA_TRELLO_KEYS=${{ secrets.QA_TRELLO_KEYS }}" >> .env.qa
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=qa_suite,community"
docker run --net=host --env-file .env.qa -t swirlai/swirl-search-qa:automated-tests-develop sh -c "behave --tags=qa_suite,community"
- name: Upload Log Files
if: always()
uses: actions/upload-artifact@v4
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/spell-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ name: Check Spelling

# Trigger to only run this workflow automatically on docs/ directory changes
on:
push:
branches:
- "main"
paths:
- "docs/**"

pull_request:
# Run for all PRs to develop - means PR cannot merge until unit tests pass
# Run for all PRs to develop or main - means PR cannot merge until unit tests pass
branches:
- develop
- main
Expand Down
29 changes: 21 additions & 8 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.5'
python-version: '3.12.6'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand Down Expand Up @@ -48,12 +48,12 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.5'
python-version: '3.12.6'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand All @@ -71,13 +71,26 @@ jobs:
python swirl.py start
env:
ALLOWED_HOSTS: localhost,host.docker.internal
- name: Decode BigQuery token and create JSON file
run: |
echo "$BIGQUERY_TOKEN_BASE64" | base64 --decode > "${{ github.workspace }}/token.json"
env:
BIGQUERY_TOKEN_BASE64: ${{ secrets.QA_BIGQUERY_TOKEN_BASE64 }}
- name: Run the QA Suite
run: |
echo "SWIRL_TEST_HOST=localhost" > .env.qa
echo "MSAL_HOST=localhost" >> .env.qa
echo "MSAL_CB_PORT=8000" >> .env.qa
echo "QA_ADMIN_PW=${{ secrets.QA_ADMIN_PW }}" >> .env.qa
echo "QA_OPENAI_KEY=${{ secrets.QA_OPENAI_KEY }}" >> .env.qa
echo "QA_NLR_USERNAME=${{ secrets.QA_NLR_USERNAME }}" >> .env.qa
echo "QA_NLR_PASSWORD=${{ secrets.QA_NLR_PASSWORD }}" >> .env.qa
echo "QA_CRUNCHBASE_KEY=${{ secrets.QA_CRUNCHBASE_KEY }}" >> .env.qa
echo "QA_BLOCKCHAIN_KEY=${{ secrets.QA_BLOCKCHAIN_KEY }}" >> .env.qa
echo "QA_YOUTRACK_TOKEN=${{ secrets.QA_YOUTRACK_TOKEN }}" >> .env.qa
echo "QA_GITHUB_TOKEN=${{ secrets.QA_GITHUB_TOKEN }}" >> .env.qa
echo "BIGQUERY_TOKEN_PATH=${{ github.workspace }}/token.json" >> .env.qa
echo "QA_TRELLO_KEYS=${{ secrets.QA_TRELLO_KEYS }}" >> .env.qa
echo "========"
cat .env.qa
echo "========"
Expand All @@ -92,8 +105,8 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
- name: Build and Push Swirl Docker Image
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
Expand All @@ -103,8 +116,8 @@ jobs:
- name: Update the Docker Repo Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME_X }}
password: ${{ secrets.DOCKER_PASSWORD_X }}
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
repository: swirlai/swirl-search
- name: Upload Log Files
if: always()
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/testing-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.5'
python-version: '3.12.6'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand All @@ -59,13 +59,26 @@ jobs:
python swirl.py start
env:
ALLOWED_HOSTS: localhost,host.docker.internal
- name: Decode BigQuery token and create JSON file
run: |
echo "$BIGQUERY_TOKEN_BASE64" | base64 --decode > "${{ github.workspace }}/token.json"
env:
BIGQUERY_TOKEN_BASE64: ${{ secrets.QA_BIGQUERY_TOKEN_BASE64 }}
- name: Run the QA Suite
run: |
echo "SWIRL_TEST_HOST=localhost" > .env.qa
echo "MSAL_HOST=localhost" >> .env.qa
echo "MSAL_CB_PORT=8000" >> .env.qa
echo "QA_ADMIN_PW=${{ secrets.QA_ADMIN_PW }}" >> .env.qa
echo "QA_OPENAI_KEY=${{ secrets.QA_OPENAI_KEY }}" >> .env.qa
echo "QA_NLR_USERNAME=${{ secrets.QA_NLR_USERNAME }}" >> .env.qa
echo "QA_NLR_PASSWORD=${{ secrets.QA_NLR_PASSWORD }}" >> .env.qa
echo "QA_CRUNCHBASE_KEY=${{ secrets.QA_CRUNCHBASE_KEY }}" >> .env.qa
echo "QA_BLOCKCHAIN_KEY=${{ secrets.QA_BLOCKCHAIN_KEY }}" >> .env.qa
echo "QA_YOUTRACK_TOKEN=${{ secrets.QA_YOUTRACK_TOKEN }}" >> .env.qa
echo "QA_GITHUB_TOKEN=${{ secrets.QA_GITHUB_TOKEN }}" >> .env.qa
echo "BIGQUERY_TOKEN_PATH=${{ github.workspace }}/token.json" >> .env.qa
echo "QA_TRELLO_KEYS=${{ secrets.QA_TRELLO_KEYS }}" >> .env.qa
echo "========"
cat .env.qa
echo "========"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.5'
python-version: '3.12.6'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ dmypy.json

/static

swirl/migrations/

# emacs
*~
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12.5-slim-bookworm
FROM python:3.12.6-slim-bookworm

# Update, upgrade and install packages in a single RUN to reduce layers
RUN apt-get update && apt-get install -y \
Expand Down
4 changes: 2 additions & 2 deletions SearchProviders/atlassian.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"tags": [
"Jira",
"Atlassian",
"Internal"
"Dev"
]
},
{
Expand All @@ -48,7 +48,7 @@
"tags": [
"Confluence",
"Atlassian",
"Internal"
"Dev"
]
},
{
Expand Down
31 changes: 31 additions & 0 deletions SearchProviders/company_data_bigquery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Company Data - BigQuery",
"active": false,
"default": false,
"connector": "BigQuery",
"url": "",
"query_template": "select {fields} from `{table}` where search({field1}, '{query_string}') or search({field2}, '{query_string}') or search({field3}, '{query_string}');",
"query_template_json": {},
"post_query_template": {},
"http_request_headers": {},
"page_fetch_config_json": {},
"query_processors": [
"AdaptiveQueryProcessor"
],
"query_mappings": "fields=*,sort_by_date=year_founded,table=company_dataset.company,field1=name,field2=domain,field3=locality",
"result_grouping_field": "",
"result_processors": [
"MappingResultProcessor",
"CosineRelevancyResultProcessor"
],
"response_mappings": "",
"result_mappings": "title=name,body='{name} was founded in {year_founded} and serves the {industry} industry. The company is located in {locality} and has approximately {current_employee_estimate} employees. The registered domain for this organization is: {domain}',url='https://www.{linkedin_url}',NO_PAYLOAD",
"results_per_query": 10,
"credentials": "/path/to/bigquery/token.json",
"eval_credentials": "",
"tags": [
"Company",
"BigQuery",
"Internal"
]
}
2 changes: 1 addition & 1 deletion SearchProviders/elasticsearch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"MappingResultProcessor",
"CosineRelevancyResultProcessor"
],
"result_mappings": "url=_source.url,date_published=_source.date_published,author=_source.author,title=_source.subject,body=_source.content,_source.to,NO_PAYLOAD",
"result_mappings": "url='https://<your-elastic-instance>/email/_doc/{_id}',date_published=_source.date_published,author=_source.author,title=_source.subject,body=_source.content,_source.to,NO_PAYLOAD",
"credentials": "verify_certs=[True|False],ca_certs=/path/to/cert/file.crt,username:password",
"tags": [
"Enron",
Expand Down
22 changes: 0 additions & 22 deletions SearchProviders/funding_db_bigquery.json

This file was deleted.

8 changes: 4 additions & 4 deletions SearchProviders/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"GitHub",
"Code",
"Internal",
"Development"
"Dev"
]
},
{
Expand Down Expand Up @@ -60,7 +60,7 @@
"GitHub",
"Issues",
"Internal",
"Development"
"Dev"
]
},
{
Expand Down Expand Up @@ -92,7 +92,7 @@
"GitHub",
"PullRequests",
"Internal",
"Development"
"Dev"
]
},
{
Expand Down Expand Up @@ -124,7 +124,7 @@
"GitHub",
"Commits",
"Internal",
"Development"
"Dev"
]
}
]
3 changes: 2 additions & 1 deletion SearchProviders/google.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"credentials": "key=AIzaSyDvVeE-L6nCC9u-TTGuhggvSmzhtiTHJsA",
"eval_credentials": "",
"tags": [
"Swirl"
"Swirl",
"Dev"
]
}
]
4 changes: 2 additions & 2 deletions SearchProviders/hacker_news.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"tags": [
"HackerNews",
"Stories",
"Development"
"Dev"
]
},
{
Expand Down Expand Up @@ -56,7 +56,7 @@
"tags": [
"HackerNews",
"Comments",
"Development"
"Dev"
]
}

Expand Down
4 changes: 2 additions & 2 deletions SearchProviders/microsoft.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"query_mappings": "NOT=true,NOT_CHAR=-",
"result_grouping_field": "conversationId",
"result_processors": [
"MappingResultProcessor",
"DedupeByFieldResultProcessor",
"MappingResultProcessor",
"CosineRelevancyResultProcessor"
],
"response_mappings": "",
Expand Down Expand Up @@ -75,7 +75,7 @@
"CosineRelevancyResultProcessor"
],
"response_mappings": "",
"result_mappings": "title=resource.name,body='{resource.name} - {summary}',date_published=resource.createdDateTime,url=resource.webUrl,author=resource.createdBy.user.displayName,resource.lastModifiedBy.user.displayName,resource.lastModifiedDateTime,FILE_SYSTEM,NO_PAYLOAD",
"result_mappings": "title=resource.name,body='{resource.name} - {summary}',date_published=resource.createdDateTime,url=resource.webUrl,author=resource.createdBy.user.displayName,resource.lastModifiedBy.user.displayName,resource.lastModifiedDateTime,NO_PAYLOAD",
"results_per_query": 10,
"credentials": "",
"eval_credentials": "",
Expand Down
Loading

0 comments on commit 52086fc

Please sign in to comment.