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

fix: trailing comma #59

Merged
merged 7 commits into from
Jan 8, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uv sync -U
- name: Update assets
run: |
uv run --with httpx update_assets.py
uv run update_assets.py
- name: Create PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
33 changes: 18 additions & 15 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
# uv export --group=docs --no-hashes --output-file=docs/requirements.txt
-e .
accessible-pygments==0.0.5
alabaster==0.7.16
anyio==4.6.2.post1
alabaster==0.7.16 ; python_full_version < '3.10'
alabaster==1.0.0 ; python_full_version >= '3.10'
anyio==4.8.0
babel==2.16.0
beautifulsoup4==4.9.3
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
beautifulsoup4==4.12.3
certifi==2024.12.14
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
docutils==0.21.2
exceptiongroup==1.2.2 ; python_full_version < '3.11'
Expand All @@ -17,22 +18,24 @@ h11==0.14.0
idna==3.10
imagesize==1.4.1
importlib-metadata==8.5.0 ; python_full_version < '3.10'
jinja2==3.1.4
jinja2==3.1.5
markdown-it-py==3.0.0
markupsafe==3.0.2
mdit-py-plugins==0.4.2
mdurl==0.1.2
myst-parser==3.0.1
myst-parser==3.0.1 ; python_full_version < '3.10'
myst-parser==4.0.0 ; python_full_version >= '3.10'
packaging==24.2
pydata-sphinx-theme==0.16.0
pygments==2.18.0
pydata-sphinx-theme==0.16.1
pygments==2.19.1
python-dotenv==1.0.1
pyyaml==6.0.2
requests==2.32.3
sniffio==1.3.1
snowballstemmer==2.2.0
soupsieve==2.6
sphinx==7.4.7
sphinx==7.4.7 ; python_full_version < '3.10'
sphinx==8.1.3 ; python_full_version >= '3.10'
sphinx-autobuild==2024.10.3
sphinx-basic-ng==1.0.0b2
sphinx-rtd-theme==3.0.2
Expand All @@ -44,11 +47,11 @@ sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
starlette==0.41.3
starlette==0.45.2
tomli==2.2.1 ; python_full_version < '3.11'
typing-extensions==4.12.2
urllib3==2.2.3
uvicorn==0.32.1
watchfiles==1.0.0
urllib3==2.3.0
uvicorn==0.34.0
watchfiles==1.0.3
websockets==14.1
zipp==3.21.0 ; python_full_version < '3.10'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sphinx-docsearch"
version = "0.2.0b1"
version = "0.2.0b2"
description = "A Sphinx extension for replacing the built-in search with Algolia DocSearch"
readme = "README.md"
authors = [
Expand Down
4 changes: 2 additions & 2 deletions src/sphinx_docsearch/static/docsearch_config.js_t
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ docsearch({
searchParameters: {{ docsearch_search_parameters | tojson }},
{%- endif %}
{%- if docsearch_max_results_per_group %}
maxResultsPerGroup: {{ docsearch_max_results_per_group }}
maxResultsPerGroup: {{ docsearch_max_results_per_group }},
{%- endif %}
{%- if docsearch_missing_results_url %}
getMissingResultsUrl({ query }) {
return `{{ docsearch_missing_results_url }}`
}
},
{%- endif %}
});
2 changes: 1 addition & 1 deletion tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@pytest.mark.sphinx("html", confoverrides={"extensions": ["sphinx_docsearch"]})
def test_no_builtin_search(app: Sphinx) -> None:
"""It adds all the DocSearch assets to the HTML output."""
"""It doesn't add the builtin search assets to the HTML output."""
app.build()
assert app.builder.search is False # type: ignore
assert not os.path.exists(Path(app.outdir) / "search.html")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def test_returns_version() -> None:
"""It returns the correct version."""
assert sphinx_docsearch.__version__ == "0.2.0b1"
assert sphinx_docsearch.__version__ == "0.2.0b2"


@pytest.mark.sphinx("html", confoverrides={"extensions": ["sphinx_docsearch"]})
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
)
def test_no_builtin_search(app: Sphinx) -> None:
"""It adds all the DocSearch assets to the HTML output."""
"""It adds the docsearch container to the DOM."""
app.build()

test_file = read_as_html(Path(app.outdir) / "index.html")
Expand Down
6 changes: 6 additions & 0 deletions update_assets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# /// script
# dependencies = [
# "httpx",
# ]
# ///

"""Update DocSearch assets from jsDelivr.

This extension bundles the JavaScript and CSS for DocSearch.
Expand Down
14 changes: 7 additions & 7 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading