2 Commits

Author SHA1 Message Date
f234f94171 Removed unused xapian action 2023-11-05 23:49:45 +01:00
fa758867cc Migrated from xapian to elastic 2023-11-05 23:42:52 +01:00
6 changed files with 16 additions and 47 deletions

View File

@ -6,13 +6,13 @@ runs:
- name: Install apt packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gettext libxapian-dev libgraphviz-dev
version: 1.0 # increment to reset cache
packages: gettext libgraphviz-dev
version: 1.0 # increment to reset cache
- name: Install dependencies
run: |
sudo apt update
sudo apt install gettext libxapian-dev libgraphviz-dev
sudo apt install gettext libgraphviz-dev
shell: bash
- name: Set up python
@ -25,7 +25,7 @@ runs:
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-0 # increment to reset cache
key: poetry-0 # increment to reset cache
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'

View File

@ -1,10 +0,0 @@
name: "Setup xapian"
description: "Setup the xapian indexes"
runs:
using: composite
steps:
- name: Setup xapian index
run: |
mkdir -p /dev/shm/search_indexes
ln -s /dev/shm/search_indexes sith/search_indexes
shell: bash

View File

@ -2,7 +2,7 @@ name: Sith 3 CI
on:
push:
branches: [master, taiste]
branches: [master, taiste, features/**]
pull_request:
branches: [master, taiste]
workflow_dispatch:
@ -21,11 +21,16 @@ jobs:
tests:
name: Run tests and generate coverage report
runs-on: ubuntu-latest
container:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
env:
discovery.type: single-node
ports:
- 9200
steps:
- name: Check out repository
uses: actions/checkout@v3
- uses: ./.github/actions/setup_project
- uses: ./.github/actions/setup_xapian
- uses: ./.github/actions/compile_messages
- name: Run tests
run: poetry run coverage run ./manage.py test

28
poetry.lock generated
View File

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
[[package]]
name = "alabaster"
@ -1526,30 +1526,6 @@ files = [
{file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"},
]
[[package]]
name = "xapian-bindings"
version = "0.1.0"
description = "Meta-package to build and install xapian-bindings extension."
optional = false
python-versions = "*"
files = [
{file = "xapian-bindings-0.1.0.tar.gz", hash = "sha256:f2b0396082ebf4f6681ab43d6d8fd1f63b6964b18c32c91236ed067c6f62ad14"},
]
[[package]]
name = "xapian-haystack"
version = "3.0.1"
description = "A Xapian backend for Haystack"
optional = false
python-versions = "*"
files = [
{file = "xapian-haystack-3.0.1.tar.gz", hash = "sha256:a5c0e1262b95008df4dfeb58d093c654acee3f2b27ea3f7d366900895cdc70f9"},
]
[package.dependencies]
django = ">=2.2"
django-haystack = ">=2.8.0"
[[package]]
name = "zipp"
version = "3.11.0"
@ -1572,4 +1548,4 @@ testing = ["coverage"]
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
content-hash = "62519616aff5a472dac3dd8071a6404b1ee8eab12a197af717a0520f7ded0331"
content-hash = "32bf0229e7ac812ea278a36587c184cd4ae507f87816f573447e85cd5312e52c"

View File

@ -33,8 +33,6 @@ phonenumbers = "^8.12"
django-ajax-selects = "^2.1.0"
reportlab = "^3.6"
django-haystack = "^3.2.1"
xapian-haystack = "^3.0.1"
xapian-bindings = "^0.1.0"
libsass = "^0.22"
django-ordered-model = "^3.7"
django-simple-captcha = "^0.5.17"

View File

@ -191,9 +191,9 @@ TEMPLATES = [
HAYSTACK_CONNECTIONS = {
"default": {
"ENGINE": "xapian_backend.XapianEngine",
"PATH": os.path.join(os.path.dirname(__file__), "search_indexes", "xapian"),
"INCLUDE_SPELLING": True,
"ENGINE": "haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine",
'URL': 'http://localhost:9200/',
'INDEX_NAME': 'haystack',
}
}