From 2f9e6a090c2fa7a261a19b29f1cd7cc16a3f50cd Mon Sep 17 00:00:00 2001 From: scaramallion Date: Sat, 27 Jul 2024 17:44:22 +1000 Subject: [PATCH 1/3] Add fix for search not working --- README.rst | 4 ++-- docs/make.bat | 1 + pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 5323e899b6..35729ef042 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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 `_, it allows the easy creation of DICOM *Service Class Users* (SCUs) and *Service Class Providers* (SCPs). diff --git a/docs/make.bat b/docs/make.bat index eaa1589d84..9aa6ee6c9b 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -27,6 +27,7 @@ if errorlevel 9009 ( ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +python fix_search.py goto end :help diff --git a/pyproject.toml b/pyproject.toml index 46f12ad62e..6e1439951b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ maintainers = [ ] name = "pynetdicom" readme = "README.rst" -version = "2.1.0" +version = "2.1.1" [tool.poetry.dependencies] From 8a8abf00a4dd6b1366a15509da09a993e998f984 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Sat, 27 Jul 2024 18:04:51 +1000 Subject: [PATCH 2/3] Add fixer script --- docs/fix_search.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/fix_search.py diff --git a/docs/fix_search.py b/docs/fix_search.py new file mode 100644 index 0000000000..41e5d85291 --- /dev/null +++ b/docs/fix_search.py @@ -0,0 +1,20 @@ +""" +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"(' +html_fixed = re.sub(pat, repl, html) + +with open(search_html, "w") as fp: + fp.write(html_fixed) From cae8e585618f7d1ce498e7ff3dc5c0d6c461ccce Mon Sep 17 00:00:00 2001 From: scaramallion Date: Sat, 27 Jul 2024 18:08:52 +1000 Subject: [PATCH 3/3] Actually fix search --- docs/Makefile | 1 + docs/fix_search.py | 1 - docs/make.bat | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 57fada28e8..f5b3ef7057 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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." diff --git a/docs/fix_search.py b/docs/fix_search.py index 41e5d85291..3b3a6ba2eb 100644 --- a/docs/fix_search.py +++ b/docs/fix_search.py @@ -5,7 +5,6 @@ from pathlib import Path import re - search_html = Path("./_build/html/search.html") assert search_html.exists() diff --git a/docs/make.bat b/docs/make.bat index 9aa6ee6c9b..eaa1589d84 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -27,7 +27,6 @@ if errorlevel 9009 ( ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -python fix_search.py goto end :help