Skip to content

Commit 062b6c1

Browse files
authored
Add linter for RST (#15)
* Add linter for RST * update actions * fix path * check * rstcheck * fix import * azé * ci * fix rstchecker
1 parent eef694c commit 062b6c1

21 files changed

+172
-33
lines changed

.github/workflows/codeql.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "Code Scanning - Action"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
# ┌───────────── minute (0 - 59)
10+
# │ ┌───────────── hour (0 - 23)
11+
# │ │ ┌───────────── day of the month (1 - 31)
12+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
13+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
14+
# │ │ │ │ │
15+
# │ │ │ │ │
16+
# │ │ │ │ │
17+
# * * * * *
18+
- cron: '30 1 * * 0'
19+
20+
jobs:
21+
CodeQL-Build:
22+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
23+
runs-on: ubuntu-latest
24+
25+
permissions:
26+
# required for all workflows
27+
security-events: write
28+
29+
# only required for workflows in private repositories
30+
actions: read
31+
contents: read
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v3
36+
37+
# Initializes the CodeQL tools for scanning.
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v2
40+
# Override language selection by uncommenting this and choosing your languages
41+
# with:
42+
# languages: go, javascript, csharp, python, cpp, java, ruby
43+
44+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
45+
# If this step fails, then you should remove it and run the build manually (see below).
46+
- name: Autobuild
47+
uses: github/codeql-action/autobuild@v2
48+
49+
# ℹ️ Command-line programs to run using the OS shell.
50+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
51+
52+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
53+
# three lines and modify them (or add more) to build your code if your
54+
# project uses a compiled language
55+
56+
#- run: |
57+
# make bootstrap
58+
# make release
59+
60+
- name: Perform CodeQL Analysis
61+
uses: github/codeql-action/analyze@v2

.github/workflows/documentation.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
name: Documentation
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
# ┌───────────── minute (0 - 59)
10+
# │ ┌───────────── hour (0 - 23)
11+
# │ │ ┌───────────── day of the month (1 - 31)
12+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
13+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
14+
# │ │ │ │ │
15+
# │ │ │ │ │
16+
# │ │ │ │ │
17+
# * * * * *
18+
- cron: '30 1 * * 0'
419

520
jobs:
621
build_wheels:
@@ -16,7 +31,7 @@ jobs:
1631
# Used to host cibuildwheel
1732
- uses: actions/setup-python@v4
1833
with:
19-
python-version: '3.10'
34+
python-version: '3.11'
2035

2136
- name: Install requirements
2237
run: python -m pip install -r requirements.txt

.github/workflows/rstcheck.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: RST Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_wheels:
7+
name: rstcheck ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
# Used to host cibuildwheel
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Install requirements
22+
run: python -m pip install -r requirements.txt
23+
24+
- name: Install rstcheck
25+
run: python -m pip install sphinx tomli rstcheck[toml,sphinx]
26+
27+
- name: rstcheck
28+
run: rstcheck -r _doc onnx_array_api

.github/workflows/wheels-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# Used to host cibuildwheel
2121
- uses: actions/setup-python@v4
2222
with:
23-
python-version: '3.10'
23+
python-version: '3.11'
2424

2525
- name: Install cibuildwheel
2626
run: python -m pip install cibuildwheel

.github/workflows/wheels-mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# Used to host cibuildwheel
2121
- uses: actions/setup-python@v4
2222
with:
23-
python-version: '3.10'
23+
python-version: '3.11'
2424

2525
- name: Install cibuildwheel
2626
run: python -m pip install cibuildwheel

.github/workflows/wheels-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# Used to host cibuildwheel
2121
- uses: actions/setup-python@v4
2222
with:
23-
python-version: '3.10'
23+
python-version: '3.11'
2424

2525
- name: Install cibuildwheel
2626
run: python -m pip install cibuildwheel

_doc/api/npx_annot.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _l-api-npx-types:
2-
31
npx.npx_types
42
=============
53

_doc/api/npx_functions.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _l-api-npx-functions:
2-
31
npx.npx_functions
42
=================
53

_doc/api/npx_jit.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _l-api-npx-jit:
2-
31
npx, jit and eager mode
42
=======================
53

_doc/api/npx_numpy.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. _l-api-npx-numpy:
2-
31
npx.npx_numpy_tensors
42
=====================
53

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy