Skip to content
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

[MRG] Add fix for search not working #956

Merged
merged 3 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
|coverage| |unit-tests| |type-hints| |docs| |black| |pypi-versions| |python-versions| |conda| |zenodo|

.. |coverage| image:: https://codecov.io/gh/pydicom/pynetdicom/branch/main/graph/badge.svg
.. |coverage| image:: https://codecov.io/gh/pydicom/pynetdicom/branch/main/graph/badge.svg
:target: https://codecov.io/gh/pydicom/pynetdicom

.. |unit-tests| image:: https://github.com/pydicom/pynetdicom/workflows/unit-tests/badge.svg
Expand Down Expand Up @@ -44,7 +44,7 @@ medical images and related information. It defines the formats and communication
protocols for media exchange in radiology, cardiology, radiotherapy and other
medical domains.

*pynetdicom* is a pure Python 3.7+ package that implements the DICOM
*pynetdicom* is a pure Python package that implements the DICOM
networking protocol. Working with
`pydicom <https://github.com/pydicom/pydicom>`_, it allows the easy creation
of DICOM *Service Class Users* (SCUs) and *Service Class Providers* (SCPs).
Expand Down
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ html:
rm -rf $(BUILDDIR)/html/_images
#rm -rf _build/doctrees/
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
python fix_search.py
touch $(BUILDDIR)/html/.nojekyll
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
Expand Down
19 changes: 19 additions & 0 deletions docs/fix_search.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
A temporary fix for #953 while waiting for upstream sphinx_rtd_theme to fix/remove their
dependency on jQuery.
"""
from pathlib import Path
import re

search_html = Path("./_build/html/search.html")
assert search_html.exists()

with open(search_html) as fp:
html = fp.read()

pat = r"(<script>\s+jQuery.+searchindex\.js.+\s+<\/script>)"
repl = r'<script src="searchindex.js" defer></script>'
html_fixed = re.sub(pat, repl, html)

with open(search_html, "w") as fp:
fp.write(html_fixed)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ maintainers = [
]
name = "pynetdicom"
readme = "README.rst"
version = "2.1.0"
version = "2.1.1"


[tool.poetry.dependencies]
Expand Down
Loading