Skip to content

windows compatiblity #76

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

Merged
merged 6 commits into from
Jul 23, 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
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ jobs:
- os: macos-latest
python-version: "3.10"
toxenv: py310
- os: windows-latest
python-version: "3.10"
toxenv: py310
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ sphinx-versioned-docs
+-------------------------+-----------------------+

Sphinx extension that allows building versioned docs for self-hosting.
Supported on Linux and macOS.

It works by producing docs for all(specified) branches in separate folders and injects a readthedocs-like version selector menu/badge.

Expand Down
1 change: 1 addition & 0 deletions docs/changes/76.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds windows compatibility.
4 changes: 2 additions & 2 deletions tests/test_multicommit_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_file_content(ver, expected):

# Verify the contents of `example.html`, if expected
data = None
with open(OUTPATH / ver / file) as f:
with open(OUTPATH / ver / file, encoding="utf8") as f:
data = f.read()
for content in content_to_verify.split():
assert content in data
Expand All @@ -74,7 +74,7 @@ def test_injected_hyperlinks(ver, file):
assert (OUTPATH / ver / file).is_file()

data = None
with open(OUTPATH / ver / file) as f:
with open(OUTPATH / ver / file, encoding="utf8") as f:
data = f.read()
soup = bs(data, features="html.parser")
injected_code = soup.find_all(class_="injected")
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ commands =

# test a multi-commit repository with `sphinx_rtd_theme` and injection tests
[testenv]
# Windows compatibility GitPython/issues/356
passenv = USERNAME
changedir = .tmp/{envname}
description = build `sphinx_rtd_theme` with prebuild for a multi-commit git-repo
extras = tests
Expand Down
Loading