Skip to content

Commit 89b37f9

Browse files
authored
Merge pull request #262 from hoodmane/up-master
Merge pyodide/sphinx-js-fork into pyodide/sphinx-js
2 parents c171aa3 + a7ffdc5 commit 89b37f9

100 files changed

Lines changed: 7801 additions & 2263 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/codecov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
comment: false
2+
codecov:
3+
branch: main
4+
require_ci_to_pass: false
5+
notify:
6+
wait_for_ci: false

.github/workflows/check_ts.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: check-ts
2+
on:
3+
pull_request:
4+
permissions: write-all
5+
6+
jobs:
7+
ts:
8+
if: false
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Get diff lines
13+
id: diff
14+
uses: Equip-Collaboration/diff-line-numbers@v1.0.0
15+
with:
16+
include: '["\\.ts$"]'
17+
- name: Detecting files changed
18+
id: files
19+
uses: umani/changed-files@v4.0.0
20+
with:
21+
repo-token: ${{ github.token }}
22+
pattern: '^.*\.ts$'
23+
- name: List files changed (you can remove this step, for monitoring only)
24+
run: |
25+
echo 'Files modified: ${{steps.files.outputs.files_updated}}'
26+
echo 'Files added: ${{steps.files.outputs.files_created}}'
27+
echo 'Files removed: ${{steps.files.outputs.files_deleted}}'
28+
- uses: Arhia/action-check-typescript@v1.1.0
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
use-check: true
32+
check-fail-mode: added
33+
files-changed: ${{steps.files.outputs.files_updated}}
34+
files-added: ${{steps.files.outputs.files_created}}
35+
files-deleted: ${{steps.files.outputs.files_deleted}}
36+
line-numbers: ${{steps.diff.outputs.lineNumbers}}
37+
output-behaviour: both
38+
comment-behaviour: new
39+
ts-config-path: "./sphinx_js/js/tsconfig.json"

.github/workflows/ci.yml

Lines changed: 89 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,20 @@ name: CI
33

44
on:
55
push:
6-
branches:
7-
- 'master'
6+
branches: [master]
87
pull_request:
9-
branches:
10-
- 'master'
8+
branches: [master]
119

1210
jobs:
1311
test:
14-
1512
runs-on: ubuntu-latest
1613

1714
continue-on-error: true
1815

1916
strategy:
17+
fail-fast: false
2018
matrix:
21-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
22-
experimental: [false]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2320

2421
name: Python ${{ matrix.python-version}}
2522
steps:
@@ -33,6 +30,89 @@ jobs:
3330
- name: Update pip and install dev requirements
3431
run: |
3532
python -m pip install --upgrade pip
36-
pip install tox tox-gh-actions
33+
pip install nox
34+
3735
- name: Test
38-
run: tox
36+
run: nox -s tests-${{ matrix.python-version }}
37+
38+
- name: Upload coverage reports to Codecov
39+
uses: codecov/codecov-action@v3
40+
env:
41+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
42+
43+
- uses: actions/upload-artifact@v4
44+
if: success() || failure()
45+
with:
46+
name: test-results-${{ matrix.python-version }}
47+
path: test-results.xml
48+
49+
test-typedoc-versions:
50+
runs-on: ubuntu-latest
51+
52+
continue-on-error: true
53+
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
python-version: ["3.12"]
58+
typedoc-version: ["0.25", "0.26", "0.27"]
59+
60+
name: Python ${{ matrix.python-version}} + typedoc ${{ matrix.typedoc-version }}
61+
steps:
62+
- uses: actions/checkout@v3.1.0
63+
64+
- name: Set up Node
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: 22
68+
69+
- name: Set up Python
70+
uses: actions/setup-python@v4.3.0
71+
with:
72+
python-version: ${{ matrix.python-version }}
73+
74+
- name: Update pip and install dev requirements
75+
run: |
76+
python -m pip install --upgrade pip
77+
pip install nox
78+
- name: Test
79+
run: nox -s "test_typedoc-${{ matrix.python-version }}(typedoc='${{ matrix.typedoc-version }}')"
80+
81+
- uses: actions/upload-artifact@v4
82+
if: success() || failure()
83+
with:
84+
name: test_typedoc-results-${{ matrix.python-version }}-${{ matrix.typedoc-version }}
85+
path: test-results.xml
86+
87+
test-sphinx-versions:
88+
runs-on: ubuntu-latest
89+
90+
continue-on-error: true
91+
92+
strategy:
93+
fail-fast: false
94+
matrix:
95+
python-version: ["3.12"]
96+
sphinx-version: ["6"]
97+
98+
name: Test sphinx 6
99+
steps:
100+
- uses: actions/checkout@v3.1.0
101+
102+
- name: Set up Python
103+
uses: actions/setup-python@v4.3.0
104+
with:
105+
python-version: ${{ matrix.python-version }}
106+
107+
- name: Update pip and install dev requirements
108+
run: |
109+
python -m pip install --upgrade pip
110+
pip install nox
111+
- name: Test
112+
run: nox -s "test_sphinx_6-${{ matrix.python-version }}"
113+
114+
- uses: actions/upload-artifact@v4
115+
if: success() || failure()
116+
with:
117+
name: test_sphinx_6-${{ matrix.python-version }}
118+
path: test-results.xml

.github/workflows/test_report.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Test Report"
2+
on:
3+
workflow_run:
4+
workflows: ["CI"]
5+
types:
6+
- completed
7+
jobs:
8+
report:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: ["3.10", "3.11", "3.12"]
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: dorny/test-reporter@v1.6.0
17+
with:
18+
artifact: test-results-${{ matrix.python-version }}
19+
name: Test report - ${{ matrix.python-version }}
20+
path: test-results.xml
21+
reporter: java-junit
22+
report-typedoc:
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
python-version: ["3.12"]
27+
typedoc-version: ["0.25"]
28+
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: dorny/test-reporter@v1.6.0
32+
with:
33+
artifact: test_typedoc-results-${{ matrix.python-version }}-${{ matrix.typedoc-version }}
34+
name: Test report - Python ${{ matrix.python-version}} + typedoc ${{ matrix.typedoc-version }}
35+
path: test-results.xml
36+
reporter: java-junit
37+
report-sphinx:
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
python-version: ["3.12"]
42+
sphinx-version: ["6"]
43+
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: dorny/test-reporter@v1.6.0
47+
with:
48+
artifact: test_sphinx_6-${{ matrix.python-version }}
49+
name: Test report - Sphinx 6
50+
path: test-results.xml
51+
reporter: java-junit

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
/build
55
/dist
66
/node_modules
7-
/tests/source/docs/_build
8-
/tests/test_build_js/source/_build
9-
/tests/test_build_js/source/docs/_build
10-
/tests/test_build_ts/source/docs/_build
7+
_build
118
sphinx_js.egg-info/
129
# Python 3
1310
*/__pycache__/*
@@ -19,3 +16,8 @@ sphinx_js.egg-info/
1916
.vscode
2017
.DS_Store
2118
venv
19+
.venv
20+
coverage.xml
21+
test-results.xml
22+
node_modules
23+
tsconfig.tsbuildinfo

.pre-commit-config.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
default_language_version:
2+
python: "3.12"
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: "v4.4.0"
6+
hooks:
7+
- id: check-added-large-files
8+
- id: check-case-conflict
9+
- id: check-merge-conflict
10+
exclude: README.rst
11+
- id: check-symlinks
12+
- id: check-yaml
13+
- id: debug-statements
14+
- id: end-of-file-fixer
15+
- id: mixed-line-ending
16+
- id: trailing-whitespace
17+
18+
- repo: https://github.com/charliermarsh/ruff-pre-commit
19+
rev: "v0.0.291"
20+
hooks:
21+
- id: ruff
22+
args: [--fix]
23+
24+
- repo: https://github.com/psf/black
25+
rev: "23.9.1"
26+
hooks:
27+
- id: black
28+
29+
- repo: https://github.com/pre-commit/mirrors-prettier
30+
rev: "v3.0.3"
31+
hooks:
32+
- id: prettier
33+
34+
- repo: https://github.com/pre-commit/pygrep-hooks
35+
rev: "v1.10.0"
36+
hooks:
37+
- id: rst-backticks
38+
- id: rst-directive-colons
39+
- id: rst-inline-touching-normal
40+
41+
- repo: https://github.com/codespell-project/codespell
42+
rev: "v2.2.5"
43+
hooks:
44+
- id: codespell
45+
46+
- repo: https://github.com/pre-commit/mirrors-mypy
47+
rev: "v1.5.1"
48+
hooks:
49+
- id: mypy
50+
exclude: (tests/)
51+
args: []
52+
additional_dependencies:
53+
- attrs
54+
- cattrs
55+
- jinja2
56+
- nox
57+
- pydantic
58+
- pytest
59+
- sphinx
60+
- types-docutils
61+
- types-parsimonious
62+
- types-setuptools
63+
64+
ci:
65+
autoupdate_schedule: "quarterly"

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ For more details, please read the
55
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
66

77
## How to Report
8+
89
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page.

MANIFEST.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
recursive-include sphinx_js/templates *.rst
22
include LICENSE
33
include requirements_dev.txt
4-
include tox.ini
4+
include noxfile.py
5+
include sphinx_js/js/*.mjs
6+
include sphinx_js/js/*.ts
7+
include sphinx_js/js/*.json
58

69
recursive-include tests *.py *.rst *.ts *.json *.js *.md

0 commit comments

Comments
 (0)