diff --git a/README.rst b/README.rst index d773957be..222fa48b0 100644 --- a/README.rst +++ b/README.rst @@ -419,17 +419,17 @@ NI-TClk Python API Status Installation ============ -Driver specific installation instructions can be found on Read The Docs: +Driver specific installation instructions can be found on **Read the Docs**: -* `nidcpower `_ -* `nidigital `_ -* `nidmm `_ -* `nifgen `_ -* `nimodinst `_ -* `niscope `_ -* `nise `_ -* `niswitch `_ -* `nitclk `_ +* `nidcpower `_ +* `nidigital `_ +* `nidmm `_ +* `nifgen `_ +* `nimodinst `_ +* `niscope `_ +* `nise `_ +* `niswitch `_ +* `nitclk `_ Contributing @@ -456,22 +456,20 @@ The following is a basic example of using the **nidmm** module to open a session Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/VERSION b/VERSION deleted file mode 100644 index d52d73c32..000000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.4.5.dev0 \ No newline at end of file diff --git a/build/Makefile b/build/Makefile index e414d4001..7306b2bb7 100644 --- a/build/Makefile +++ b/build/Makefile @@ -23,8 +23,6 @@ endif ifeq (,$(MAKECMDGOALS)) ROOT_FILES := \ $(ROOT_DIR)/README.rst \ - $(ROOT_DIR)/VERSION \ - $(DOCS_DIR)/conf.py \ endif @@ -79,9 +77,9 @@ clean: start -$(_hide_cmds)find $(ROOT_DIR)/build -name __pycache__ -exec rmdir {} \; $(SUPPRESS_ERROR_OUTPUT) ||: -$(_hide_cmds)find $(ROOT_DIR)/build -name '*.pyc' -exec rm {} \; $(SUPPRESS_ERROR_OUTPUT) ||: -$(_hide_cmds)rm $(foreach d,$(DRIVERS), $(ROOT_DIR)/docs/$(d)/*) $(SUPPRESS_ERROR_OUTPUT) ||: + -$(_hide_cmds)rm $(foreach d,$(DRIVERS), $(ROOT_DIR)/docs/$(d)/.readthedocs.yaml) $(SUPPRESS_ERROR_OUTPUT) ||: -$(_hide_cmds)rm -Rf $(ROOT_DIR)/.coverage $(SUPPRESS_ERROR_OUTPUT) ||: -$(_hide_cmds)rm -Rf $(ROOT_DIR)/README.rst $(SUPPRESS_ERROR_OUTPUT) ||: - -$(_hide_cmds)rm -Rf $(ROOT_DIR)/docs/conf.py $(SUPPRESS_ERROR_OUTPUT) ||: -$(_hide_cmds)mkdir $(GENERATED_DIR) $(SUPPRESS_ERROR_OUTPUT) ||: start: @@ -147,16 +145,15 @@ endef $(ROOT_DIR)/README.rst: $(GLOBAL_FILES_STARTED_FILE) $(call trace_to_console, "Creating Root",$(notdir $@)) - $(_hide_cmds)$(call global_log_command,cat $(STATIC_DOCS_DIR)/status_project.inc $(STATIC_DOCS_DIR)/about.inc $(DOCS_DIR)/*/status.inc $(STATIC_DOCS_DIR)/installation.inc $(STATIC_DOCS_DIR)/contributing.inc $(STATIC_DOCS_DIR)/nidmm_usage.inc $(STATIC_DOCS_DIR)/support.inc $(STATIC_DOCS_DIR)/documentation.inc $(STATIC_DOCS_DIR)/license.inc > $@) - -$(ROOT_DIR)/VERSION: $(GLOBAL_FILES_STARTED_FILE) - $(call trace_to_console, "Creating Root",$(notdir $@)) tools/update_version_file.py - $(_hide_cmds)$(call global_log_command,$(PYTHON_CMD) tools/update_version_file.py --output-file $@ $(foreach d,$(DRIVERS),--input-file $(GENERATED_DIR)/$(d)/$(d)/VERSION )) - -$(DOCS_DIR)/conf.py: build/templates/conf.py.mako $(ROOT_DIR)/VERSION tools/simple_mako.py $(GLOBAL_FILES_STARTED_FILE) - $(call trace_to_console, "Creating Root",$(notdir $@)) - $(_hide_cmds)$(call global_log_command,$(PYTHON_CMD) tools/simple_mako.py --output-file $@ --template $<) - + $(_hide_cmds)$(call global_log_command,cat $(STATIC_DOCS_DIR)/status_project.inc \ + $(STATIC_DOCS_DIR)/about.inc \ + $(DOCS_DIR)/*/status.inc \ + $(STATIC_DOCS_DIR)/installation.inc \ + $(STATIC_DOCS_DIR)/contributing.inc \ + $(STATIC_DOCS_DIR)/nidmm_usage.inc \ + $(STATIC_DOCS_DIR)/support.inc \ + $(STATIC_DOCS_DIR)/documentation.inc \ + $(STATIC_DOCS_DIR)/license.inc > $@) # Any step that any driver build does that would invalidate unit testing, flake8 or generated html # needs to delete this file. This will trigger a tox run. diff --git a/build/defines.mak b/build/defines.mak index 560dd7d25..e261c36ee 100644 --- a/build/defines.mak +++ b/build/defines.mak @@ -32,7 +32,7 @@ GRPC_SUPPORTED := $(if $(wildcard $(PROTO_FILE)),$(true)) PYTHON_CMD ?= python GRPC_SUPPORT_PARAM := $(if $(GRPC_SUPPORTED),--include-grpc-support) define GENERATE_SCRIPT -$(PYTHON_CMD) -m build --template $1 --dest-dir $2 --metadata $3 $(if $(PRINT),-v,) $(GRPC_SUPPORT_PARAM) +$(PYTHON_CMD) -m build --template $1 --dest-dir $2 --metadata $3 $(if $4,--dest-file $4) $(if $(PRINT),-v,) $(GRPC_SUPPORT_PARAM) endef ifeq (,$(PRINT)) @@ -75,6 +75,8 @@ DEFAULT_PY_FILES_TO_COPY := \ _visatype.py \ DEFAULT_RST_FILES_TO_GENERATE := \ + index.rst \ + $(DRIVER).rst \ enums.rst \ examples.rst \ installation.inc \ @@ -87,6 +89,8 @@ DEFAULT_RST_FILES_TO_GENERATE := \ grpc_session_options.rst \ ) \ +DEFAULT_SPHINX_CONF_PY := $(DRIVER_DOCS_DIR)/conf.py +DEFAULT_READTHEDOCS_CONFIG := $(DRIVER_DOCS_DIR)/.readthedocs.yaml # Files for tracking parts of the build SDIST_WHEEL_BUILD_DONE := $(LOG_DIR)/sdist_wheel_build_done diff --git a/build/rules.mak b/build/rules.mak index 8dc7e8616..25c078d79 100644 --- a/build/rules.mak +++ b/build/rules.mak @@ -30,8 +30,6 @@ endif # ifneq (,$(EXAMPLE_FILES)) MKDIR: $(MKDIRECTORIES) -CURRENT_DIR := $(shell pwd) - define mkdir_rule $1: $(call trace_to_console, "Making dir",$1) @@ -82,10 +80,22 @@ $(DRIVER_DOCS_DIR)/%.rst: %.rst.mako $(BUILD_HELPER_SCRIPTS) $(METADATA_FILES) $(call trace_to_console, "Generating",$@) $(_hide_cmds)$(call log_command,$(call GENERATE_SCRIPT, $<, $(dir $@), $(METADATA_DIR))) +$(DRIVER_DOCS_DIR)/$(DRIVER).rst: driver.rst.mako $(BUILD_HELPER_SCRIPTS) $(METADATA_FILES) + $(call trace_to_console, "Generating",$@) + $(_hide_cmds)$(call log_command,$(call GENERATE_SCRIPT, $<, $(dir $@), $(METADATA_DIR), $(notdir $@))) + $(DRIVER_DOCS_DIR)/%.inc: %.inc.mako $(BUILD_HELPER_SCRIPTS) $(METADATA_FILES) $(call trace_to_console, "Generating",$@) $(_hide_cmds)$(call log_command,$(call GENERATE_SCRIPT, $<, $(dir $@), $(METADATA_DIR))) +$(SPHINX_CONF_PY): $(TEMPLATE_DIR)/conf.py.mako $(BUILD_HELPER_SCRIPTS) $(METADATA_FILES) + $(call trace_to_console, "Generating",$@) + $(_hide_cmds)$(call log_command,$(call GENERATE_SCRIPT, $<, $(dir $@), $(METADATA_DIR))) + +$(READTHEDOCS_CONFIG): $(TEMPLATE_DIR)/.readthedocs.yaml.mako $(BUILD_HELPER_SCRIPTS) $(METADATA_FILES) + $(call trace_to_console, "Generating",$@) + $(_hide_cmds)$(call log_command,$(call GENERATE_SCRIPT, $<, $(dir $@), $(METADATA_DIR))) + $(DRIVER_EXAMPLES_ZIP_FILE): $(EXAMPLE_FILES) $(call trace_to_console, "Zipping",$@) $(_hide_cmds)$(call log_command,cd src/$(DRIVER)/examples && zip -u -r -9 $@ * || ([ $$? -eq 12 ] && exit 0) || exit) @@ -101,7 +111,7 @@ clean: .PHONY: module doc_files sdist wheel installers module: $(MODULE_FILES) $(UNIT_TEST_FILES) -doc_files: $(RST_FILES) +doc_files: $(RST_FILES) $(SPHINX_CONF_PY) $(READTHEDOCS_CONFIG) installers: sdist wheel $(UNIT_TEST_FILES): $(MODULE_FILES) @@ -131,7 +141,15 @@ else # We piece together the readme files instead of relying on the rst include directive because we need these files to be standalone and not require any additional files that are in specific locations. $(README): $(RST_FILES) $(wildcard $(STATIC_DOCS_DIR)/*) $(call trace_to_console, "Creating",$@) - $(_hide_cmds)$(call log_command,cat $(STATIC_DOCS_DIR)/status_project.inc $(STATIC_DOCS_DIR)/about.inc $(DRIVER_DOCS_DIR)/status.inc $(DRIVER_DOCS_DIR)/installation.inc $(STATIC_DOCS_DIR)/contributing.inc $(STATIC_DOCS_DIR)/$(DRIVER)_usage.inc $(STATIC_DOCS_DIR)/support.inc $(STATIC_DOCS_DIR)/documentation.inc $(STATIC_DOCS_DIR)/license.inc > $@) + $(_hide_cmds)$(call log_command,cat $(STATIC_DOCS_DIR)/status_project.inc \ + $(STATIC_DOCS_DIR)/about.inc \ + $(DRIVER_DOCS_DIR)/status.inc \ + $(DRIVER_DOCS_DIR)/installation.inc \ + $(STATIC_DOCS_DIR)/contributing.inc \ + $(STATIC_DOCS_DIR)/$(DRIVER)_usage.inc \ + $(STATIC_DOCS_DIR)/support.inc \ + $(STATIC_DOCS_DIR)/documentation.inc \ + $(STATIC_DOCS_DIR)/license.inc > $@) endif diff --git a/build/templates/.readthedocs.yaml.mako b/build/templates/.readthedocs.yaml.mako new file mode 100644 index 000000000..3995569c8 --- /dev/null +++ b/build/templates/.readthedocs.yaml.mako @@ -0,0 +1,60 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details +<% + config = template_parameters['metadata'].config + module_name = config['module_name'] + # All of the files used to configure and build docs and readthedocs are in these 2 folders + build_trigger_paths = f'docs/_static/ docs/{module_name}/' + conf_py_path = f'docs/{module_name}/conf.py' +%>\ + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: ${build_trigger_paths}. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- ${build_trigger_paths}; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: ${conf_py_path} + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +## TODO(ni-jfitzger): Create requirements file for docs to make builds reproducible. See https://github.com/ni/nimi-python/issues/1968 +## Note: Our nimi-python readthedocs project used the defaults here: https://docs.readthedocs.io/en/stable/build-default-versions.html#external-dependencies +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/build/templates/conf.py.mako b/build/templates/conf.py.mako index fa5ee982e..28363120e 100644 --- a/build/templates/conf.py.mako +++ b/build/templates/conf.py.mako @@ -2,14 +2,18 @@ import datetime current_year = datetime.datetime.today().year -with open('./VERSION') as vf: - global_version = vf.read().strip() +config = template_parameters['metadata'].config +copyright_start_year = config['initial_release_year'] +version = config['module_version'] +api_name = f"{config['driver_name']} Python API" +api_name_no_spaces_or_hyphens = api_name.replace(" ", "").replace("-", "") +api_name_no_spaces_or_hyphens_lower = api_name_no_spaces_or_hyphens.lower() %>\ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# NI Modular Instruments Python API documentation build configuration file, created by +# ${api_name} documentation build configuration file, created by # sphinx-quickstart on Fri Jul 14 13:04:36 2017. # # This file is execfile()d with the current directory set to its @@ -62,8 +66,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = 'NI Modular Instruments Python API' -copyright = '2017-${current_year}, National Instruments Corporation' +project = '${api_name}' +copyright = '${copyright_start_year}-${current_year}, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for @@ -71,7 +75,7 @@ author = 'NI' # built documents. # # The full version, including alpha/beta/rc tags. -release = '${global_version}' +release = '${version}' # The short X.Y version. version = release[:3] @@ -112,7 +116,7 @@ html_theme_options = { # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ['../_static'] # Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 def setup(app): @@ -164,7 +168,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'NIModularInstrumentsPythonAPI.tex', 'NI Modular Instruments Python API Documentation', + (master_doc, '${api_name_no_spaces_or_hyphens}.tex', '${api_name} Documentation', 'NI', 'manual'), ] @@ -174,7 +178,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'nimodularinstrumentspythonapi', 'NI Modular Instruments Python API Documentation', + (master_doc, '${api_name_no_spaces_or_hyphens_lower}', '${api_name} Documentation', [author], 1) ] @@ -185,11 +189,12 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'NIModularInstrumentsPythonAPI', 'NI Modular Instruments Python API Documentation', - author, 'NIModularInstrumentsPythonAPI', 'One line description of project.', + (master_doc, '${api_name_no_spaces_or_hyphens}', '${api_name} Documentation', + author, '${api_name_no_spaces_or_hyphens}', 'One line description of project.', 'Miscellaneous'), ] # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} - +## TODO(ni-jfitzger): Add mappings for nimi-python APIs that reference other nimi-python APIs. +## We can probably just list all of the mappings (other than maybe the current module, I think) +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/build/templates/driver.rst.mako b/build/templates/driver.rst.mako new file mode 100644 index 000000000..b58c5b0c9 --- /dev/null +++ b/build/templates/driver.rst.mako @@ -0,0 +1,16 @@ +<% + '''This is a template for the module-specific .rst''' + + config = template_parameters['metadata'].config + module_name = config['module_name'] + doc_header = f"{module_name} module" +%>\ +${doc_header} +${"=" * len(doc_header)} + +.. include:: installation.inc + +.. include:: ../_static/${module_name}_usage.inc + +.. include:: toc.inc + diff --git a/build/templates/examples.rst.mako b/build/templates/examples.rst.mako index 52bafc2e2..cbc814842 100644 --- a/build/templates/examples.rst.mako +++ b/build/templates/examples.rst.mako @@ -25,7 +25,7 @@ # - (1) will link to the zip file for the current release # - (2) will include current code snippet and URL will point to release version - with open('./LATEST_RELEASE') as vf: + with open(f'./src/{module_name}/LATEST_RELEASE') as vf: latest_release_version = vf.read().strip() released_zip_url = 'https://github.com/ni/nimi-python/releases/download/{0}/{1}_examples.zip'.format(latest_release_version, module_name) diff --git a/build/templates/index.rst.mako b/build/templates/index.rst.mako new file mode 100644 index 000000000..3ef5816b5 --- /dev/null +++ b/build/templates/index.rst.mako @@ -0,0 +1,37 @@ +<% + config = template_parameters['metadata'].config + doc_header = f"{config['driver_name']} Python API Documentation" + module_name = config['module_name'] + driver_name = config['driver_name'] +%>\ + +${doc_header} +${"=" * len(doc_header)} + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + ${module_name} + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/build/templates/toc.inc.mako b/build/templates/toc.inc.mako index 178801214..05476c727 100644 --- a/build/templates/toc.inc.mako +++ b/build/templates/toc.inc.mako @@ -11,16 +11,16 @@ API Reference .. toctree:: - ${module_name}/class + class % if len(config['repeated_capabilities']) > 0: - ${module_name}/rep_caps + rep_caps % endif % if len(enums) > 0: - ${module_name}/enums + enums % endif - ${module_name}/errors - ${module_name}/examples + errors + examples % if grpc_supported: - ${module_name}/grpc_session_options + grpc_session_options % endif diff --git a/build/tools.mak b/build/tools.mak index a4afeecf1..8471717a4 100644 --- a/build/tools.mak +++ b/build/tools.mak @@ -1,5 +1,7 @@ # Useful functions +CURRENT_DIR := $(shell pwd) + # Traces to console, nicely formatted. # $1 is the Action, for example: "Generating" # $2 is a Path. diff --git a/docs/_static/about_driver.inc b/docs/_static/about_driver.inc new file mode 100644 index 000000000..60c78bbb5 --- /dev/null +++ b/docs/_static/about_driver.inc @@ -0,0 +1,14 @@ +.. _about-section: + +About +===== + +This package, which is maintained in the `**nimi-python** repository `_, provides a Python API for the associated driver. + +Support Policy +-------------- +This package supports all the Operating Systems supported by the underlying driver. + +It follows `Python Software Foundation `_ support policy for different versions. At +this time this includes Python 3.7 and above using CPython. + diff --git a/docs/_static/installation.inc b/docs/_static/installation.inc index 56ebf79e8..a7935e37a 100644 --- a/docs/_static/installation.inc +++ b/docs/_static/installation.inc @@ -3,16 +3,16 @@ Installation ============ -Driver specific installation instructions can be found on Read The Docs: +Driver specific installation instructions can be found on **Read the Docs**: -* `nidcpower `_ -* `nidigital `_ -* `nidmm `_ -* `nifgen `_ -* `nimodinst `_ -* `niscope `_ -* `nise `_ -* `niswitch `_ -* `nitclk `_ +* `nidcpower `_ +* `nidigital `_ +* `nidmm `_ +* `nifgen `_ +* `nimodinst `_ +* `niscope `_ +* `nise `_ +* `niswitch `_ +* `nitclk `_ diff --git a/docs/_static/support.inc b/docs/_static/support.inc index 4f910461d..62dc012a2 100644 --- a/docs/_static/support.inc +++ b/docs/_static/support.inc @@ -3,20 +3,18 @@ Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - diff --git a/docs/conf.py b/docs/conf.py index 59f48b4a2..42de409c3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -184,4 +184,3 @@ def setup(app): # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} - diff --git a/docs/index.rst b/docs/index.rst index 1f8083465..611c7007e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,44 +3,31 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -NI Modular Instruments Python Documentation +NI Modular Instruments Python Documentation Redirect ============================================================ -.. include:: _static/about.inc - -.. include:: _static/installation.inc - -.. include:: _static/contributing.inc - -.. include:: _static/support.inc - -.. include:: _static/documentation.inc - -Additional Documentation ------------------------- - -Refer to your driver documentation for device-specific information and detailed API documentation. - - -.. include:: _static/license.inc - -.. toctree:: - :maxdepth: 3 - :caption: Drivers - - nidcpower - nidigital - nidmm - nifgen - niscope - niswitch - nise - nimodinst - nitclk - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +Documentation for versions 1.4.4 and earlier of the following modules can be found here: + +* nidcpower +* nidigital +* nidmm +* nifgen +* nimodinst +* niscope +* niswitch +* nise +* nitclk + +Simply select the version you wish to view documentation for. + +For newer documentation, refer to the individual **Read the Docs** projects. + +* `nidcpower `_ +* `nidigital `_ +* `nidmm `_ +* `nifgen `_ +* `nimodinst `_ +* `niscope `_ +* `nise `_ +* `niswitch `_ +* `nitclk `_ diff --git a/docs/nidcpower.rst b/docs/nidcpower.rst deleted file mode 100644 index 77706065d..000000000 --- a/docs/nidcpower.rst +++ /dev/null @@ -1,9 +0,0 @@ -nidcpower module -============================================================= - -.. include:: nidcpower/installation.inc - -.. include:: _static/nidcpower_usage.inc - -.. include:: nidcpower/toc.inc - diff --git a/docs/nidcpower/.readthedocs.yaml b/docs/nidcpower/.readthedocs.yaml new file mode 100644 index 000000000..6ddf4326c --- /dev/null +++ b/docs/nidcpower/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nidcpower/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nidcpower/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/nidcpower/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/nidcpower/conf.py b/docs/nidcpower/conf.py new file mode 100644 index 000000000..21572832e --- /dev/null +++ b/docs/nidcpower/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-DCPower Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-DCPower Python API' +copyright = '2017-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NIDCPowerPythonAPI.tex', 'NI-DCPower Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'nidcpowerpythonapi', 'NI-DCPower Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NIDCPowerPythonAPI', 'NI-DCPower Python API Documentation', + author, 'NIDCPowerPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/nidcpower/index.rst b/docs/nidcpower/index.rst new file mode 100644 index 000000000..5c72b0f39 --- /dev/null +++ b/docs/nidcpower/index.rst @@ -0,0 +1,31 @@ + +NI-DCPower Python API Documentation +=================================== + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + nidcpower + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/nidcpower/nidcpower.rst b/docs/nidcpower/nidcpower.rst new file mode 100644 index 000000000..b8438db6a --- /dev/null +++ b/docs/nidcpower/nidcpower.rst @@ -0,0 +1,9 @@ +nidcpower module +================ + +.. include:: installation.inc + +.. include:: ../_static/nidcpower_usage.inc + +.. include:: toc.inc + diff --git a/docs/nidcpower/toc.inc b/docs/nidcpower/toc.inc index 076a1fad2..300092a6c 100644 --- a/docs/nidcpower/toc.inc +++ b/docs/nidcpower/toc.inc @@ -3,10 +3,10 @@ API Reference .. toctree:: - nidcpower/class - nidcpower/rep_caps - nidcpower/enums - nidcpower/errors - nidcpower/examples - nidcpower/grpc_session_options + class + rep_caps + enums + errors + examples + grpc_session_options diff --git a/docs/nidigital.rst b/docs/nidigital.rst deleted file mode 100644 index 7e1cfe799..000000000 --- a/docs/nidigital.rst +++ /dev/null @@ -1,9 +0,0 @@ -nidigital module -============================================================= - -.. include:: nidigital/installation.inc - -.. include:: _static/nidigital_usage.inc - -.. include:: nidigital/toc.inc - diff --git a/docs/nidigital/.readthedocs.yaml b/docs/nidigital/.readthedocs.yaml new file mode 100644 index 000000000..78d424af5 --- /dev/null +++ b/docs/nidigital/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nidigital/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nidigital/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/nidigital/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/nidigital/conf.py b/docs/nidigital/conf.py new file mode 100644 index 000000000..fd39b29a0 --- /dev/null +++ b/docs/nidigital/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-Digital Pattern Driver Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-Digital Pattern Driver Python API' +copyright = '2019-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NIDigitalPatternDriverPythonAPI.tex', 'NI-Digital Pattern Driver Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'nidigitalpatterndriverpythonapi', 'NI-Digital Pattern Driver Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NIDigitalPatternDriverPythonAPI', 'NI-Digital Pattern Driver Python API Documentation', + author, 'NIDigitalPatternDriverPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/nidigital/index.rst b/docs/nidigital/index.rst new file mode 100644 index 000000000..75bcf6311 --- /dev/null +++ b/docs/nidigital/index.rst @@ -0,0 +1,31 @@ + +NI-Digital Pattern Driver Python API Documentation +================================================== + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + nidigital + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/nidigital/nidigital.rst b/docs/nidigital/nidigital.rst new file mode 100644 index 000000000..24055e832 --- /dev/null +++ b/docs/nidigital/nidigital.rst @@ -0,0 +1,9 @@ +nidigital module +================ + +.. include:: installation.inc + +.. include:: ../_static/nidigital_usage.inc + +.. include:: toc.inc + diff --git a/docs/nidigital/toc.inc b/docs/nidigital/toc.inc index 0a79ecec4..300092a6c 100644 --- a/docs/nidigital/toc.inc +++ b/docs/nidigital/toc.inc @@ -3,10 +3,10 @@ API Reference .. toctree:: - nidigital/class - nidigital/rep_caps - nidigital/enums - nidigital/errors - nidigital/examples - nidigital/grpc_session_options + class + rep_caps + enums + errors + examples + grpc_session_options diff --git a/docs/nidmm.rst b/docs/nidmm.rst deleted file mode 100644 index fd002def0..000000000 --- a/docs/nidmm.rst +++ /dev/null @@ -1,10 +0,0 @@ -nidmm module -============================================================= - -.. include:: nidmm/installation.inc - -.. include:: _static/nidmm_usage.inc - -.. include:: nidmm/toc.inc - - diff --git a/docs/nidmm/.readthedocs.yaml b/docs/nidmm/.readthedocs.yaml new file mode 100644 index 000000000..b9cb50d33 --- /dev/null +++ b/docs/nidmm/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nidmm/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nidmm/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/nidmm/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/nidmm/conf.py b/docs/nidmm/conf.py new file mode 100644 index 000000000..b0c95a809 --- /dev/null +++ b/docs/nidmm/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-DMM Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-DMM Python API' +copyright = '2017-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NIDMMPythonAPI.tex', 'NI-DMM Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'nidmmpythonapi', 'NI-DMM Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NIDMMPythonAPI', 'NI-DMM Python API Documentation', + author, 'NIDMMPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/nidmm/index.rst b/docs/nidmm/index.rst new file mode 100644 index 000000000..01f44e9dd --- /dev/null +++ b/docs/nidmm/index.rst @@ -0,0 +1,31 @@ + +NI-DMM Python API Documentation +=============================== + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + nidmm + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/nidmm/nidmm.rst b/docs/nidmm/nidmm.rst new file mode 100644 index 000000000..671834d1c --- /dev/null +++ b/docs/nidmm/nidmm.rst @@ -0,0 +1,9 @@ +nidmm module +============ + +.. include:: installation.inc + +.. include:: ../_static/nidmm_usage.inc + +.. include:: toc.inc + diff --git a/docs/nidmm/toc.inc b/docs/nidmm/toc.inc index 4d799cd19..df0595901 100644 --- a/docs/nidmm/toc.inc +++ b/docs/nidmm/toc.inc @@ -3,9 +3,9 @@ API Reference .. toctree:: - nidmm/class - nidmm/enums - nidmm/errors - nidmm/examples - nidmm/grpc_session_options + class + enums + errors + examples + grpc_session_options diff --git a/docs/nifgen.rst b/docs/nifgen.rst deleted file mode 100644 index 639fa8ae7..000000000 --- a/docs/nifgen.rst +++ /dev/null @@ -1,9 +0,0 @@ -nifgen module -============================================================= - -.. include:: nifgen/installation.inc - -.. include:: _static/nifgen_usage.inc - -.. include:: nifgen/toc.inc - diff --git a/docs/nifgen/.readthedocs.yaml b/docs/nifgen/.readthedocs.yaml new file mode 100644 index 000000000..18118ab79 --- /dev/null +++ b/docs/nifgen/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nifgen/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nifgen/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/nifgen/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/nifgen/conf.py b/docs/nifgen/conf.py new file mode 100644 index 000000000..329d2970d --- /dev/null +++ b/docs/nifgen/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-FGEN Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-FGEN Python API' +copyright = '2017-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NIFGENPythonAPI.tex', 'NI-FGEN Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'nifgenpythonapi', 'NI-FGEN Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NIFGENPythonAPI', 'NI-FGEN Python API Documentation', + author, 'NIFGENPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/nifgen/index.rst b/docs/nifgen/index.rst new file mode 100644 index 000000000..fd67e8429 --- /dev/null +++ b/docs/nifgen/index.rst @@ -0,0 +1,31 @@ + +NI-FGEN Python API Documentation +================================ + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + nifgen + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/nifgen/nifgen.rst b/docs/nifgen/nifgen.rst new file mode 100644 index 000000000..a0df8b7a9 --- /dev/null +++ b/docs/nifgen/nifgen.rst @@ -0,0 +1,9 @@ +nifgen module +============= + +.. include:: installation.inc + +.. include:: ../_static/nifgen_usage.inc + +.. include:: toc.inc + diff --git a/docs/nifgen/toc.inc b/docs/nifgen/toc.inc index 453c42dab..300092a6c 100644 --- a/docs/nifgen/toc.inc +++ b/docs/nifgen/toc.inc @@ -3,10 +3,10 @@ API Reference .. toctree:: - nifgen/class - nifgen/rep_caps - nifgen/enums - nifgen/errors - nifgen/examples - nifgen/grpc_session_options + class + rep_caps + enums + errors + examples + grpc_session_options diff --git a/docs/nimodinst.rst b/docs/nimodinst.rst deleted file mode 100644 index e36d9c609..000000000 --- a/docs/nimodinst.rst +++ /dev/null @@ -1,10 +0,0 @@ -nimodinst module -============================================================= - -.. include:: nimodinst/installation.inc - -.. include:: _static/nimodinst_usage.inc - -.. include:: nimodinst/toc.inc - - diff --git a/docs/nimodinst/.readthedocs.yaml b/docs/nimodinst/.readthedocs.yaml new file mode 100644 index 000000000..c3c16f748 --- /dev/null +++ b/docs/nimodinst/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nimodinst/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nimodinst/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/nimodinst/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/nimodinst/conf.py b/docs/nimodinst/conf.py new file mode 100644 index 000000000..8622df08f --- /dev/null +++ b/docs/nimodinst/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-ModInst Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-ModInst Python API' +copyright = '2017-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NIModInstPythonAPI.tex', 'NI-ModInst Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'nimodinstpythonapi', 'NI-ModInst Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NIModInstPythonAPI', 'NI-ModInst Python API Documentation', + author, 'NIModInstPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/nimodinst/index.rst b/docs/nimodinst/index.rst new file mode 100644 index 000000000..791b393f3 --- /dev/null +++ b/docs/nimodinst/index.rst @@ -0,0 +1,31 @@ + +NI-ModInst Python API Documentation +=================================== + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + nimodinst + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/nimodinst/nimodinst.rst b/docs/nimodinst/nimodinst.rst new file mode 100644 index 000000000..c2811b4f3 --- /dev/null +++ b/docs/nimodinst/nimodinst.rst @@ -0,0 +1,9 @@ +nimodinst module +================ + +.. include:: installation.inc + +.. include:: ../_static/nimodinst_usage.inc + +.. include:: toc.inc + diff --git a/docs/nimodinst/toc.inc b/docs/nimodinst/toc.inc index 516363e09..f4c0c7387 100644 --- a/docs/nimodinst/toc.inc +++ b/docs/nimodinst/toc.inc @@ -3,7 +3,7 @@ API Reference .. toctree:: - nimodinst/class - nimodinst/errors - nimodinst/examples + class + errors + examples diff --git a/docs/niscope.rst b/docs/niscope.rst deleted file mode 100644 index fa8a71fcf..000000000 --- a/docs/niscope.rst +++ /dev/null @@ -1,9 +0,0 @@ -niscope module -============================================================= - -.. include:: niscope/installation.inc - -.. include:: _static/niscope_usage.inc - -.. include:: niscope/toc.inc - diff --git a/docs/niscope/.readthedocs.yaml b/docs/niscope/.readthedocs.yaml new file mode 100644 index 000000000..58499e06f --- /dev/null +++ b/docs/niscope/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/niscope/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/niscope/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/niscope/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/niscope/conf.py b/docs/niscope/conf.py new file mode 100644 index 000000000..b263f26ee --- /dev/null +++ b/docs/niscope/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-SCOPE Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-SCOPE Python API' +copyright = '2017-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NISCOPEPythonAPI.tex', 'NI-SCOPE Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'niscopepythonapi', 'NI-SCOPE Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NISCOPEPythonAPI', 'NI-SCOPE Python API Documentation', + author, 'NISCOPEPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/niscope/index.rst b/docs/niscope/index.rst new file mode 100644 index 000000000..aec178f77 --- /dev/null +++ b/docs/niscope/index.rst @@ -0,0 +1,31 @@ + +NI-SCOPE Python API Documentation +================================= + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + niscope + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/niscope/niscope.rst b/docs/niscope/niscope.rst new file mode 100644 index 000000000..9d6ceba6b --- /dev/null +++ b/docs/niscope/niscope.rst @@ -0,0 +1,9 @@ +niscope module +============== + +.. include:: installation.inc + +.. include:: ../_static/niscope_usage.inc + +.. include:: toc.inc + diff --git a/docs/niscope/toc.inc b/docs/niscope/toc.inc index f5ee1fea4..300092a6c 100644 --- a/docs/niscope/toc.inc +++ b/docs/niscope/toc.inc @@ -3,10 +3,10 @@ API Reference .. toctree:: - niscope/class - niscope/rep_caps - niscope/enums - niscope/errors - niscope/examples - niscope/grpc_session_options + class + rep_caps + enums + errors + examples + grpc_session_options diff --git a/docs/nise.rst b/docs/nise.rst deleted file mode 100644 index 153a4e9fa..000000000 --- a/docs/nise.rst +++ /dev/null @@ -1,9 +0,0 @@ -nise module -============================================================= - -.. include:: nise/installation.inc - -.. include:: _static/nise_usage.inc - -.. include:: nise/toc.inc - diff --git a/docs/nise/.readthedocs.yaml b/docs/nise/.readthedocs.yaml new file mode 100644 index 000000000..722de9133 --- /dev/null +++ b/docs/nise/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nise/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nise/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/nise/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/nise/conf.py b/docs/nise/conf.py new file mode 100644 index 000000000..b9a2baafe --- /dev/null +++ b/docs/nise/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI Switch Executive Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI Switch Executive Python API' +copyright = '2018-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NISwitchExecutivePythonAPI.tex', 'NI Switch Executive Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'niswitchexecutivepythonapi', 'NI Switch Executive Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NISwitchExecutivePythonAPI', 'NI Switch Executive Python API Documentation', + author, 'NISwitchExecutivePythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/nise/index.rst b/docs/nise/index.rst new file mode 100644 index 000000000..3d27103ec --- /dev/null +++ b/docs/nise/index.rst @@ -0,0 +1,31 @@ + +NI Switch Executive Python API Documentation +============================================ + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + nise + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/nise/nise.rst b/docs/nise/nise.rst new file mode 100644 index 000000000..4db377e53 --- /dev/null +++ b/docs/nise/nise.rst @@ -0,0 +1,9 @@ +nise module +=========== + +.. include:: installation.inc + +.. include:: ../_static/nise_usage.inc + +.. include:: toc.inc + diff --git a/docs/nise/toc.inc b/docs/nise/toc.inc index 70f6c1da6..5f64afcd4 100644 --- a/docs/nise/toc.inc +++ b/docs/nise/toc.inc @@ -3,8 +3,8 @@ API Reference .. toctree:: - nise/class - nise/enums - nise/errors - nise/examples + class + enums + errors + examples diff --git a/docs/niswitch.rst b/docs/niswitch.rst deleted file mode 100644 index 7dedbcefe..000000000 --- a/docs/niswitch.rst +++ /dev/null @@ -1,10 +0,0 @@ -niswitch module -============================================================= - -.. include:: niswitch/installation.inc - -.. include:: _static/niswitch_usage.inc - -.. include:: niswitch/toc.inc - - diff --git a/docs/niswitch/.readthedocs.yaml b/docs/niswitch/.readthedocs.yaml new file mode 100644 index 000000000..96c691d4c --- /dev/null +++ b/docs/niswitch/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/niswitch/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/niswitch/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/niswitch/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/niswitch/conf.py b/docs/niswitch/conf.py new file mode 100644 index 000000000..2b995b846 --- /dev/null +++ b/docs/niswitch/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-SWITCH Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-SWITCH Python API' +copyright = '2017-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NISWITCHPythonAPI.tex', 'NI-SWITCH Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'niswitchpythonapi', 'NI-SWITCH Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NISWITCHPythonAPI', 'NI-SWITCH Python API Documentation', + author, 'NISWITCHPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/niswitch/index.rst b/docs/niswitch/index.rst new file mode 100644 index 000000000..79b6644b6 --- /dev/null +++ b/docs/niswitch/index.rst @@ -0,0 +1,31 @@ + +NI-SWITCH Python API Documentation +================================== + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + niswitch + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/niswitch/niswitch.rst b/docs/niswitch/niswitch.rst new file mode 100644 index 000000000..b43ed4223 --- /dev/null +++ b/docs/niswitch/niswitch.rst @@ -0,0 +1,9 @@ +niswitch module +=============== + +.. include:: installation.inc + +.. include:: ../_static/niswitch_usage.inc + +.. include:: toc.inc + diff --git a/docs/niswitch/toc.inc b/docs/niswitch/toc.inc index 26d2b3dee..300092a6c 100644 --- a/docs/niswitch/toc.inc +++ b/docs/niswitch/toc.inc @@ -3,10 +3,10 @@ API Reference .. toctree:: - niswitch/class - niswitch/rep_caps - niswitch/enums - niswitch/errors - niswitch/examples - niswitch/grpc_session_options + class + rep_caps + enums + errors + examples + grpc_session_options diff --git a/docs/nitclk.rst b/docs/nitclk.rst deleted file mode 100644 index 3ed949862..000000000 --- a/docs/nitclk.rst +++ /dev/null @@ -1,10 +0,0 @@ -nitclk module -============================================================= - -.. include:: nitclk/installation.inc - -.. include:: _static/nitclk_usage.inc - -.. include:: nitclk/toc.inc - - diff --git a/docs/nitclk/.readthedocs.yaml b/docs/nitclk/.readthedocs.yaml new file mode 100644 index 000000000..e5bddcd43 --- /dev/null +++ b/docs/nitclk/.readthedocs.yaml @@ -0,0 +1,51 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Why Use A Configuration File? +# https://docs.readthedocs.io/en/stable/config-file/index.html +# The main advantages of using a configuration file over the web interface are: +# * Settings are per version rather than per project. +# * Settings live in your VCS. +# * They enable reproducible build environments over time. +# * Some settings are only available using a configuration file + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + # pre_build: + # # Check for broken external links + # - python -m sphinx -b linkcheck -D linkcheck_timeout=1 docs/ _build/linkcheck + post_checkout: + # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition + # Build-cancellation rules are recommended for monorepos. + # Cancel building pull requests when there aren't changes in any of these paths: docs/_static/ docs/nitclk/. + # + # If there are no changes (git diff exits with 0) we force the command to return with 183. + # This is a special exit code on Read the Docs that will cancel the build immediately. + - | + if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/master -- docs/_static/ docs/nitclk/; + then + exit 183; + fi + +# Have Read the Docs build documentation with Sphinx +sphinx: + builder: html + configuration: docs/nitclk/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - epub + - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/nitclk/conf.py b/docs/nitclk/conf.py new file mode 100644 index 000000000..232a5ff12 --- /dev/null +++ b/docs/nitclk/conf.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# NI-TClk Python API documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 14 13:04:36 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../generated')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'NI-TClk Python API' +copyright = '2019-2023, National Instruments Corporation' +author = 'NI' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = '1.4.5.dev0' +# The short X.Y version. +version = release[:3] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +html_theme_options = { + 'navigation_depth': -1, +} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['../_static'] + +# Fix wide tables of RTD per https://github.com/rtfd/sphinx_rtd_theme/issues/117#issuecomment-41571653 +def setup(app): + app.add_css_file('theme_overrides.css') + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + 'donate.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIModularInstrumentsPythonAPIdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NITClkPythonAPI.tex', 'NI-TClk Python API Documentation', + 'NI', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'nitclkpythonapi', 'NI-TClk Python API Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NITClkPythonAPI', 'NI-TClk Python API Documentation', + author, 'NITClkPythonAPI', 'One line description of project.', + 'Miscellaneous'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/nitclk/index.rst b/docs/nitclk/index.rst new file mode 100644 index 000000000..06670400a --- /dev/null +++ b/docs/nitclk/index.rst @@ -0,0 +1,31 @@ + +NI-TClk Python API Documentation +================================ + +.. include:: ../_static/about_driver.inc + +.. include:: ../_static/contributing.inc + +.. include:: ../_static/support.inc + +.. toctree:: + :maxdepth: 3 + :caption: Documentation + + nitclk + +Additional Documentation +------------------------ + +Refer to your driver documentation for device-specific information and detailed API documentation. + +Refer to the `nimi-python Read the Docs project `_ for documentation of versions 1.4.4 of the module or earlier. + +.. include:: ../_static/license.inc + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/nitclk/nitclk.rst b/docs/nitclk/nitclk.rst new file mode 100644 index 000000000..24aecf34c --- /dev/null +++ b/docs/nitclk/nitclk.rst @@ -0,0 +1,9 @@ +nitclk module +============= + +.. include:: installation.inc + +.. include:: ../_static/nitclk_usage.inc + +.. include:: toc.inc + diff --git a/docs/nitclk/toc.inc b/docs/nitclk/toc.inc index 23642cd31..f4c0c7387 100644 --- a/docs/nitclk/toc.inc +++ b/docs/nitclk/toc.inc @@ -3,7 +3,7 @@ API Reference .. toctree:: - nitclk/class - nitclk/errors - nitclk/examples + class + errors + examples diff --git a/generated/nidcpower/README.rst b/generated/nidcpower/README.rst index 5aee69bd7..89ef08f91 100644 --- a/generated/nidcpower/README.rst +++ b/generated/nidcpower/README.rst @@ -160,22 +160,20 @@ The following is a basic example of using the **nidcpower** module to open a ses Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/nidigital/README.rst b/generated/nidigital/README.rst index e27a142c5..99bdfdccb 100644 --- a/generated/nidigital/README.rst +++ b/generated/nidigital/README.rst @@ -170,22 +170,20 @@ source current, and measure both voltage and current using the PPMU on selected Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/nidmm/README.rst b/generated/nidmm/README.rst index 03186da81..9467d10e1 100644 --- a/generated/nidmm/README.rst +++ b/generated/nidmm/README.rst @@ -139,22 +139,20 @@ The following is a basic example of using the **nidmm** module to open a session Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/nifgen/README.rst b/generated/nifgen/README.rst index 3d2d31a20..0c80fad4b 100644 --- a/generated/nifgen/README.rst +++ b/generated/nifgen/README.rst @@ -142,22 +142,20 @@ The following is a basic example of using the **nifgen** module to open a sessio Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/nimodinst/README.rst b/generated/nimodinst/README.rst index c6d7e3c99..90f2f7348 100644 --- a/generated/nimodinst/README.rst +++ b/generated/nimodinst/README.rst @@ -139,22 +139,20 @@ The following is a basic example of using the **nimodinst** module to retrieve i Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/niscope/README.rst b/generated/niscope/README.rst index 313801c2d..29b015f77 100644 --- a/generated/niscope/README.rst +++ b/generated/niscope/README.rst @@ -228,22 +228,20 @@ The waveform_infos returned from `fetch_into `_ i Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/nise/README.rst b/generated/nise/README.rst index 252d8ca73..a73f89d68 100644 --- a/generated/nise/README.rst +++ b/generated/nise/README.rst @@ -138,22 +138,20 @@ The following is a basic example of using the **nise** module to open a session Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/niswitch/README.rst b/generated/niswitch/README.rst index bb9f656e5..b1e1fedd5 100644 --- a/generated/niswitch/README.rst +++ b/generated/niswitch/README.rst @@ -138,22 +138,20 @@ The following is a basic example of using the **niswitch** module to open a sess Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/generated/nitclk/README.rst b/generated/nitclk/README.rst index d262106c4..b3a6f8544 100644 --- a/generated/nitclk/README.rst +++ b/generated/nitclk/README.rst @@ -136,22 +136,20 @@ The following is a basic example of using the **nitclk** module Support / Feedback ================== -The packages included in **nimi-python** package are supported by NI. For support, open -a request through the NI support portal at `ni.com `_. +For support specific to the Python API, follow the processs in `Bugs / Feature Requests`_. +For support with hardware, the driver runtime or any other questions not specific to the Python API, please visit `NI Community Forums `_. .. _bugs-section: Bugs / Feature Requests ======================= -To report a bug or submit a feature request specific to NI Modular Instruments Python bindings (nimi-python), please use the +To report a bug or submit a feature request specific to Python API, please use the `GitHub issues page `_. Fill in the issue template as completely as possible and we will respond as soon as we can. -For hardware support or any other questions not specific to this GitHub project, please visit `NI Community Forums `_. - .. _documentation-section: diff --git a/LATEST_RELEASE b/src/nidcpower/LATEST_RELEASE similarity index 100% rename from LATEST_RELEASE rename to src/nidcpower/LATEST_RELEASE diff --git a/src/nidcpower/metadata/config_addon.py b/src/nidcpower/metadata/config_addon.py index 3bd6b7af5..373e8ef21 100644 --- a/src/nidcpower/metadata/config_addon.py +++ b/src/nidcpower/metadata/config_addon.py @@ -2,4 +2,5 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q2', + 'initial_release_year': '2017', } diff --git a/src/nidcpower/nidcpower.mak b/src/nidcpower/nidcpower.mak index 36bad7990..11f41d27d 100644 --- a/src/nidcpower/nidcpower.mak +++ b/src/nidcpower/nidcpower.mak @@ -8,6 +8,9 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(DEFAULT_RST_FILES_TO_GENERATE) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) + CUSTOM_TYPES_TO_COPY += \ lcr_load_compensation_spot.py \ lcr_measurement.py \ diff --git a/src/nidigital/LATEST_RELEASE b/src/nidigital/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/nidigital/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/nidigital/metadata/config_addon.py b/src/nidigital/metadata/config_addon.py index 55952b4ab..8a8b35854 100644 --- a/src/nidigital/metadata/config_addon.py +++ b/src/nidigital/metadata/config_addon.py @@ -2,6 +2,7 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q2', + 'initial_release_year': '2019', 'custom_types': [ { 'ctypes_type': '', diff --git a/src/nidigital/nidigital.mak b/src/nidigital/nidigital.mak index 74034f3cf..ed238f1f3 100644 --- a/src/nidigital/nidigital.mak +++ b/src/nidigital/nidigital.mak @@ -8,6 +8,9 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(DEFAULT_RST_FILES_TO_GENERATE) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) + CUSTOM_TYPES_TO_COPY += \ history_ram_cycle_information.py \ diff --git a/src/nidmm/LATEST_RELEASE b/src/nidmm/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/nidmm/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/nidmm/metadata/config_addon.py b/src/nidmm/metadata/config_addon.py index a46a34a7b..d2bb5e6b5 100644 --- a/src/nidmm/metadata/config_addon.py +++ b/src/nidmm/metadata/config_addon.py @@ -2,4 +2,5 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q1.1', + 'initial_release_year': '2017', } diff --git a/src/nidmm/nidmm.mak b/src/nidmm/nidmm.mak index 9ad990b15..874324a80 100644 --- a/src/nidmm/nidmm.mak +++ b/src/nidmm/nidmm.mak @@ -8,5 +8,8 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(filter-out rep_caps.rst,$(DEFAULT_RST_FILES_TO_GENERATE)) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) + include $(BUILD_HELPER_DIR)/rules.mak diff --git a/src/nifake/nifake.mak b/src/nifake/nifake.mak index f53d7e5db..a9f456f55 100644 --- a/src/nifake/nifake.mak +++ b/src/nifake/nifake.mak @@ -8,6 +8,7 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) # We are not building any nifake documentation # RST_FILES_TO_GENERATE := $(DEFAULT_RST_FILES_TO_GENERATE) +# SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) CUSTOM_TYPES_TO_COPY += \ custom_struct.py \ diff --git a/src/nifgen/LATEST_RELEASE b/src/nifgen/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/nifgen/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/nifgen/metadata/config_addon.py b/src/nifgen/metadata/config_addon.py index a46a34a7b..d2bb5e6b5 100644 --- a/src/nifgen/metadata/config_addon.py +++ b/src/nifgen/metadata/config_addon.py @@ -2,4 +2,5 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q1.1', + 'initial_release_year': '2017', } diff --git a/src/nifgen/nifgen.mak b/src/nifgen/nifgen.mak index 95457fc20..010defb46 100644 --- a/src/nifgen/nifgen.mak +++ b/src/nifgen/nifgen.mak @@ -8,6 +8,8 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(DEFAULT_RST_FILES_TO_GENERATE) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) include $(BUILD_HELPER_DIR)/rules.mak diff --git a/src/nimodinst/LATEST_RELEASE b/src/nimodinst/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/nimodinst/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/nimodinst/metadata/config_addon.py b/src/nimodinst/metadata/config_addon.py index 3bd6b7af5..373e8ef21 100644 --- a/src/nimodinst/metadata/config_addon.py +++ b/src/nimodinst/metadata/config_addon.py @@ -2,4 +2,5 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q2', + 'initial_release_year': '2017', } diff --git a/src/nimodinst/nimodinst.mak b/src/nimodinst/nimodinst.mak index be2b6456e..6d99daa01 100644 --- a/src/nimodinst/nimodinst.mak +++ b/src/nimodinst/nimodinst.mak @@ -8,6 +8,9 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(filter-out rep_caps.rst enums.rst,$(DEFAULT_RST_FILES_TO_GENERATE)) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) + include $(BUILD_HELPER_DIR)/rules.mak # We need to override the default rule for generating session since we have diff --git a/src/niscope/LATEST_RELEASE b/src/niscope/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/niscope/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/niscope/metadata/config_addon.py b/src/niscope/metadata/config_addon.py index daaad3751..744c7c217 100644 --- a/src/niscope/metadata/config_addon.py +++ b/src/niscope/metadata/config_addon.py @@ -2,6 +2,7 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q1.1', + 'initial_release_year': '2017', 'custom_types': [ # Redundant, since waveform_info is also in the base config.py file. See issue 1495 (https://github.com/ni/nimi-python/issues/1495) { diff --git a/src/niscope/niscope.mak b/src/niscope/niscope.mak index 0a1176dc9..2fb2b94cc 100644 --- a/src/niscope/niscope.mak +++ b/src/niscope/niscope.mak @@ -8,6 +8,9 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(DEFAULT_RST_FILES_TO_GENERATE) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) + CUSTOM_TYPES_TO_COPY += \ waveform_info.py \ measurement_stats.py \ diff --git a/src/nise/LATEST_RELEASE b/src/nise/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/nise/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/nise/metadata/config_addon.py b/src/nise/metadata/config_addon.py index ff803faf1..41062ea76 100644 --- a/src/nise/metadata/config_addon.py +++ b/src/nise/metadata/config_addon.py @@ -2,4 +2,5 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q1', + 'initial_release_year': '2018', } diff --git a/src/nise/nise.mak b/src/nise/nise.mak index 1b4f969ae..45a9a6b5f 100644 --- a/src/nise/nise.mak +++ b/src/nise/nise.mak @@ -8,6 +8,9 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(filter-out rep_caps.rst,$(DEFAULT_RST_FILES_TO_GENERATE)) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) + include $(BUILD_HELPER_DIR)/rules.mak diff --git a/src/niswitch/LATEST_RELEASE b/src/niswitch/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/niswitch/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/niswitch/metadata/config_addon.py b/src/niswitch/metadata/config_addon.py index ff803faf1..cc7865685 100644 --- a/src/niswitch/metadata/config_addon.py +++ b/src/niswitch/metadata/config_addon.py @@ -2,4 +2,5 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q1', + 'initial_release_year': '2017', } diff --git a/src/niswitch/niswitch.mak b/src/niswitch/niswitch.mak index 95457fc20..010defb46 100644 --- a/src/niswitch/niswitch.mak +++ b/src/niswitch/niswitch.mak @@ -8,6 +8,8 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(DEFAULT_RST_FILES_TO_GENERATE) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) include $(BUILD_HELPER_DIR)/rules.mak diff --git a/src/nitclk/LATEST_RELEASE b/src/nitclk/LATEST_RELEASE new file mode 100644 index 000000000..1c99cf0e8 --- /dev/null +++ b/src/nitclk/LATEST_RELEASE @@ -0,0 +1 @@ +1.4.4 diff --git a/src/nitclk/metadata/config_addon.py b/src/nitclk/metadata/config_addon.py index 3bd6b7af5..f96db4c22 100644 --- a/src/nitclk/metadata/config_addon.py +++ b/src/nitclk/metadata/config_addon.py @@ -2,4 +2,5 @@ config_additional_config = { 'module_version': '1.4.5.dev0', 'latest_runtime_version_tested_against': '2023 Q2', + 'initial_release_year': '2019', } diff --git a/src/nitclk/nitclk.mak b/src/nitclk/nitclk.mak index 594b80f38..139b83605 100644 --- a/src/nitclk/nitclk.mak +++ b/src/nitclk/nitclk.mak @@ -8,6 +8,9 @@ MODULE_FILES_TO_COPY := $(DEFAULT_PY_FILES_TO_COPY) RST_FILES_TO_GENERATE := $(filter-out rep_caps.rst enums.rst,$(DEFAULT_RST_FILES_TO_GENERATE)) +SPHINX_CONF_PY := $(DEFAULT_SPHINX_CONF_PY) +READTHEDOCS_CONFIG := $(DEFAULT_READTHEDOCS_CONFIG) + include $(BUILD_HELPER_DIR)/rules.mak # We need to override the default rule for generating session since we have diff --git a/tox-travis.ini b/tox-travis.ini index c3cd4f434..e389160b4 100644 --- a/tox-travis.ini +++ b/tox-travis.ini @@ -107,7 +107,15 @@ commands = flake8: flake8 --config=./tox.ini src/nitclk/system_tests/ src/nitclk/examples/ docs: python --version docs: python -c "import platform; print(platform.architecture())" - docs: sphinx-build -b html -d {envtmpdir}/doctrees . ../generated/docs/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidcpower ../generated/docs/nidcpower/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidigital ../generated/docs/nidigital/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidmm ../generated/docs/nidmm/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nifgen ../generated/docs/nifgen/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nimodinst ../generated/docs/nimodinst/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niscope ../generated/docs/niscope/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nise ../generated/docs/nise/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niswitch ../generated/docs/niswitch/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nitclk ../generated/docs/nitclk/html {posargs} pkg: python --version pkg: python -c "import platform; print(platform.architecture())" pkg: python -m twine --version diff --git a/tox.ini b/tox.ini index f02a42ce7..6a96fd2f4 100644 --- a/tox.ini +++ b/tox.ini @@ -107,7 +107,15 @@ commands = flake8: flake8 --config=./tox.ini src/nitclk/system_tests/ src/nitclk/examples/ docs: python --version docs: python -c "import platform; print(platform.architecture())" - docs: sphinx-build -b html -d {envtmpdir}/doctrees . ../generated/docs/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidcpower ../generated/docs/nidcpower/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidigital ../generated/docs/nidigital/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nidmm ../generated/docs/nidmm/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nifgen ../generated/docs/nifgen/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nimodinst ../generated/docs/nimodinst/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niscope ../generated/docs/niscope/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nise ../generated/docs/nise/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./niswitch ../generated/docs/niswitch/html {posargs} + docs: sphinx-build -b html -d {envtmpdir}/doctrees ./nitclk ../generated/docs/nitclk/html {posargs} pkg: python --version pkg: python -c "import platform; print(platform.architecture())" pkg: python -m twine --version