Skip to content

Commit 46f1a9e

Browse files
authored
feat: add license headers (#691)
1 parent 419b0cc commit 46f1a9e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1740
-1
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@ repos:
4949
- id: check-yaml
5050
- id: trailing-whitespace
5151

52+
- repo: https://github.com/ansys/pre-commit-hooks
53+
rev: v0.1.2
54+
hooks:
55+
- id: add-license-headers
56+
args: ["--loc", "./"]
57+
5258
# this validates our github workflow files
5359
- repo: https://github.com/python-jsonschema/check-jsonschema
54-
rev: 0.24.1
60+
rev: 0.26.3
5561
hooks:
5662
- id: check-github-workflows

.reuse/dep5

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: pyansys-geometry
3+
Upstream-Contact: pyansys.core@ansys.com
4+
Source: https://github.com/ansys/pyansys-geometry
5+
6+
Files: .github/*
7+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
8+
License: MIT
9+
10+
Files: .reuse/*
11+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
12+
License: MIT
13+
14+
Files: doc/*
15+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
16+
License: MIT
17+
18+
Files: docker/*
19+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
20+
License: MIT
21+
22+
Files: tests/*
23+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
24+
License: MIT
25+
26+
Files: .flake8
27+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
28+
License: MIT
29+
30+
Files: .gitattributes
31+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
32+
License: MIT
33+
34+
Files: .gitignore
35+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
36+
License: MIT
37+
38+
Files: .pre-commit-config.yaml
39+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
40+
License: MIT
41+
42+
Files: AUTHORS
43+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
44+
License: MIT
45+
46+
Files: CHANGELOG.md
47+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
48+
License: MIT
49+
50+
Files: CODE_OF_CONDUCT.md
51+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
52+
License: MIT
53+
54+
Files: CONTRIBUTING.md
55+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
56+
License: MIT
57+
58+
Files: CONTRIBUTORS.md
59+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
60+
License: MIT
61+
62+
Files: LICENSE
63+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
64+
License: MIT
65+
66+
Files: pyproject.toml
67+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
68+
License: MIT
69+
70+
Files: README.rst
71+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
72+
License: MIT
73+
74+
Files: tox.ini
75+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
76+
License: MIT
77+
78+
Files: *.json
79+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
80+
License: MIT
81+
82+
Files: *.png
83+
Copyright: 2023 ANSYS, Inc. and/or its affiliates.
84+
License: MIT

.reuse/templates/ansys.jinja2

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{% for copyright_line in copyright_lines %}
2+
{{ copyright_line }}
3+
{% endfor %}
4+
{% for expression in spdx_expressions %}
5+
SPDX-License-Identifier: {{ expression }}
6+
{% endfor %}
7+
8+
9+
{% if "MIT" in spdx_expressions %}
10+
Permission is hereby granted, free of charge, to any person obtaining a copy
11+
of this software and associated documentation files (the "Software"), to deal
12+
in the Software without restriction, including without limitation the rights
13+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
copies of the Software, and to permit persons to whom the Software is
15+
furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included in all
18+
copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26+
SOFTWARE.
27+
{% endif %}

doc/source/contributing.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ This way, it's not possible for you to push code that fails the style checks::
7575
blacken-docs.............................................................Passed
7676
isort....................................................................Passed
7777
flake8...................................................................Passed
78+
docformatter.............................................................Passed
7879
codespell................................................................Passed
80+
pydocstyle...............................................................Passed
7981
check for merge conflicts................................................Passed
8082
debug statements (python)................................................Passed
83+
check yaml...............................................................Passed
84+
trim trailing whitespace.................................................Passed
85+
Add License Headers......................................................Passed
8186
Validate GitHub Workflows................................................Passed

src/ansys/geometry/core/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# Copyright (C) 2023 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
122
"""PyAnsys Geometry is a Python wrapper for the Ansys Geometry service."""
223

324
# Version

src/ansys/geometry/core/connection/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# Copyright (C) 2023 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
122
"""PyAnsys Geometry connection subpackage."""
223

324
from ansys.geometry.core.connection.backend import ApiVersions, BackendType

src/ansys/geometry/core/connection/backend.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# Copyright (C) 2023 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
122
"""Module providing definitions for the backend types."""
223
from enum import Enum, unique
324

src/ansys/geometry/core/connection/client.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# Copyright (C) 2023 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
122
"""Module providing a wrapped abstraction of the gRPC PROTO API definition and stubs."""
223

324
import logging

src/ansys/geometry/core/connection/conversions.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# Copyright (C) 2023 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
122
"""Module providing for conversions."""
223

324
from ansys.api.geometry.v0.models_pb2 import Arc as GRPCArc

src/ansys/geometry/core/connection/defaults.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# Copyright (C) 2023 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
122
"""Module providing default connection parameters."""
223

324
import os

0 commit comments

Comments
 (0)