Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: pull latest changes from Zephyr #11961

Merged
merged 6 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/docbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- '**/sample.yaml'
- 'doc/**'
- 'include/**'
- 'scripts/requirements-doc.txt'
- 'doc/requirements.txt'
- 'scripts/tools-versions-*.yml'
- 'west.yml'
push:
Expand Down Expand Up @@ -48,11 +48,11 @@ jobs:
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH

- name: Install base dependencies
- name: Install Python dependencies
working-directory: ncs
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -r nrf/scripts/requirements-base.txt
pip3 install -r nrf/doc/requirements.txt

- name: West init and update
working-directory: ncs
Expand All @@ -61,15 +61,10 @@ jobs:
west update
west zephyr-export

- name: Install documentation dependencies
working-directory: ncs
run: |
pip3 install -r zephyr/scripts/requirements-doc.txt -r nrf/scripts/requirements-doc.txt

- name: Build documentation
working-directory: ncs/nrf
run: |
cmake -GNinja -Bdoc/_build -Sdoc -DSPHINXOPTS_EXTRA="-W"
cmake -GNinja -Bdoc/_build -Sdoc
ninja -C doc/_build

- name: Prepare archive
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Kconfig* @tejlmand
/doc/versions.json @carlescufi
/doc/custom.properties @gmarull
/doc/tags.yml @gmarull
/doc/requirements.txt @gmarull
# All subfolders
/drivers/ @anangl
/drivers/serial/ @nordic-krch @anangl
Expand Down
25 changes: 14 additions & 11 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} COMPONENTS doc)
#-------------------------------------------------------------------------------
# Options

set(SPHINXOPTS_DEFAULT "-j auto" CACHE STRING "Default Sphinx Options")
set(SPHINXOPTS "-j auto -W --keep-going -T" CACHE STRING "Default Sphinx Options")
set(SPHINXOPTS_EXTRA "" CACHE STRING "Extra Sphinx Options")

separate_arguments(SPHINXOPTS_DEFAULT)
separate_arguments(SPHINXOPTS)
separate_arguments(SPHINXOPTS_EXTRA)

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -54,9 +54,9 @@ file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR})
#
# Args:
# - name: Docset name.
# - DODGY: Enable/disable "dodgy" mode. If enabled, the ${SPHINXOPTS_EXTRA}
# option (used to enable things like -W) will not be passed to Sphinx. It can
# be useful for external docsets that are likely to generate build warnings.
# - DODGY: Enable/disable "dodgy" mode. If enabled "-W" (warnings as errors)
# option will be disabled. It can be useful for external docsets that are
# likely to generate build warnings.
#
# This function configures multiple targets which can be used to build a docset.
# The docset configuration (conf.py) is expected to be at the ${name} folder
Expand Down Expand Up @@ -85,8 +85,8 @@ function(add_docset name)
set(DOCSET_CLEAN_DIRS ${DOCSET_BUILD_DIR};${DOCSET_HTML_DIR})
set(DOCSET_ENV DOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE})

if(NOT ${DOCSET_DODGY})
set(EXTRA_ARGS ${SPHINXOPTS_EXTRA})
if(${DOCSET_DODGY})
list(REMOVE_ITEM SPHINXOPTS "-W" "--keep-going")
endif()

add_doc_target(
Expand All @@ -98,7 +98,8 @@ function(add_docset name)
-c ${DOCSET_CFG_DIR}
-d ${DOCSET_DOCTREE_DIR}
-w ${DOCSET_BUILD_DIR}/inventory.log
${SPHINXOPTS_DEFAULT}
${SPHINXOPTS}
${SPHINXOPTS_EXTRA}
${DOCSET_SRC_DIR}
${DOCSET_HTML_DIR}
USES_TERMINAL
Expand All @@ -114,7 +115,8 @@ function(add_docset name)
-c ${DOCSET_CFG_DIR}
-d ${DOCSET_DOCTREE_DIR}
-w ${DOCSET_BUILD_DIR}/html.log
${SPHINXOPTS_DEFAULT}
${SPHINXOPTS}
${SPHINXOPTS_EXTRA}
${EXTRA_ARGS}
${DOCSET_SRC_DIR}
${DOCSET_HTML_DIR}
Expand All @@ -131,7 +133,8 @@ function(add_docset name)
-c ${DOCSET_CFG_DIR}
-d ${DOCSET_DOCTREE_DIR}
-w ${DOCSET_BUILD_DIR}/linkcheck.log
${SPHINXOPTS_DEFAULT}
${SPHINXOPTS}
${SPHINXOPTS_EXTRA}
${EXTRA_ARGS}
${DOCSET_SRC_DIR}
${DOCSET_BUILD_DIR}
Expand Down Expand Up @@ -235,7 +238,7 @@ add_docset(matter DODGY)
#-------------------------------------------------------------------------------
# docset: nrfxlib

add_docset(nrfxlib)
add_docset(nrfxlib DODGY)

#-------------------------------------------------------------------------------
# docset: kconfig
Expand Down
2 changes: 1 addition & 1 deletion doc/_extensions/ncs_tool_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def parse_pip_requirements(lines: List[str]) -> Dict[str, str]:
continue

# Conditionals (;) are ignored.
tool, version = re.match(r"([^~><=!;]*)([^;]*)", line).groups()
tool, version = re.match(r"([^~><=!;#\s]*)([^;#]*)", line).groups()
tool = tool.upper().replace("-", "_")
version = remove_prefix(version.strip(), "==")
versions[f"{tool}_VERSION"] = version
Expand Down
4 changes: 1 addition & 3 deletions doc/nrf/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,8 @@
]
ncs_tool_versions_python_deps = [
ZEPHYR_BASE / "scripts" / "requirements-base.txt",
ZEPHYR_BASE / "scripts" / "requirements-doc.txt",
MCUBOOT_BASE / "scripts" / "requirements.txt",
NRF_BASE / "scripts" / "requirements-base.txt",
NRF_BASE / "scripts" / "requirements-doc.txt",
NRF_BASE / "doc" / "requirements.txt",
NRF_BASE / "scripts" / "requirements-build.txt",
]

Expand Down
33 changes: 27 additions & 6 deletions doc/nrf/installation/recommended_versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,22 +235,43 @@ Building and running applications, samples, and tests
Building documentation
----------------------

Python documentation dependencies are listed in the following table. They can
all be installed using the ``doc/requirements.txt`` file using ``pip``.

.. list-table::
:header-rows: 1

* - Package
- Version
* - recommonmark
- :ncs-tool-version:`RECOMMONMARK_VERSION`
* - sphinxcontrib-mscgen
- :ncs-tool-version:`SPHINXCONTRIB_MSCGEN_VERSION`
* - azure-storage-blob
- :ncs-tool-version:`AZURE_STORAGE_BLOB_VERSION`
* - breathe
- :ncs-tool-version:`BREATHE_VERSION`
* - m2r2
- :ncs-tool-version:`M2R2_VERSION`
* - PyYAML
- :ncs-tool-version:`PYYAML_VERSION`
* - pykwalify
- :ncs-tool-version:`PYKWALIFY_VERSION`
* - recommonmark
- :ncs-tool-version:`RECOMMONMARK_VERSION`
* - sphinx
- :ncs-tool-version:`SPHINX_VERSION`
* - sphinx-copybutton
- :ncs-tool-version:`SPHINX_COPYBUTTON_VERSION`
* - sphinx-ncs-theme
- :ncs-tool-version:`SPHINX_NCS_THEME_VERSION`
* - sphinx-notfound-page
- :ncs-tool-version:`SPHINX_NOTFOUND_PAGE_VERSION`
* - sphinx-tabs
- :ncs-tool-version:`SPHINX_TABS_VERSION`
* - sphinxcontrib-svg2pdfconverter
- :ncs-tool-version:`SPHINXCONTRIB_SVG2PDFCONVERTER_VERSION`
* - sphinx-togglebutton
- :ncs-tool-version:`SPHINX_TOGGLEBUTTON_VERSION`
* - sphinx_markdown_tables
- :ncs-tool-version:`SPHINX_MARKDOWN_TABLES_VERSION`
* - sphinxcontrib-mscgen
- :ncs-tool-version:`SPHINXCONTRIB_MSCGEN_VERSION`
* - sphinxcontrib-plantuml
- :ncs-tool-version:`SPHINXCONTRIB_PLANTUML_VERSION`
* - west
- :ncs-tool-version:`WEST_VERSION`
24 changes: 24 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file lists all the dependencies required to build the documentation.
# To update this file, follow these basic rules:
# - Keep it sorted alphabetically
# - Mark which docsets are using each dependency
# - Only specify version information if strictly required
# - Keep nrf/installation/recommended_versions.rst up to date

# Extension | NCS | Kconfig | Matter | MCUboot | nrfx | nrfxlib | TF-M | Zephyr |
azure-storage-blob # | X | | | | | | | |
breathe # | X | | | | | X | | X |
m2r2 # | | | | | X | | | |
PyYAML # | X | | | | | | | X |
pykwalify # | | | | | | | | X |
recommonmark # | | | X | X | | | | |
sphinx~=6.2 # | X | X | X | X | X | X | X | X |
sphinx-copybutton # | X | | | | | | | X |
sphinx-ncs-theme<1.1 # | X | | | | | | | |
sphinx-notfound-page # | X | | | | | | | X |
sphinx-tabs>=3.4 # | X | | | | | | | X |
sphinx-togglebutton # | X | | | | | | | |
sphinx_markdown_tables # | | | X | | | | | |
sphinxcontrib-mscgen # | X | | | | | X | | |
sphinxcontrib-plantuml # | | | | | | | X | |
west>=1.0.0 # | | | | | | | | X |
12 changes: 0 additions & 12 deletions scripts/requirements-doc.txt

This file was deleted.

1 change: 0 additions & 1 deletion scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-r requirements-base.txt
-r requirements-build.txt
-r requirements-doc.txt
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ manifest:
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
- name: zephyr
repo-path: sdk-zephyr
revision: c9d01d05ce83a8cec0fd60bf8e2ba27c1534d08f
revision: 80493dd34fc629cd50462f84ea6bd090a3d17325
import:
# In addition to the zephyr repository itself, NCS also
# imports the contents of zephyr/west.yml at the above
Expand Down
Loading