ansys-pre-commit-hooks 0.3.2__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ansys_pre_commit_hooks-0.4.1/AUTHORS.md +12 -0
- ansys_pre_commit_hooks-0.4.1/MANIFEST.in +2 -0
- ansys_pre_commit_hooks-0.3.2/README.rst → ansys_pre_commit_hooks-0.4.1/PKG-INFO +101 -5
- ansys_pre_commit_hooks-0.3.2/PKG-INFO → ansys_pre_commit_hooks-0.4.1/README.rst +58 -38
- ansys_pre_commit_hooks-0.4.1/pyproject.toml +76 -0
- ansys_pre_commit_hooks-0.4.1/setup.cfg +4 -0
- ansys_pre_commit_hooks-0.4.1/setup.py +109 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/VERSION +1 -0
- {ansys_pre_commit_hooks-0.3.2 → ansys_pre_commit_hooks-0.4.1}/src/ansys/pre_commit_hooks/__init__.py +6 -5
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/__pycache__/__init__.cpython-310.pyc +0 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/__pycache__/tech_review.cpython-310.pyc +0 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/assets/licenses.json +630 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/tech_review.py +742 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/AUTHORS +12 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/CODE_OF_CONDUCT.md +65 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/CONTRIBUTING.md +12 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/CONTRIBUTORS.md +9 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/LICENSE +21 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/README.md +81 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/README.rst +107 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys/pre_commit_hooks/templates/dependabot.yml +16 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys_pre_commit_hooks.egg-info/PKG-INFO +429 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys_pre_commit_hooks.egg-info/SOURCES.txt +32 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys_pre_commit_hooks.egg-info/dependency_links.txt +1 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys_pre_commit_hooks.egg-info/entry_points.txt +3 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys_pre_commit_hooks.egg-info/requires.txt +18 -0
- ansys_pre_commit_hooks-0.4.1/src/ansys_pre_commit_hooks.egg-info/top_level.txt +1 -0
- ansys_pre_commit_hooks-0.4.1/tests/test_metadata.py +36 -0
- ansys_pre_commit_hooks-0.4.1/tests/test_reuse.py +674 -0
- ansys_pre_commit_hooks-0.4.1/tests/test_tech_review.py +467 -0
- ansys_pre_commit_hooks-0.3.2/pyproject.toml +0 -117
- {ansys_pre_commit_hooks-0.3.2 → ansys_pre_commit_hooks-0.4.1}/LICENSE +0 -0
- {ansys_pre_commit_hooks-0.3.2 → ansys_pre_commit_hooks-0.4.1}/src/ansys/pre_commit_hooks/add_license_headers.py +0 -0
- {ansys_pre_commit_hooks-0.3.2 → ansys_pre_commit_hooks-0.4.1}/src/ansys/pre_commit_hooks/assets/.reuse/templates/ansys.jinja2 +0 -0
- {ansys_pre_commit_hooks-0.3.2 → ansys_pre_commit_hooks-0.4.1}/src/ansys/pre_commit_hooks/assets/LICENSES/MIT.txt +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# This is the list of ansys-pre-commit-hooks's significant contributors.
|
|
2
|
+
#
|
|
3
|
+
# This file does not necessarily list everyone who has contributed code.
|
|
4
|
+
#
|
|
5
|
+
# For contributions made under a Corporate CLA, the organization is
|
|
6
|
+
# added to this file.
|
|
7
|
+
#
|
|
8
|
+
# If you have contributed to the repository and wish to be added to this file
|
|
9
|
+
# please submit a request.
|
|
10
|
+
#
|
|
11
|
+
#
|
|
12
|
+
ANSYS, Inc.
|
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ansys-pre-commit-hooks
|
|
3
|
+
Version: 0.4.1
|
|
4
|
+
Summary: A Python wrapper to create Ansys-tailored pre-commit hooks
|
|
5
|
+
Home-page: https://github.com/ansys/pre-commit-hooks
|
|
6
|
+
Author: ANSYS, Inc.
|
|
7
|
+
Author-email: pyansys.core@ansys.com
|
|
8
|
+
Maintainer: ANSYS, Inc.
|
|
9
|
+
Maintainer-email: pyansys.core@ansys.com
|
|
10
|
+
License: MIT
|
|
11
|
+
Project-URL: Source, https://github.com/ansys/pre-commit-hooks/
|
|
12
|
+
Project-URL: Tracker, https://github.com/ansys/pre-commit-hooks/issues
|
|
13
|
+
Project-URL: Homepage, https://github.com/ansys/pre-commit-hooks
|
|
14
|
+
Project-URL: Documentation, https://pre-commit-hooks.docs.pyansys.com
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.9,<4
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
License-File: AUTHORS.md
|
|
27
|
+
Requires-Dist: GitPython==3.1.43
|
|
28
|
+
Requires-Dist: importlib-metadata==8.0.0
|
|
29
|
+
Requires-Dist: Jinja2==3.1.4
|
|
30
|
+
Requires-Dist: reuse==3.0.2
|
|
31
|
+
Requires-Dist: requests==2.32.3
|
|
32
|
+
Requires-Dist: semver==3.0.2
|
|
33
|
+
Requires-Dist: toml==0.10.2
|
|
34
|
+
Provides-Extra: doc
|
|
35
|
+
Requires-Dist: ansys-sphinx-theme[autoapi]==0.16.6; extra == "doc"
|
|
36
|
+
Requires-Dist: numpydoc==1.7.0; extra == "doc"
|
|
37
|
+
Requires-Dist: sphinx==7.4.0; extra == "doc"
|
|
38
|
+
Requires-Dist: sphinx-autodoc-typehints==2.2.2; extra == "doc"
|
|
39
|
+
Requires-Dist: sphinx-copybutton==0.5.1; extra == "doc"
|
|
40
|
+
Provides-Extra: tests
|
|
41
|
+
Requires-Dist: pytest==8.2.2; extra == "tests"
|
|
42
|
+
Requires-Dist: pytest-cov==5.0.0; extra == "tests"
|
|
43
|
+
|
|
1
44
|
Ansys pre-commit hooks
|
|
2
45
|
======================
|
|
3
46
|
|pyansys| |python| |pypi| |GH-CI| |MIT| |black| |pre-commit-ci|
|
|
@@ -36,8 +79,8 @@ Currently, these hooks are available:
|
|
|
36
79
|
* ``add-license-headers``: Add missing license headers to files by using
|
|
37
80
|
`REUSE <https://reuse.software/>`_ . To use this hook, you must
|
|
38
81
|
have ``REUSE`` implemented in your repository.
|
|
39
|
-
|
|
40
|
-
|
|
82
|
+
* ``tech-review``: Do a technical review of your repository according to
|
|
83
|
+
`Ansys repository requirements <https://dev.docs.pyansys.com/packaging/structure.html>`_`
|
|
41
84
|
|
|
42
85
|
``add-license-headers`` setup
|
|
43
86
|
-----------------------------
|
|
@@ -84,7 +127,7 @@ Set custom arguments
|
|
|
84
127
|
.. code:: yaml
|
|
85
128
|
|
|
86
129
|
- repo: https://github.com/ansys/pre-commit-hooks
|
|
87
|
-
rev: v0.
|
|
130
|
+
rev: v0.4.1
|
|
88
131
|
hooks:
|
|
89
132
|
- id: add-license-headers
|
|
90
133
|
args: ["--custom_copyright", "custom copyright phrase", "--custom_template", "template_name", "--custom_license", "license_name", "--ignore_license_check", "--start_year", "2023"]
|
|
@@ -129,7 +172,7 @@ the hook should run on, add the necessary regex to the ``files`` line in your
|
|
|
129
172
|
.. code:: yaml
|
|
130
173
|
|
|
131
174
|
- repo: https://github.com/ansys/pre-commit-hooks
|
|
132
|
-
rev: v0.
|
|
175
|
+
rev: v0.4.1
|
|
133
176
|
hooks:
|
|
134
177
|
- id: add-license-headers
|
|
135
178
|
files: '(src|examples|tests|newFolder)/.*\.(py|newExtension)|\.(proto|newExtension)'
|
|
@@ -142,7 +185,7 @@ In .pre-commit-config.yaml:
|
|
|
142
185
|
.. code:: yaml
|
|
143
186
|
|
|
144
187
|
- repo: https://github.com/ansys/pre-commit-hooks
|
|
145
|
-
rev: v0.
|
|
188
|
+
rev: v0.4.1
|
|
146
189
|
hooks:
|
|
147
190
|
- id: add-license-headers
|
|
148
191
|
exclude: |
|
|
@@ -160,6 +203,59 @@ In .pre-commit-config.yaml:
|
|
|
160
203
|
* ``.*\.js`` excludes all .js files in all directories.
|
|
161
204
|
* ``\..*`` excludes all hidden files.
|
|
162
205
|
|
|
206
|
+
``tech-review`` setup
|
|
207
|
+
---------------------
|
|
208
|
+
|
|
209
|
+
These are the default values for the arguments of the tech-review hook:
|
|
210
|
+
|
|
211
|
+
* ``--author_maint_name=ANSYS, Inc.``
|
|
212
|
+
* ``--author_maint_email=pyansys.core@ansys.com``
|
|
213
|
+
* ``--license=MIT``
|
|
214
|
+
* ``--url=https://github.com/ansys/{repo-name}``, replacing ``repo-name`` with the name of the repository
|
|
215
|
+
|
|
216
|
+
The ``--author_maint_name`` is the name of the author and maintainer in the ``pyproject.toml`` file.
|
|
217
|
+
By default, it is "Ansys, Inc.".
|
|
218
|
+
|
|
219
|
+
The ``--author_maint_email`` is the email of the author and maintainer in the ``pyproject.toml`` file.
|
|
220
|
+
By default, it is "pyansys.core@ansys.com".
|
|
221
|
+
|
|
222
|
+
The ``--license`` argument is the license that is being used by your repository. By default, it is
|
|
223
|
+
MIT.
|
|
224
|
+
|
|
225
|
+
The ``--url`` argument is automatically rendered based on the repository name. If your repository
|
|
226
|
+
is not in the Ansys organization, please add this argument to your configuration in
|
|
227
|
+
.pre-commit-config.yaml.
|
|
228
|
+
|
|
229
|
+
The ``--product`` argument is required if a ``README.rst`` or ``README.md`` file does not
|
|
230
|
+
exist in your repository and you want the template to render correctly. The product
|
|
231
|
+
for ``PyMechanical`` would be ``mechanical``, for example.
|
|
232
|
+
|
|
233
|
+
The ``--non_compliant_name`` flag can be used if your repository does not follow the typical
|
|
234
|
+
naming convention of ``ansys-*-*``.
|
|
235
|
+
|
|
236
|
+
Technical review hook in ``ansys/pre-commit-hooks``' .pre-commit-config.yaml file:
|
|
237
|
+
|
|
238
|
+
.. code:: yaml
|
|
239
|
+
|
|
240
|
+
- repo: https://github.com/ansys/pre-commit-hooks
|
|
241
|
+
rev: v0.4.1
|
|
242
|
+
hooks:
|
|
243
|
+
- id: tech-review
|
|
244
|
+
args:
|
|
245
|
+
- --product=pre_commit_hooks
|
|
246
|
+
- --non_compliant_name
|
|
247
|
+
|
|
248
|
+
Technical review hook in ``PyMechanical``'s .pre-commit-config.yaml file:
|
|
249
|
+
|
|
250
|
+
.. code:: yaml
|
|
251
|
+
|
|
252
|
+
- repo: https://github.com/ansys/pre-commit-hooks
|
|
253
|
+
rev: v0.4.1
|
|
254
|
+
hooks:
|
|
255
|
+
- id: tech-review
|
|
256
|
+
args:
|
|
257
|
+
- --product=mechanical
|
|
258
|
+
|
|
163
259
|
|
|
164
260
|
How to install
|
|
165
261
|
--------------
|
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: ansys-pre-commit-hooks
|
|
3
|
-
Version: 0.3.2
|
|
4
|
-
Summary: A Python wrapper to create Ansys-tailored pre-commit hooks
|
|
5
|
-
Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
|
|
6
|
-
Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
|
|
7
|
-
Requires-Python: >=3.9,<4
|
|
8
|
-
Description-Content-Type: text/x-rst
|
|
9
|
-
Classifier: Development Status :: 4 - Beta
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Requires-Dist: importlib-metadata==7.1.0
|
|
17
|
-
Requires-Dist: reuse==3.0.2
|
|
18
|
-
Requires-Dist: GitPython==3.1.43
|
|
19
|
-
Requires-Dist: ansys-sphinx-theme[autoapi]==0.16.5 ; extra == "doc"
|
|
20
|
-
Requires-Dist: numpydoc==1.7.0 ; extra == "doc"
|
|
21
|
-
Requires-Dist: sphinx==7.3.7 ; extra == "doc"
|
|
22
|
-
Requires-Dist: sphinx-autodoc-typehints==2.1.1 ; extra == "doc"
|
|
23
|
-
Requires-Dist: sphinx-copybutton==0.5.1 ; extra == "doc"
|
|
24
|
-
Requires-Dist: pytest==8.2.2 ; extra == "tests"
|
|
25
|
-
Requires-Dist: pytest-cov==5.0.0 ; extra == "tests"
|
|
26
|
-
Project-URL: Documentation, https://pre-commit-hooks.docs.ansys.com
|
|
27
|
-
Project-URL: Homepage, https://github.com/ansys/pre-commit-hooks
|
|
28
|
-
Project-URL: Source, https://github.com/ansys/pre-commit-hooks
|
|
29
|
-
Project-URL: Tracker, https://github.com/ansys/pre-commit-hooks/issues
|
|
30
|
-
Provides-Extra: doc
|
|
31
|
-
Provides-Extra: tests
|
|
32
|
-
|
|
33
1
|
Ansys pre-commit hooks
|
|
34
2
|
======================
|
|
35
3
|
|pyansys| |python| |pypi| |GH-CI| |MIT| |black| |pre-commit-ci|
|
|
@@ -68,8 +36,8 @@ Currently, these hooks are available:
|
|
|
68
36
|
* ``add-license-headers``: Add missing license headers to files by using
|
|
69
37
|
`REUSE <https://reuse.software/>`_ . To use this hook, you must
|
|
70
38
|
have ``REUSE`` implemented in your repository.
|
|
71
|
-
|
|
72
|
-
|
|
39
|
+
* ``tech-review``: Do a technical review of your repository according to
|
|
40
|
+
`Ansys repository requirements <https://dev.docs.pyansys.com/packaging/structure.html>`_`
|
|
73
41
|
|
|
74
42
|
``add-license-headers`` setup
|
|
75
43
|
-----------------------------
|
|
@@ -116,7 +84,7 @@ Set custom arguments
|
|
|
116
84
|
.. code:: yaml
|
|
117
85
|
|
|
118
86
|
- repo: https://github.com/ansys/pre-commit-hooks
|
|
119
|
-
rev: v0.
|
|
87
|
+
rev: v0.4.1
|
|
120
88
|
hooks:
|
|
121
89
|
- id: add-license-headers
|
|
122
90
|
args: ["--custom_copyright", "custom copyright phrase", "--custom_template", "template_name", "--custom_license", "license_name", "--ignore_license_check", "--start_year", "2023"]
|
|
@@ -161,7 +129,7 @@ the hook should run on, add the necessary regex to the ``files`` line in your
|
|
|
161
129
|
.. code:: yaml
|
|
162
130
|
|
|
163
131
|
- repo: https://github.com/ansys/pre-commit-hooks
|
|
164
|
-
rev: v0.
|
|
132
|
+
rev: v0.4.1
|
|
165
133
|
hooks:
|
|
166
134
|
- id: add-license-headers
|
|
167
135
|
files: '(src|examples|tests|newFolder)/.*\.(py|newExtension)|\.(proto|newExtension)'
|
|
@@ -174,7 +142,7 @@ In .pre-commit-config.yaml:
|
|
|
174
142
|
.. code:: yaml
|
|
175
143
|
|
|
176
144
|
- repo: https://github.com/ansys/pre-commit-hooks
|
|
177
|
-
rev: v0.
|
|
145
|
+
rev: v0.4.1
|
|
178
146
|
hooks:
|
|
179
147
|
- id: add-license-headers
|
|
180
148
|
exclude: |
|
|
@@ -192,6 +160,59 @@ In .pre-commit-config.yaml:
|
|
|
192
160
|
* ``.*\.js`` excludes all .js files in all directories.
|
|
193
161
|
* ``\..*`` excludes all hidden files.
|
|
194
162
|
|
|
163
|
+
``tech-review`` setup
|
|
164
|
+
---------------------
|
|
165
|
+
|
|
166
|
+
These are the default values for the arguments of the tech-review hook:
|
|
167
|
+
|
|
168
|
+
* ``--author_maint_name=ANSYS, Inc.``
|
|
169
|
+
* ``--author_maint_email=pyansys.core@ansys.com``
|
|
170
|
+
* ``--license=MIT``
|
|
171
|
+
* ``--url=https://github.com/ansys/{repo-name}``, replacing ``repo-name`` with the name of the repository
|
|
172
|
+
|
|
173
|
+
The ``--author_maint_name`` is the name of the author and maintainer in the ``pyproject.toml`` file.
|
|
174
|
+
By default, it is "Ansys, Inc.".
|
|
175
|
+
|
|
176
|
+
The ``--author_maint_email`` is the email of the author and maintainer in the ``pyproject.toml`` file.
|
|
177
|
+
By default, it is "pyansys.core@ansys.com".
|
|
178
|
+
|
|
179
|
+
The ``--license`` argument is the license that is being used by your repository. By default, it is
|
|
180
|
+
MIT.
|
|
181
|
+
|
|
182
|
+
The ``--url`` argument is automatically rendered based on the repository name. If your repository
|
|
183
|
+
is not in the Ansys organization, please add this argument to your configuration in
|
|
184
|
+
.pre-commit-config.yaml.
|
|
185
|
+
|
|
186
|
+
The ``--product`` argument is required if a ``README.rst`` or ``README.md`` file does not
|
|
187
|
+
exist in your repository and you want the template to render correctly. The product
|
|
188
|
+
for ``PyMechanical`` would be ``mechanical``, for example.
|
|
189
|
+
|
|
190
|
+
The ``--non_compliant_name`` flag can be used if your repository does not follow the typical
|
|
191
|
+
naming convention of ``ansys-*-*``.
|
|
192
|
+
|
|
193
|
+
Technical review hook in ``ansys/pre-commit-hooks``' .pre-commit-config.yaml file:
|
|
194
|
+
|
|
195
|
+
.. code:: yaml
|
|
196
|
+
|
|
197
|
+
- repo: https://github.com/ansys/pre-commit-hooks
|
|
198
|
+
rev: v0.4.1
|
|
199
|
+
hooks:
|
|
200
|
+
- id: tech-review
|
|
201
|
+
args:
|
|
202
|
+
- --product=pre_commit_hooks
|
|
203
|
+
- --non_compliant_name
|
|
204
|
+
|
|
205
|
+
Technical review hook in ``PyMechanical``'s .pre-commit-config.yaml file:
|
|
206
|
+
|
|
207
|
+
.. code:: yaml
|
|
208
|
+
|
|
209
|
+
- repo: https://github.com/ansys/pre-commit-hooks
|
|
210
|
+
rev: v0.4.1
|
|
211
|
+
hooks:
|
|
212
|
+
- id: tech-review
|
|
213
|
+
args:
|
|
214
|
+
- --product=mechanical
|
|
215
|
+
|
|
195
216
|
|
|
196
217
|
How to install
|
|
197
218
|
--------------
|
|
@@ -363,4 +384,3 @@ the building requirements and then execute the build module with these commands:
|
|
|
363
384
|
.. _pytest: https://docs.pytest.org/en/stable/
|
|
364
385
|
.. _Sphinx: https://www.sphinx-doc.org/en/master/
|
|
365
386
|
.. _tox: https://tox.wiki/
|
|
366
|
-
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=42.0",
|
|
4
|
+
"GitPython==3.1.43",
|
|
5
|
+
"Jinja2==3.1.4",
|
|
6
|
+
"reuse==3.0.2",
|
|
7
|
+
"requests==2.32.3",
|
|
8
|
+
"semver==3.0.2",
|
|
9
|
+
"toml==0.10.2",
|
|
10
|
+
"wheel",
|
|
11
|
+
]
|
|
12
|
+
build-backend = "setuptools.build_meta"
|
|
13
|
+
|
|
14
|
+
[tool.black]
|
|
15
|
+
line-length = 100
|
|
16
|
+
|
|
17
|
+
[tool.isort]
|
|
18
|
+
profile = "black"
|
|
19
|
+
force_sort_within_sections = true
|
|
20
|
+
line_length = 100
|
|
21
|
+
src_paths = ["doc", "src", "tests"]
|
|
22
|
+
|
|
23
|
+
[tool.codespell]
|
|
24
|
+
ignore-words = "doc/styles/config/vocabularies/ANSYS/accept.txt"
|
|
25
|
+
|
|
26
|
+
[tool.coverage.run]
|
|
27
|
+
source = ["ansys.pre_commit_hooks"]
|
|
28
|
+
|
|
29
|
+
[tool.coverage.report]
|
|
30
|
+
show_missing = true
|
|
31
|
+
|
|
32
|
+
[tool.pytest.ini_options]
|
|
33
|
+
minversion = "7.1"
|
|
34
|
+
addopts = "--cov=ansys.pre_commit_hooks --cov-report term-missing -vv"
|
|
35
|
+
testpaths = [
|
|
36
|
+
"tests",
|
|
37
|
+
]
|
|
38
|
+
markers = [
|
|
39
|
+
"license_headers: marks tests for add-license-headers hook",
|
|
40
|
+
"tech_review: marks tests for tech-review hook",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[tool.towncrier]
|
|
44
|
+
package = "ansys.pre_commit_hooks"
|
|
45
|
+
directory = "doc/changelog.d"
|
|
46
|
+
filename = "CHANGELOG.md"
|
|
47
|
+
start_string = "<!-- towncrier release notes start -->\n"
|
|
48
|
+
underlines = ["", "", ""]
|
|
49
|
+
template = "doc/changelog.d/changelog_template.jinja"
|
|
50
|
+
title_format = "## [{version}](https://github.com/ansys/pre-commit-hooks/releases/tag/v{version}) - {project_date}"
|
|
51
|
+
issue_format = "[#{issue}](https://github.com/ansys/pre-commit-hooks/pull/{issue})"
|
|
52
|
+
|
|
53
|
+
[[tool.towncrier.type]]
|
|
54
|
+
directory = "added"
|
|
55
|
+
name = "Added"
|
|
56
|
+
showcontent = true
|
|
57
|
+
|
|
58
|
+
[[tool.towncrier.type]]
|
|
59
|
+
directory = "changed"
|
|
60
|
+
name = "Changed"
|
|
61
|
+
showcontent = true
|
|
62
|
+
|
|
63
|
+
[[tool.towncrier.type]]
|
|
64
|
+
directory = "fixed"
|
|
65
|
+
name = "Fixed"
|
|
66
|
+
showcontent = true
|
|
67
|
+
|
|
68
|
+
[[tool.towncrier.type]]
|
|
69
|
+
directory = "dependencies"
|
|
70
|
+
name = "Dependencies"
|
|
71
|
+
showcontent = true
|
|
72
|
+
|
|
73
|
+
[[tool.towncrier.type]]
|
|
74
|
+
directory = "miscellaneous"
|
|
75
|
+
name = "Miscellaneous"
|
|
76
|
+
showcontent = true
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""Installation file for ansys-pre-commit-hooks."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
from setuptools import find_namespace_packages, setup
|
|
7
|
+
from setuptools.command.develop import develop
|
|
8
|
+
from setuptools.command.install import install
|
|
9
|
+
|
|
10
|
+
SCRIPT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "src", "ansys")
|
|
11
|
+
|
|
12
|
+
sys.path.append(os.path.dirname(SCRIPT_DIR))
|
|
13
|
+
|
|
14
|
+
from ansys.pre_commit_hooks.tech_review import JSON_URL, LICENSES_JSON, download_license_json
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CustomInstallCommand(install):
|
|
18
|
+
"""Custom install command to download the license json file."""
|
|
19
|
+
|
|
20
|
+
def run(self):
|
|
21
|
+
"""Download the license json file."""
|
|
22
|
+
install.run(self)
|
|
23
|
+
download_license_json(JSON_URL, LICENSES_JSON)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class CustomDevelopCommand(develop):
|
|
27
|
+
"""Custom develop command to download the license json file."""
|
|
28
|
+
|
|
29
|
+
def run(self):
|
|
30
|
+
"""Download the license json file."""
|
|
31
|
+
develop.run(self)
|
|
32
|
+
download_license_json(JSON_URL, LICENSES_JSON)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
HERE = os.path.abspath(os.path.dirname(__file__))
|
|
36
|
+
with open(os.path.join(HERE, "src", "ansys", "pre_commit_hooks", "VERSION"), encoding="utf-8") as f:
|
|
37
|
+
version = f.read().strip()
|
|
38
|
+
|
|
39
|
+
# Get the long description from the README file
|
|
40
|
+
with open(os.path.join(HERE, "README.rst"), encoding="utf-8") as f:
|
|
41
|
+
long_description = f.read()
|
|
42
|
+
|
|
43
|
+
description = "A Python wrapper to create Ansys-tailored pre-commit hooks"
|
|
44
|
+
|
|
45
|
+
setup(
|
|
46
|
+
name="ansys-pre-commit-hooks",
|
|
47
|
+
packages=find_namespace_packages(where="src", include="ansys*"),
|
|
48
|
+
package_dir={"": "src"},
|
|
49
|
+
version=version,
|
|
50
|
+
description=description,
|
|
51
|
+
long_description=long_description,
|
|
52
|
+
license="MIT",
|
|
53
|
+
author="ANSYS, Inc.",
|
|
54
|
+
author_email="pyansys.core@ansys.com",
|
|
55
|
+
maintainer="ANSYS, Inc.",
|
|
56
|
+
maintainer_email="pyansys.core@ansys.com",
|
|
57
|
+
classifiers=[
|
|
58
|
+
"Development Status :: 4 - Beta",
|
|
59
|
+
"Intended Audience :: Science/Research",
|
|
60
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
61
|
+
"License :: OSI Approved :: MIT License",
|
|
62
|
+
"Operating System :: OS Independent",
|
|
63
|
+
"Programming Language :: Python :: 3.9",
|
|
64
|
+
"Programming Language :: Python :: 3.10",
|
|
65
|
+
"Programming Language :: Python :: 3.11",
|
|
66
|
+
"Programming Language :: Python :: 3.12",
|
|
67
|
+
],
|
|
68
|
+
url="https://github.com/ansys/pre-commit-hooks",
|
|
69
|
+
python_requires=">=3.9,<4",
|
|
70
|
+
install_requires=[
|
|
71
|
+
"GitPython==3.1.43",
|
|
72
|
+
"importlib-metadata==8.0.0",
|
|
73
|
+
"Jinja2==3.1.4",
|
|
74
|
+
"reuse==3.0.2",
|
|
75
|
+
"requests==2.32.3",
|
|
76
|
+
"semver==3.0.2",
|
|
77
|
+
"toml==0.10.2",
|
|
78
|
+
],
|
|
79
|
+
extras_require={
|
|
80
|
+
"doc": [
|
|
81
|
+
"ansys-sphinx-theme[autoapi]==0.16.6",
|
|
82
|
+
"numpydoc==1.7.0",
|
|
83
|
+
"sphinx==7.4.0",
|
|
84
|
+
"sphinx-autodoc-typehints==2.2.2",
|
|
85
|
+
"sphinx-copybutton==0.5.1",
|
|
86
|
+
],
|
|
87
|
+
"tests": [
|
|
88
|
+
"pytest==8.2.2",
|
|
89
|
+
"pytest-cov==5.0.0",
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
project_urls={
|
|
93
|
+
"Source": "https://github.com/ansys/pre-commit-hooks/",
|
|
94
|
+
"Tracker": "https://github.com/ansys/pre-commit-hooks/issues",
|
|
95
|
+
"Homepage": "https://github.com/ansys/pre-commit-hooks",
|
|
96
|
+
"Documentation": "https://pre-commit-hooks.docs.pyansys.com",
|
|
97
|
+
},
|
|
98
|
+
include_package_data=True,
|
|
99
|
+
cmdclass={
|
|
100
|
+
"develop": CustomDevelopCommand,
|
|
101
|
+
"install": CustomInstallCommand,
|
|
102
|
+
},
|
|
103
|
+
entry_points={
|
|
104
|
+
"console_scripts": [
|
|
105
|
+
"add-license-headers=ansys.pre_commit_hooks.add_license_headers:main",
|
|
106
|
+
"tech-review=ansys.pre_commit_hooks.tech_review:main",
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.4.1
|
{ansys_pre_commit_hooks-0.3.2 → ansys_pre_commit_hooks-0.4.1}/src/ansys/pre_commit_hooks/__init__.py
RENAMED
|
@@ -22,9 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
"""Module for initializing package-level imports for Ansys pre-commit hooks."""
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
import importlib.metadata as importlib_metadata
|
|
27
|
-
except ModuleNotFoundError: # pragma: no cover
|
|
28
|
-
import importlib_metadata
|
|
25
|
+
import pathlib
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
__all__ = ["__version__"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
with open(pathlib.Path(__file__).parent / "VERSION", encoding="utf-8") as f:
|
|
31
|
+
__version__ = f.read().strip()
|
|
Binary file
|