diff --git a/.github/workflows/docs-reusable-workflow.yaml b/.github/workflows/docs-reusable-workflow.yaml new file mode 100644 index 00000000..a3e1ea0c --- /dev/null +++ b/.github/workflows/docs-reusable-workflow.yaml @@ -0,0 +1,85 @@ +--- +# SPDX-FileCopyrightText: (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +name: "Build Documentation" + +on: # yamllint disable-line rule:truthy rule:line-length + workflow_call: + inputs: + docs_directory: + description: >- + Documentation directory where the job will run, defaults to '.' + required: false + default: "." + type: string + simple_mode: + description: >- + When true, override configuration for simple documentation sites + required: false + default: true + type: boolean + exclude_patterns: + description: >- + Comma separated list of exclude patterns to use during the build, + defaults to empty list + required: false + default: "" + type: string + +permissions: + contents: read + +jobs: + build-documentation: + permissions: + contents: read # minimal privilege required + runs-on: ubuntu-latest + env: + DOCS_DIR: ${{ inputs.docs_directory }} + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + # Fetch all history, otherwise sporadic issue with missing tags + fetch-depth: 0 + # Fetch tags + fetch-tags: true + # Checkout the branch that triggered the workflow + # to avoid detached HEAD + ref: ${{ github.event.pull_request.head.sha || github.head_ref }} + persist-credentials: false + + - name: Download template + if: ${{ inputs.simple_mode }} + shell: bash + run: | + cd "${GITHUB_WORKSPACE}/${DOCS_DIR}" + wget https://docs.openedgeplatform.intel.com/template/template.tar.gz + # Override any existing files with template + tar xf template.tar.gz + if [ -f "dictionary_append.txt" ]; then + cat "dictionary_append.txt" >> "dict.txt" + fi + + - name: Add exclude patterns + env: + EXCLUDE: ${{ inputs.exclude_patterns }} + shell: bash + run: | + # Remove any spaces + exclude_no_spaces="${EXCLUDE// /}" + # Surround patterns with quotes and create Python list + exclude_pattern="[\"${exclude_no_spaces//,/\", \"}\"]" + conf_files=$(find "${GITHUB_WORKSPACE}" -type f -path "*/docs/conf.py") + for conf_file in $conf_files; do + echo "exclude_patterns.extend(${exclude_pattern})" >> "$conf_file" + done + + - name: Build Documentation + env: + SIMPLE_MODE: ${{ inputs.simple_mode }} + shell: bash + run: | + cd "${GITHUB_WORKSPACE}/${DOCS_DIR}" + make build diff --git a/.github/workflows/documentation-check.yaml b/.github/workflows/documentation-check.yaml new file mode 100644 index 00000000..adfec9e2 --- /dev/null +++ b/.github/workflows/documentation-check.yaml @@ -0,0 +1,41 @@ +--- +# SPDX-FileCopyrightText: (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +name: Documentation Check + +on: # yamllint disable-line rule:truthy + pull_request: + branches: + - main + workflow_dispatch: + +permissions: {} + +jobs: + filter: + permissions: + contents: read # needed for actions/checkout + runs-on: ubuntu-latest + outputs: + dlstreamer_documentation_changed: ${{ steps.filter.outputs.dlstreamer_documentation }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Set paths filter + id: filter + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 + with: + filters: | + dlstreamer_documentation: + - 'docs/user-guide/**' + + build-dlstreamer-documentation: + permissions: + contents: read # needed for actions/checkout + needs: filter + if: ${{ needs.filter.outputs.dlstreamer_documentation_changed == 'true' }} + uses: ./.github/workflows/docs-reusable-workflow.yaml + with: + docs_directory: . diff --git a/docs/user-guide/dev_guide/latency_tracer.md b/docs/user-guide/dev_guide/latency_tracer.md index d84f0c3f..2b9c7362 100644 --- a/docs/user-guide/dev_guide/latency_tracer.md +++ b/docs/user-guide/dev_guide/latency_tracer.md @@ -14,7 +14,7 @@ precision in the order of **milliseconds**. ## Elements and pipeline latency -### Basic configuration +**Basic configuration:** Sample pipeline with enabled default latency tracker: @@ -74,13 +74,12 @@ The `latency_tracer` can be configured to show latencies only for elements or a GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency_tracer(flags=element+pipeline)" gst-launch-1.0 ... ``` - ## Interval Configuration The `latency_tracer` supports interval-based reporting that provides periodic statistics summaries. This feature allows to monitor latency trends over time by generating aggregate reports at specified intervals. -### Basic configuration +**Basic configuration:** The interval can be configured by `interval` parameter. Its default value is 1000ms (1 second). Example of configuring 2 seconds interval: diff --git a/docs/user-guide/dev_guide/optimizer.md b/docs/user-guide/dev_guide/optimizer.md index 926ac564..16362f4c 100644 --- a/docs/user-guide/dev_guide/optimizer.md +++ b/docs/user-guide/dev_guide/optimizer.md @@ -70,7 +70,9 @@ Available **log levels** are: CRITICAL, FATAL, ERROR, WARN, INFO, DEBUG. >**Note**\ >Search duration and sample duration both affect the amount of pipelines that will be explored during the search. \ >The total amount should be approximately `search_duration / sample_duration` pipelines. -### Example + +**Example:** + ``` python3 . fps -- urisourcebin buffer-size=4096 uri=https://videos.pexels.com/video-files/1192116/1192116-sd_640_360_30fps.mp4 ! decodebin ! gvadetect model=/home/optimizer/models/public/yolo11s/INT8/yolo11s.xml ! queue ! gvawatermark ! fakesink [__main__] [ INFO] - GStreamer initialized successfully @@ -179,7 +181,9 @@ optimizer.optimize_for_streams(pipeline) Runs a series of optimization steps on the pipeline searching for a better performing versions. --- -### Example + +**Example:** + ```python from optimizer import get_optimized_pipeline diff --git a/docs/user-guide/index.md b/docs/user-guide/index.md index 6969cb52..96cac9b2 100644 --- a/docs/user-guide/index.md +++ b/docs/user-guide/index.md @@ -35,7 +35,7 @@ identify patterns and gain insights across multiple domains, including: - warehouse and parking management - industrial inspections - safety and regulatory compliance -- security monitoring. +- security monitoring ![image](_images/overview_pipeline_example.png)