diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..bea1259 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,61 @@ +name: "Code Scanning - Action" + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: '30 1 * * 0' + +jobs: + CodeQL-Build: + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest + runs-on: ubuntu-latest + + permissions: + # required for all workflows + security-events: write + + # only required for workflows in private repositories + actions: read + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + # Override language selection by uncommenting this and choosing your languages + # with: + # languages: go, javascript, csharp, python, cpp, java, ruby + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). + # If this step fails, then you should remove it and run the build manually (see below). + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # ✏️ If the Autobuild fails above, remove it and uncomment the following + # three lines and modify them (or add more) to build your code if your + # project uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 27f4389..dcc6d51 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,6 +1,21 @@ name: Documentation -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: '30 1 * * 0' jobs: build_wheels: @@ -16,7 +31,7 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Install requirements run: python -m pip install -r requirements.txt diff --git a/.github/workflows/rstcheck.yml b/.github/workflows/rstcheck.yml new file mode 100644 index 0000000..3d4b2cc --- /dev/null +++ b/.github/workflows/rstcheck.yml @@ -0,0 +1,28 @@ +name: RST Check + +on: [push, pull_request] + +jobs: + build_wheels: + name: rstcheck ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v3 + + # Used to host cibuildwheel + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install requirements + run: python -m pip install -r requirements.txt + + - name: Install rstcheck + run: python -m pip install sphinx tomli rstcheck[toml,sphinx] + + - name: rstcheck + run: rstcheck -r _doc onnx_array_api diff --git a/.github/workflows/wheels-linux.yml b/.github/workflows/wheels-linux.yml index 8445674..6557751 100644 --- a/.github/workflows/wheels-linux.yml +++ b/.github/workflows/wheels-linux.yml @@ -20,7 +20,7 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Install cibuildwheel run: python -m pip install cibuildwheel diff --git a/.github/workflows/wheels-mac.yml b/.github/workflows/wheels-mac.yml index 97f1902..c9ac273 100644 --- a/.github/workflows/wheels-mac.yml +++ b/.github/workflows/wheels-mac.yml @@ -20,7 +20,7 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Install cibuildwheel run: python -m pip install cibuildwheel diff --git a/.github/workflows/wheels-windows.yml b/.github/workflows/wheels-windows.yml index eb514ee..cf7e4bd 100644 --- a/.github/workflows/wheels-windows.yml +++ b/.github/workflows/wheels-windows.yml @@ -20,7 +20,7 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Install cibuildwheel run: python -m pip install cibuildwheel diff --git a/_doc/api/npx_annot.rst b/_doc/api/npx_annot.rst index 3a4d532..d7e46e3 100644 --- a/_doc/api/npx_annot.rst +++ b/_doc/api/npx_annot.rst @@ -1,5 +1,3 @@ -.. _l-api-npx-types: - npx.npx_types ============= diff --git a/_doc/api/npx_functions.rst b/_doc/api/npx_functions.rst index 5831cab..bc4810b 100644 --- a/_doc/api/npx_functions.rst +++ b/_doc/api/npx_functions.rst @@ -1,5 +1,3 @@ -.. _l-api-npx-functions: - npx.npx_functions ================= diff --git a/_doc/api/npx_jit.rst b/_doc/api/npx_jit.rst index fa814cd..05f6fbe 100644 --- a/_doc/api/npx_jit.rst +++ b/_doc/api/npx_jit.rst @@ -1,5 +1,3 @@ -.. _l-api-npx-jit: - npx, jit and eager mode ======================= diff --git a/_doc/api/npx_numpy.rst b/_doc/api/npx_numpy.rst index e26e17d..deb8c99 100644 --- a/_doc/api/npx_numpy.rst +++ b/_doc/api/npx_numpy.rst @@ -1,5 +1,3 @@ -.. _l-api-npx-numpy: - npx.npx_numpy_tensors ===================== diff --git a/_doc/api/npx_var.rst b/_doc/api/npx_var.rst index 0985e8b..8041e5e 100644 --- a/_doc/api/npx_var.rst +++ b/_doc/api/npx_var.rst @@ -1,5 +1,3 @@ -.. _l-api-npx-var: - npx.npx_var =========== diff --git a/_doc/api/onnx_tools.rst b/_doc/api/onnx_tools.rst index 401eb7d..31cc9c3 100644 --- a/_doc/api/onnx_tools.rst +++ b/_doc/api/onnx_tools.rst @@ -1,5 +1,3 @@ -.. _l-api-onnx-tools: - onnx tools ========== diff --git a/_doc/api/ort.rst b/_doc/api/ort.rst index d3de0ba..1a09e3d 100644 --- a/_doc/api/ort.rst +++ b/_doc/api/ort.rst @@ -1,5 +1,3 @@ -.. _l-api-ort: - ort === diff --git a/_doc/api/plotting.rst b/_doc/api/plotting.rst index c70d272..830cc86 100644 --- a/_doc/api/plotting.rst +++ b/_doc/api/plotting.rst @@ -1,5 +1,3 @@ -.. _l-api-plotting: - plotting ======== diff --git a/_doc/api/tools.rst b/_doc/api/tools.rst index fd9a256..b93d918 100644 --- a/_doc/api/tools.rst +++ b/_doc/api/tools.rst @@ -1,5 +1,3 @@ -.. _l-api-tools: - tools ===== diff --git a/_doc/examples/plot_onnxruntime.py b/_doc/examples/plot_onnxruntime.py index 52000bc..9b0ac89 100644 --- a/_doc/examples/plot_onnxruntime.py +++ b/_doc/examples/plot_onnxruntime.py @@ -1,7 +1,4 @@ """ - -.. _l-onnx-array-first-onnxruntime: - First examples with onnxruntime =============================== diff --git a/_doc/tutorial/benchmarks.rst b/_doc/tutorial/benchmarks.rst index ef02a16..f219294 100644 --- a/_doc/tutorial/benchmarks.rst +++ b/_doc/tutorial/benchmarks.rst @@ -1,5 +1,3 @@ -.. _l-benchmarks: - ========== Benchmarks ========== diff --git a/_doc/tutorial/overview.rst b/_doc/tutorial/overview.rst index 21aa513..a603b35 100644 --- a/_doc/tutorial/overview.rst +++ b/_doc/tutorial/overview.rst @@ -1,5 +1,3 @@ -.. _l-numpy-api-onnx: - ================== Numpy API for ONNX ================== diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9984f21..50b1795 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,11 +1,55 @@ jobs: +- job: 'TestLinuxWheelPip' + pool: + vmImage: 'ubuntu-latest' + strategy: + matrix: + Python311-Linux: + python.version: '3.11' + maxParallel: 3 + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + - script: sudo apt-get update + displayName: 'AptGet Update' + - script: sudo apt-get install -y graphviz + displayName: 'Install Graphviz' + - script: python -m pip install --upgrade pip setuptools wheel + displayName: 'Install tools' + - script: pip install -r requirements.txt + displayName: 'Install Requirements' + - script: pip install -r requirements-dev.txt + displayName: 'Install Requirements dev' + - script: | + ruff . + displayName: 'Ruff' + - script: | + black --diff . + displayName: 'Black' + - script: | + python -m pip wheel . --wheel-dir dist -v -v -v + displayName: 'build wheel' + - script: | + python -m pip install . -v -v -v + displayName: 'install wheel' + - script: | + python -m pytest -v + displayName: 'Runs Unit Tests' + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'wheel-linux-wheel-$(python.version)' + targetPath: 'dist' + - job: 'TestLinux' pool: vmImage: 'ubuntu-latest' strategy: matrix: Python310-Linux: - python.version: '3.10' + python.version: '3.11' maxParallel: 3 steps: @@ -32,6 +76,9 @@ jobs: - script: | ruff . displayName: 'Ruff' + - script: | + rstcheck -r ./_doc ./onnx_array_api + displayName: 'rstcheck' - script: | black --diff . displayName: 'Black' @@ -55,7 +102,7 @@ jobs: strategy: matrix: Python310-Windows: - python.version: '3.10' + python.version: '3.11' maxParallel: 3 steps: @@ -88,7 +135,7 @@ jobs: strategy: matrix: Python310-Mac: - python.version: '3.10' + python.version: '3.11' maxParallel: 3 steps: diff --git a/pyproject.toml b/pyproject.toml index 1528407..832a027 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,14 @@ +[tool.rstcheck] +report_level = "INFO" +ignore_directives = [ + "autoclass", + "autofunction", + "gdot", + "image-sg", + "runpython", +] +ignore_roles = ["epkg"] + [tool.ruff] # Exclude a variety of commonly ignored directories. diff --git a/requirements-dev.txt b/requirements-dev.txt index 6e774f0..6178c1b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,11 +16,13 @@ psutil pyquickhelper pytest pytest-cov +rstcheck[sphinx,toml] ruff scikit-learn skl2onnx sphinx sphinx-gallery +tomli tqdm wheel xgboost 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