From 4c30948a14b67c6f10a55683e87f275ed8a73247 Mon Sep 17 00:00:00 2001 From: Kerry McAdams Date: Fri, 5 Jan 2024 11:40:20 -0500 Subject: [PATCH 1/4] add add-license-headers to docs --- doc/source/coding-style/formatting-tools.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/source/coding-style/formatting-tools.rst b/doc/source/coding-style/formatting-tools.rst index c1a63e6d7..2ff597463 100644 --- a/doc/source/coding-style/formatting-tools.rst +++ b/doc/source/coding-style/formatting-tools.rst @@ -98,6 +98,18 @@ The example configuration defines these options: to print as a report when checking ends. +add-license-headers +------------------- +The goal of `add-license-headers` is to add and update license headers for files with +`REUSE `_. By default, the hook will run on proto files in +any directory, as well as python files within directories named ``src``, ``examples``, +and ``tests``. The license that is added to the files can be found in the +`ansys/pre-commit-hooks repository - MIT.txt +`_. +See the `README ` file more information +on how to customize the hook. + + Code coverage ------------- Code coverage indicates the percentage of the codebase tested by the test @@ -163,6 +175,11 @@ formatting tools. additional_dependencies: [toml] exclude: "tests/" + - repo: https://github.com/ansys/pre-commit-hooks + rev: v0.2.4 + hooks: + - id: add-license-headers + Installing ``pre-commit`` ~~~~~~~~~~~~~~~~~~~~~~~~~ You can install ``pre-commit`` by running: From f9ff3e5f81c0baaada004ec9d61428dc139e908c Mon Sep 17 00:00:00 2001 From: Kerry McAdams Date: Fri, 5 Jan 2024 11:55:03 -0500 Subject: [PATCH 2/4] vale fixes --- doc/source/coding-style/formatting-tools.rst | 4 ++-- doc/styles/Vocab/ANSYS/accept.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/coding-style/formatting-tools.rst b/doc/source/coding-style/formatting-tools.rst index 2ff597463..a74dfe6f9 100644 --- a/doc/source/coding-style/formatting-tools.rst +++ b/doc/source/coding-style/formatting-tools.rst @@ -98,10 +98,10 @@ The example configuration defines these options: to print as a report when checking ends. -add-license-headers +Add-license-headers ------------------- The goal of `add-license-headers` is to add and update license headers for files with -`REUSE `_. By default, the hook will run on proto files in +`REUSE `_. By default, the hook runs on proto files in any directory, as well as python files within directories named ``src``, ``examples``, and ``tests``. The license that is added to the files can be found in the `ansys/pre-commit-hooks repository - MIT.txt diff --git a/doc/styles/Vocab/ANSYS/accept.txt b/doc/styles/Vocab/ANSYS/accept.txt index 7ca57f8fb..715a7ef53 100644 --- a/doc/styles/Vocab/ANSYS/accept.txt +++ b/doc/styles/Vocab/ANSYS/accept.txt @@ -57,6 +57,7 @@ PEP 518 pluggable [Pp]ostprocessing Protobuf +proto (?i)Pyaedt (?i)Pyansys Pydocstyle From cde82fdd287f0fcb3071169e7448620d39034889 Mon Sep 17 00:00:00 2001 From: Kerry McAdams Date: Fri, 5 Jan 2024 12:06:42 -0500 Subject: [PATCH 3/4] update ansys-sphinx-theme to 0.13.0 --- requirements/requirements_doc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_doc.txt b/requirements/requirements_doc.txt index c6507e642..19f485955 100644 --- a/requirements/requirements_doc.txt +++ b/requirements/requirements_doc.txt @@ -1,5 +1,5 @@ Sphinx==7.2.6 -ansys-sphinx-theme==0.12.5 +ansys-sphinx-theme==0.13.0 sphinx-copybutton==0.5.2 sphinx_toolbox==3.5.0 sphinx_design==0.5.0 From 2788b05b37932578193ef4453ac8cb9e8775a8cf Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Mon, 8 Jan 2024 07:23:12 +0100 Subject: [PATCH 4/4] Update doc/source/coding-style/formatting-tools.rst Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- doc/source/coding-style/formatting-tools.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/source/coding-style/formatting-tools.rst b/doc/source/coding-style/formatting-tools.rst index a74dfe6f9..003b75fa3 100644 --- a/doc/source/coding-style/formatting-tools.rst +++ b/doc/source/coding-style/formatting-tools.rst @@ -100,14 +100,15 @@ The example configuration defines these options: Add-license-headers ------------------- -The goal of `add-license-headers` is to add and update license headers for files with -`REUSE `_. By default, the hook runs on proto files in -any directory, as well as python files within directories named ``src``, ``examples``, -and ``tests``. The license that is added to the files can be found in the +The goal of the ``add-license-headers`` pre-commit hook is to add and update license headers +for files with `REUSE `_. By default, the hook runs on +PROTO files in any directory and on Python files in the ``src``, ``examples``, and ``tests`` directories. + +You can find the MIT license that is added to the files in `ansys/pre-commit-hooks repository - MIT.txt `_. -See the `README ` file more information -on how to customize the hook. + +For information on customizing the hook, see the `README ` file. Code coverage