Skip to content

Commit 302d745

Browse files
committed
Move to static search and remove everything related to Meilisearch
Signed-off-by: paul.profizi <[email protected]>
1 parent 0fec701 commit 302d745

File tree

3 files changed

+6
-71
lines changed

3 files changed

+6
-71
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ concurrency:
2828
env:
2929
DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com'
3030
MAIN_PYTHON_VERSION: '3.9'
31-
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
32-
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
3331

3432
jobs:
3533
debug:
@@ -161,28 +159,13 @@ jobs:
161159
needs: [docs]
162160
steps:
163161
- name: "Upload development documentation"
164-
uses: ansys/actions/doc-deploy-dev@v7
162+
uses: ansys/actions/doc-deploy-dev@v8
165163
with:
166164
cname: ${{ env.DOCUMENTATION_CNAME }}
167165
token: ${{ secrets.GITHUB_TOKEN }}
168166
doc-artifact-name: HTML-doc-ansys-dpf-core.zip
169167
decompress-artifact: true
170168

171-
doc-index-dev:
172-
name: "Deploy dev index docs"
173-
runs-on: ubuntu-latest
174-
needs: upload-development-docs
175-
steps:
176-
- name: "Deploy the latest documentation index"
177-
uses: ansys/actions/doc-deploy-index@v7
178-
with:
179-
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
180-
index-name: pydpf-core-vdev
181-
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
182-
api-key: ${{ env.MEILISEARCH_API_KEY }}
183-
doc-artifact-name: HTML-doc-ansys-dpf-core.zip
184-
decompress-artifact: true
185-
186169
examples:
187170
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
188171
uses: ./.github/workflows/examples.yml

.github/workflows/releaser.yml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ on:
1717

1818
env:
1919
DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com'
20-
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
21-
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
2220

2321
jobs:
2422

@@ -89,47 +87,13 @@ jobs:
8987
path: HTML-doc-ansys-dpf-core.zip
9088

9189
- name: "Deploy the stable documentation"
92-
uses: ansys/actions/doc-deploy-stable@v7
90+
uses: ansys/actions/doc-deploy-stable@v8
9391
with:
9492
cname: ${{ env.DOCUMENTATION_CNAME }}
9593
token: ${{ secrets.GITHUB_TOKEN }}
9694
doc-artifact-name: HTML-doc-ansys-dpf-core.zip
9795
decompress-artifact: true
9896

99-
doc-index-stable:
100-
name: "Deploy stable docs index"
101-
runs-on: ubuntu-latest
102-
needs: upload_docs_release
103-
steps:
104-
- name: "Install Git and clone project"
105-
uses: actions/checkout@v4
106-
with:
107-
ref: ${{ github.event.inputs.checkout_ref || '' }}
108-
109-
- name: "Install the package requirements"
110-
run: |
111-
python3 -m venv .venv
112-
.venv/bin/python -m pip install -e .
113-
114-
- name: "Get the version to PyMeilisearch"
115-
run: |
116-
VERSION=$(.venv/bin/python -c "from ansys.dpf.core import __version__; print('.'.join(__version__.split('.')[:2]))")
117-
VERSION_MEILI=$(.venv/bin/python -c "from ansys.dpf.core import __version__; print('-'.join(__version__.split('.')[:2]))")
118-
echo "Calculated VERSION: $VERSION"
119-
echo "Calculated VERSION_MEILI: $VERSION_MEILI"
120-
echo "VERSION=$VERSION" >> $GITHUB_ENV
121-
echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV
122-
123-
- name: "Deploy the latest documentation index"
124-
uses: ansys/actions/doc-deploy-index@v7
125-
with:
126-
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
127-
index-name: pydpf-core-v${{ env.VERSION_MEILI }}
128-
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
129-
api-key: ${{ env.MEILISEARCH_API_KEY }}
130-
doc-artifact-name: HTML-doc-ansys-dpf-core.zip
131-
decompress-artifact: true
132-
13397
update_ansys_lab_examples:
13498
uses: ./.github/workflows/ansys_lab.yml
13599
needs: get_latest_tag

doc/source/conf.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,10 @@ def reset_servers(gallery_conf, fname, when):
206206
"json_url": f"https://{cname}/versions.json",
207207
"version_match": get_version_match(__version__),
208208
},
209-
"use_meilisearch": {
210-
"api_key": os.getenv("MEILISEARCH_PUBLIC_API_KEY", ""),
211-
"index_uids": {
212-
f"pydpf-core-v{get_version_match(__version__).replace('.', '-')}": "PyDPF-Core",
213-
},
209+
"static_search": {
210+
"threshold": 0.5,
211+
"min_chars_for_search": 2,
212+
"ignoreLocation": True,
214213
},
215214
}
216215

@@ -318,14 +317,3 @@ def reset_servers(gallery_conf, fname, when):
318317

319318
# A list of files that should not be packed into the epub file.
320319
epub_exclude_files = ["search.html"]
321-
322-
323-
def verify_meilisearch_is_active(app):
324-
MEILISEARCH_PUBLIC_API_KEY = os.getenv("MEILISEARCH_PUBLIC_API_KEY", None)
325-
if not MEILISEARCH_PUBLIC_API_KEY:
326-
sys.stderr.write("Could not find MEILISEARCH_PUBLIC_API_KEY")
327-
# sys.exit(1)
328-
329-
330-
def setup(app):
331-
app.connect("builder-inited", verify_meilisearch_is_active)

0 commit comments

Comments
 (0)