tech-review
setup#
The tech-review
hook performs a brief technical review on repositories based on the Ansys
technical part of the PyAnsys approval and public release process
described in the PyAnsys developer’s guide.
The hook checks the following aspects of your repository:
The
.github
,doc
,src
, andtests
directories exist in the root of the repository.The
AUTHORS
,CODE_OF_CONDUCT.md
,CONTRIBUTING.md
,CONTRIBUTORS.md
,LICENSE
,README.{rst|md}
, and.github/dependabot.yml
files exist.
If any of the directories are missing, the hook fails, and the missing directories are added to the repository.
If any of the files are missing, the hook fails, and add the missing files are added to the repository using Jinja templates.
To get started, add the hook to your .pre-commit-config.yaml
file:
The following configuration is required for product libraries, such as PyMechanical
,
PyMAPDL
, or PyAEDT
, where {product}
is the name of the product:
- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.5.2
hooks:
- id: tech-review
args:
- --product={product}
For example, for PyMechanical
the {product}
would be mechanical
.
The following configuration is required for libraries that do not fall under the product
category, such as ansys-pre-commit-hooks
, ansys-sphinx-theme
, or ansys-actions
:
- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.5.2
hooks:
- id: tech-review
args:
- --product={product}
- --non_compliant_name
In the preceding code, {product}
is the name
variable under [tool.flit.module]
in
the pyproject.toml
file. For example, for ansys-pre-commit-hooks
the {product}
is
pre_commit_hooks
.
The --non_compliant_name
flag is used if the repository does not follow the typical naming
convention of ansys-*-*
.
tech-review
hook arguments#
Argument |
Default value |
Description |
---|---|---|
|
|
Name of the author and maintainer in the |
|
|
Email of the author and maintainer in the |
|
|
License that is being used by your repository. |
|
|
URL of the repository. |
|
Name of the repository’s product. For example, |
Product for the repository. |
|
N/A |
Flag to use if the repository does not follow the typical naming convention of |