From 237ba77746753d7d5d7ecc4e6f2796dc0dc60faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Dupr=C3=A9?= Date: Mon, 24 Apr 2023 01:39:31 +0200 Subject: [PATCH] Adds action for the documentation (#18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds action for the documentation * update * doc * rename * index * remove one line * Update requirements-dev.txt * Update requirements-dev.txt * Update requirements-dev.txt --------- Co-authored-by: xavier dupré --- .github/workflows/cmakelint.yml | 2 +- .github/workflows/documentation.yml | 35 +++++++++++++++++++ .github/workflows/wheels.yml | 31 ---------------- .../plot_bench_cpu_vector_sum_parallel.py | 2 +- _doc/index.rst | 1 - requirements-dev.txt | 3 +- 6 files changed, 39 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/documentation.yml delete mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/cmakelint.yml b/.github/workflows/cmakelint.yml index 60bc5a50..1f9620de 100644 --- a/.github/workflows/cmakelint.yml +++ b/.github/workflows/cmakelint.yml @@ -1,4 +1,4 @@ -name: Run cmake-format linter +name: Cmake Format Checker on: [push] diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..27f4389e --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,35 @@ +name: Documentation + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build documentation on ${{ 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.10' + + - name: Install requirements + run: python -m pip install -r requirements.txt + + - name: Install requirements-dev.txt + run: python -m pip install -r requirements-dev.txt + + - name: Install + run: python -m pip install -e . + + - name: Documentation + run: python -m sphinx ./_doc ./dist/html + + - uses: actions/upload-artifact@v3 + with: + path: ./dist/html/** diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml deleted file mode 100644 index cd89fae0..00000000 --- a/.github/workflows/wheels.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build - -on: [push, pull_request] - -jobs: - build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v3 - - # Used to host cibuildwheel - - uses: actions/setup-python@v3 - - - name: Install cibuildwheel - run: python -m pip install cibuildwheel - - - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse - # to supply options, put them in 'env', like: - env: - CIBW_BEFORE_BUILD: pip install -r requirements-dev.txt - - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - diff --git a/_doc/examples/plot_bench_cpu_vector_sum_parallel.py b/_doc/examples/plot_bench_cpu_vector_sum_parallel.py index 639732b0..0710556a 100644 --- a/_doc/examples/plot_bench_cpu_vector_sum_parallel.py +++ b/_doc/examples/plot_bench_cpu_vector_sum_parallel.py @@ -1,5 +1,5 @@ """ -.. _l-example-bench-cpu-vector-sum: +.. _l-example-bench-cpu-vector-sum-parallel: Measuring CPU performance with a parallelized vector sum ======================================================== diff --git a/_doc/index.rst b/_doc/index.rst index aca989fd..858272bf 100644 --- a/_doc/index.rst +++ b/_doc/index.rst @@ -54,7 +54,6 @@ see also `code coverage `_. from onnx_extended.ext_test_case import measure_time from onnx_extended.reference import CReferenceEvaluator - X = make_tensor_value_info("X", TensorProto.FLOAT, [None, None, None, None]) Y = make_tensor_value_info("Y", TensorProto.FLOAT, [None, None, None, None]) B = make_tensor_value_info("B", TensorProto.FLOAT, [None, None, None, None]) diff --git a/requirements-dev.txt b/requirements-dev.txt index 1590f2f2..e7d0c23f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,4 @@ +autopep8 black clang-format cmakelang @@ -14,7 +15,7 @@ onnxmltools onnxruntime; python_version < '3.11' pandas psutil -pyquickhelper +pyquickhelper>=1.12.3821 pytest pytest-cov ruff