🐍 Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Update docs CI (#2624)
João Gustavo A. Amorim4eddca61181b
diff --git a/.github/actions/env/action.yml b/.github/actions/env/action.ymlindex fd1223759..4d5ac6a53 100644--- a/.github/actions/env/action.yml+++ b/.github/actions/env/action.yml@@ -6,13 +6,13 @@ on:python-version:description: "The python version desired."required: true- default: '3.11'+ default: "3.11"type: stringpytorch-version:description: "The pytorch version desired."required: true- default: '2.1.0'+ default: "2.1.0"type: stringruns:diff --git a/.github/actions_info.md b/.github/actions_info.mdindex a37953aa0..0b54a8e4b 100644--- a/.github/actions_info.md+++ b/.github/actions_info.md@@ -45,6 +45,8 @@ Has the inputs:`continue-on-error` behavior on the test step.- `fail-fast`: (boolean, default: `false`) to set the `fail-fast` behavior onthe matrix strategy.+- `coverage`: (boolean, default: `false`) to run the tests suite using the+ coverage mode, and report the results and upload it on codecov.A matrix strategy will be adopted from the list of python and pytorch version.@@ -69,8 +71,25 @@ A matrix strategy will be adopted from the list of python and pytorch version.### Tests typingThis workflow ([.github/workflows/test_typing.yml](workflows/test_typing.yml)) will setup-an environment using the [env](#Env) action, run the typing tests using mypy and-uploading the coverage report to codecov.+an environment using the [env](#Env) action, run the typing tests using mypy.++Use the actions:+- `actions/checkout`+- `.github/actions/env`++Has the inputs:+- `os`: (string, default: `ubuntu-latest`) the OS name same as supported by [gha](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners).+- `python-version`: (json list of strings, default: `'["3.11"]'`) a string with+ format of a json list within strings for each python version desired.+- `pytorch-version`: (json list of strings, default: `'["2.1.0"]'`) a string+ with format of a json list within strings for each pytorch version desired.+- `fail-fast`: (boolean, default: `false`) to set the `fail-fast` behavior on+ the matrix strategy.++### Docs+This workflow ([.github/workflows/docs.yml](workflows/docs.yml)) will setup+an environment using the [env](#Env) action, run the docstrings tests using pytest,+install the docs dependencies and build the html docs within sphinxs.Use the actions:- `actions/checkout`diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex 7ec938fe2..84f18a477 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -1,58 +1,66 @@-name: Documentation-on:- workflow_dispatch:- push:- branches:- - master- pull_request:- schedule:- - cron: "0 4 * * *"+ workflow_call:+ inputs:+ python-version:+ required: false+ type: string+ default: '["3.11"]'+ pytorch-version:+ required: false+ type: string+ default: '["2.1.0"]'+ os:+ required: false+ type: string+ default: ubuntu-latest+ fail-fast:+ required: false+ type: boolean+ default: falsejobs:- test:+ tests:+ name: docstests & sphinx-build - python-${{ matrix.python-version }}, torch-${{ matrix.pytorch-version }}runs-on: ubuntu-lateststrategy:- fail-fast: false+ fail-fast: ${{ inputs.fail-fast }}+ matrix:+ python-version: ${{ fromJSON(inputs.python-version) }}+ pytorch-version: ${{ fromJSON(inputs.pytorch-version) }}+ exclude:+ - pytorch-version: '1.9.1'+ python-version: '3.10'+ - pytorch-version: '1.10.2'+ python-version: '3.10'+ - pytorch-version: '1.9.1'+ python-version: '3.11'+ - pytorch-version: '1.10.2'+ python-version: '3.11'+ - pytorch-version: '1.11.0'+ python-version: '3.11'+ - pytorch-version: '1.12.1'+ python-version: '3.11'+ - pytorch-version: '1.13.1'+ python-version: '3.11'+steps:- - uses: actions/checkout@v3- - name: Setup conda dependencies- uses: conda-incubator/setup-miniconda@v2+ - name: Checkout kornia+ uses: actions/checkout@v3++ - name: Setting environment on ${{ inputs.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}+ uses: ./.github/actions/envwith:- auto-update-conda: true- python-version: 3.11- - name: Install dependencies- shell: bash -l {0}- run: |- conda install curl -c conda-forge- conda install pytorch cpuonly -c pytorch- pip install .[dev,x]+ python-version: ${{ matrix.python-version }}+ pytorch-version: ${{ matrix.pytorch-version }}+- name: Run doctestshell: bash -l {0}run: make doctest- build:- needs: test- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v3- - name: Setup conda dependencies- uses: conda-incubator/setup-miniconda@v2- with:- auto-update-conda: true- python-version: 3.11- - name: Install dependencies+ - name: Install docs depsshell: bash -l {0}- run: |- pip install .[docs]+ run: pip install -e .[docs]+- name: Build Documentationshell: bash -l {0}run: make build-docs SPHINXOPTS="-W"- - name: Deploy to GitHub Pages- if: ${{ github.event_name != 'pull_request' }}- uses: JamesIves/github-pages-deploy-action@v4- with:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- BRANCH: gh_pages # The branch the action should deploy to.- FOLDER: docs/build/html # The folder the action should deploy.- CLEAN: true # Automatically remove deleted files from the deploy branchdiff --git a/.github/workflows/pr_test_cpu.yml b/.github/workflows/pr_test_cpu.ymlindex bd4ca32b7..a8661cb63 100644--- a/.github/workflows/pr_test_cpu.yml+++ b/.github/workflows/pr_test_cpu.yml@@ -50,8 +50,11 @@ jobs:test-tutorials:uses: ./.github/workflows/test_tutorials.yml+ docs:+ uses: ./.github/workflows/docs.yml+collector:- needs: [tests-cpu, test-tutorials, test-typing, tests-coverage]+ needs: [tests-cpu, test-tutorials, test-typing, tests-coverage, docs]if: always()runs-on: ubuntu-lateststeps:diff --git a/.github/workflows/scheduled_test_cpu.yml b/.github/workflows/scheduled_test_cpu.ymlindex fbfadbe4f..5855d3bae 100644--- a/.github/workflows/scheduled_test_cpu.yml+++ b/.github/workflows/scheduled_test_cpu.yml@@ -21,7 +21,6 @@ jobs:uses: ./.github/workflows/tests.ymlwith:os: 'Ubuntu-latest'-python-version: '["3.8", "3.9", "3.10", "3.11"]'pytorch-version: '["1.9.1", "1.10.2", "1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.0"]'pytorch-dtype: ${{ matrix.pytorch-dtype }}@@ -59,6 +58,9 @@ jobs:test-typing:uses: ./.github/workflows/test_typing.yml+ docs:+ uses: ./.github/workflows/docs.yml+tests-coverage:uses: ./.github/workflows/tests.ymlwith: