From a5402f25e9e1a0d2b65919cb4692b6bde70b94de Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:05:11 +0200 Subject: [PATCH 1/6] fix: missing requirements files --- .pre-commit-config.yaml | 7 +++++++ AUTHORS | 12 ++++++++++++ CONTRIBUTORS.md | 11 +++++++++++ LICENSE | 24 ++++++++++++------------ 4 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 AUTHORS create mode 100644 CONTRIBUTORS.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b348f3f2..2c21671d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,3 +49,10 @@ repos: rev: 0.19.2 hooks: - id: check-github-workflows + +- repo: https://github.com/ansys/pre-commit-hooks + rev: v0.5.2 + hooks: + - id: add-license-headers + args: + - --start_year=2023 diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..48fe5326 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,12 @@ +# This is the list of API Eigen Example's significant contributors. +# +# This file does not necessarily list everyone who has contributed code. +# +# For contributions made under a Corporate CLA, the organization is +# added to this file. +# +# If you have contributed to the repository and want to be added to this file, +# submit a request. +# +# +ANSYS, Inc. diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 00000000..baf9d9ee --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,11 @@ +# Contributors + +## Project Lead + +* [Roberto Pastor](https://github.com/RobPasMue) + +## Individual Contributors + +* [Alexander Kaszynski](https://github.com/akaszynski) +* [Kathy Pippert](https://github.com/PipKat) +* [Maxime Rey](https://github.com/MaxJPRey) diff --git a/LICENSE b/LICENSE index ca2d50b8..3c96ad89 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2022 Roberto Pastor Muela +Copyright (c) 2023 - 2025 ANSYS, Inc. and/or its affiliates. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From a6808e8892e4b2eab2979af5a054cef2a27d2d53 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:08:13 +0200 Subject: [PATCH 2/6] fix: pre-commit --- benchmark/tests/python/__init__.py | 21 ++++++++++++++++++ benchmark/tests/python/test_grpc_python.py | 22 +++++++++++++++++++ benchmark/tests/python/test_rest_python.py | 22 +++++++++++++++++++ benchmark/tests/python/test_tools.py | 22 +++++++++++++++++++ examples/00-rest-examples/python_rest_demo.py | 22 +++++++++++++++++++ examples/01-grpc-examples/python_grpc_demo.py | 22 +++++++++++++++++++ src/ansys/eigen/cpp/cpp-clients/setup.py | 22 +++++++++++++++++++ src/ansys/eigen/cpp/eigen-wrapper/setup.py | 22 +++++++++++++++++++ src/ansys/eigen/protos/grpcdemo.proto | 22 +++++++++++++++++++ src/ansys/eigen/python/__init__.py | 21 ++++++++++++++++++ src/ansys/eigen/python/grpc/__init__.py | 21 ++++++++++++++++++ src/ansys/eigen/python/grpc/client.py | 22 +++++++++++++++++++ src/ansys/eigen/python/grpc/constants.py | 22 +++++++++++++++++++ .../eigen/python/grpc/generated/__init__.py | 21 ++++++++++++++++++ .../python/grpc/generated/grpcdemo_pb2.py | 22 +++++++++++++++++++ .../grpc/generated/grpcdemo_pb2_grpc.py | 22 +++++++++++++++++++ src/ansys/eigen/python/grpc/run_codegen.py | 3 ++- src/ansys/eigen/python/grpc/server.py | 22 +++++++++++++++++++ src/ansys/eigen/python/rest/__init__.py | 21 ++++++++++++++++++ src/ansys/eigen/python/rest/client.py | 22 +++++++++++++++++++ .../eigen/python/rest/restdb/__init__.py | 21 ++++++++++++++++++ src/ansys/eigen/python/rest/restdb/db.py | 22 +++++++++++++++++++ src/ansys/eigen/python/rest/server.py | 22 +++++++++++++++++++ src/ansys/eigen/python/testing/__init__.py | 21 ++++++++++++++++++ src/ansys/eigen/python/testing/test_tools.py | 22 +++++++++++++++++++ tests/test_eigen_wrapper.py | 22 +++++++++++++++++++ tests/test_grpc.py | 22 +++++++++++++++++++ tests/test_rest_client.py | 22 +++++++++++++++++++ tests/test_rest_server.py | 22 +++++++++++++++++++ 29 files changed, 611 insertions(+), 1 deletion(-) diff --git a/benchmark/tests/python/__init__.py b/benchmark/tests/python/__init__.py index e69de29b..919240ea 100644 --- a/benchmark/tests/python/__init__.py +++ b/benchmark/tests/python/__init__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/benchmark/tests/python/test_grpc_python.py b/benchmark/tests/python/test_grpc_python.py index 5382801b..f51a385d 100644 --- a/benchmark/tests/python/test_grpc_python.py +++ b/benchmark/tests/python/test_grpc_python.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import pytest from ansys.eigen.python.grpc.client import DemoGRPCClient diff --git a/benchmark/tests/python/test_rest_python.py b/benchmark/tests/python/test_rest_python.py index 240858a2..6e50a66c 100644 --- a/benchmark/tests/python/test_rest_python.py +++ b/benchmark/tests/python/test_rest_python.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import pytest from ansys.eigen.python.rest.client import DemoRESTClient diff --git a/benchmark/tests/python/test_tools.py b/benchmark/tests/python/test_tools.py index f4a0d7cf..a7d390e6 100644 --- a/benchmark/tests/python/test_tools.py +++ b/benchmark/tests/python/test_tools.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Tools for BM tests """ from random import random, seed diff --git a/examples/00-rest-examples/python_rest_demo.py b/examples/00-rest-examples/python_rest_demo.py index 1dd37f5a..65cb1a64 100644 --- a/examples/00-rest-examples/python_rest_demo.py +++ b/examples/00-rest-examples/python_rest_demo.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ .. _ref_rest_demo_python: diff --git a/examples/01-grpc-examples/python_grpc_demo.py b/examples/01-grpc-examples/python_grpc_demo.py index f1e65e5a..63426216 100644 --- a/examples/01-grpc-examples/python_grpc_demo.py +++ b/examples/01-grpc-examples/python_grpc_demo.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ .. _ref_grpc_demo_python: diff --git a/src/ansys/eigen/cpp/cpp-clients/setup.py b/src/ansys/eigen/cpp/cpp-clients/setup.py index b1c4499c..8f4a957a 100644 --- a/src/ansys/eigen/cpp/cpp-clients/setup.py +++ b/src/ansys/eigen/cpp/cpp-clients/setup.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import os import re import subprocess diff --git a/src/ansys/eigen/cpp/eigen-wrapper/setup.py b/src/ansys/eigen/cpp/eigen-wrapper/setup.py index 9708651c..075030af 100644 --- a/src/ansys/eigen/cpp/eigen-wrapper/setup.py +++ b/src/ansys/eigen/cpp/eigen-wrapper/setup.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import os import re import subprocess diff --git a/src/ansys/eigen/protos/grpcdemo.proto b/src/ansys/eigen/protos/grpcdemo.proto index 84885f4c..fbb1aac7 100644 --- a/src/ansys/eigen/protos/grpcdemo.proto +++ b/src/ansys/eigen/protos/grpcdemo.proto @@ -1,3 +1,25 @@ +// Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +// SPDX-License-Identifier: MIT +// +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + syntax = "proto3"; package grpcdemo; diff --git a/src/ansys/eigen/python/__init__.py b/src/ansys/eigen/python/__init__.py index e69de29b..919240ea 100644 --- a/src/ansys/eigen/python/__init__.py +++ b/src/ansys/eigen/python/__init__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/src/ansys/eigen/python/grpc/__init__.py b/src/ansys/eigen/python/grpc/__init__.py index e69de29b..919240ea 100644 --- a/src/ansys/eigen/python/grpc/__init__.py +++ b/src/ansys/eigen/python/grpc/__init__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/src/ansys/eigen/python/grpc/client.py b/src/ansys/eigen/python/grpc/client.py index 069d37c3..c780ea9f 100644 --- a/src/ansys/eigen/python/grpc/client.py +++ b/src/ansys/eigen/python/grpc/client.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Python implementation of the gRPC API Eigen Example client.""" import grpc diff --git a/src/ansys/eigen/python/grpc/constants.py b/src/ansys/eigen/python/grpc/constants.py index d2241f51..0df39da9 100644 --- a/src/ansys/eigen/python/grpc/constants.py +++ b/src/ansys/eigen/python/grpc/constants.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Python script for storing common constants for both gRPC server and client.""" from math import floor diff --git a/src/ansys/eigen/python/grpc/generated/__init__.py b/src/ansys/eigen/python/grpc/generated/__init__.py index e69de29b..919240ea 100644 --- a/src/ansys/eigen/python/grpc/generated/__init__.py +++ b/src/ansys/eigen/python/grpc/generated/__init__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2.py b/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2.py index 63d8cd8d..5ec40325 100644 --- a/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2.py +++ b/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grpcdemo.proto diff --git a/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2_grpc.py b/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2_grpc.py index 4abee8d3..f4588b82 100644 --- a/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2_grpc.py +++ b/src/ansys/eigen/python/grpc/generated/grpcdemo_pb2_grpc.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/src/ansys/eigen/python/grpc/run_codegen.py b/src/ansys/eigen/python/grpc/run_codegen.py index e714d19d..749d3110 100644 --- a/src/ansys/eigen/python/grpc/run_codegen.py +++ b/src/ansys/eigen/python/grpc/run_codegen.py @@ -1,5 +1,6 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. # Copyright 2015 gRPC authors. -# + # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/src/ansys/eigen/python/grpc/server.py b/src/ansys/eigen/python/grpc/server.py index 203912c6..1782f13c 100644 --- a/src/ansys/eigen/python/grpc/server.py +++ b/src/ansys/eigen/python/grpc/server.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Python implementation of the gRPC API Eigen example server.""" from concurrent import futures diff --git a/src/ansys/eigen/python/rest/__init__.py b/src/ansys/eigen/python/rest/__init__.py index e69de29b..919240ea 100644 --- a/src/ansys/eigen/python/rest/__init__.py +++ b/src/ansys/eigen/python/rest/__init__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/src/ansys/eigen/python/rest/client.py b/src/ansys/eigen/python/rest/client.py index 3dc69855..c85698d8 100644 --- a/src/ansys/eigen/python/rest/client.py +++ b/src/ansys/eigen/python/rest/client.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Python implementation of the REST API Eigen example client.""" import json diff --git a/src/ansys/eigen/python/rest/restdb/__init__.py b/src/ansys/eigen/python/rest/restdb/__init__.py index e69de29b..919240ea 100644 --- a/src/ansys/eigen/python/rest/restdb/__init__.py +++ b/src/ansys/eigen/python/rest/restdb/__init__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/src/ansys/eigen/python/rest/restdb/db.py b/src/ansys/eigen/python/rest/restdb/db.py index c1e0d48d..1e4806c5 100644 --- a/src/ansys/eigen/python/rest/restdb/db.py +++ b/src/ansys/eigen/python/rest/restdb/db.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Python implementation of the REST API Eigen example database.""" import os diff --git a/src/ansys/eigen/python/rest/server.py b/src/ansys/eigen/python/rest/server.py index 0b6a5355..05c02458 100644 --- a/src/ansys/eigen/python/rest/server.py +++ b/src/ansys/eigen/python/rest/server.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Python implementation of the REST API Eigen example server.""" import json diff --git a/src/ansys/eigen/python/testing/__init__.py b/src/ansys/eigen/python/testing/__init__.py index e69de29b..919240ea 100644 --- a/src/ansys/eigen/python/testing/__init__.py +++ b/src/ansys/eigen/python/testing/__init__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. diff --git a/src/ansys/eigen/python/testing/test_tools.py b/src/ansys/eigen/python/testing/test_tools.py index bb6f6bd5..c86db066 100644 --- a/src/ansys/eigen/python/testing/test_tools.py +++ b/src/ansys/eigen/python/testing/test_tools.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """Tools for tests """ from random import random, seed diff --git a/tests/test_eigen_wrapper.py b/tests/test_eigen_wrapper.py index b89b7bec..15c813a8 100644 --- a/tests/test_eigen_wrapper.py +++ b/tests/test_eigen_wrapper.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import demo_eigen_wrapper import numpy as np diff --git a/tests/test_grpc.py b/tests/test_grpc.py index 0973c067..5729dc97 100644 --- a/tests/test_grpc.py +++ b/tests/test_grpc.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import numpy as np import pytest diff --git a/tests/test_rest_client.py b/tests/test_rest_client.py index c63a3a38..bc944604 100644 --- a/tests/test_rest_client.py +++ b/tests/test_rest_client.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import numpy as np import pytest diff --git a/tests/test_rest_server.py b/tests/test_rest_server.py index ec78ab26..e2b8ab78 100644 --- a/tests/test_rest_server.py +++ b/tests/test_rest_server.py @@ -1,3 +1,25 @@ +# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + import json import numpy as np From ec3b859f8ac16a4fdfaebd418a9d629c5ac4c8ff Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:14:38 +0200 Subject: [PATCH 3/6] fix: minimum CMAKE version --- benchmark/tests/cpp/CMakeLists.txt | 2 +- src/ansys/eigen/cpp/cpp-clients/CMakeLists.txt | 2 +- src/ansys/eigen/cpp/eigen-wrapper/CMakeLists.txt | 2 +- src/ansys/eigen/cpp/grpc/client/CMakeLists.txt | 2 +- src/ansys/eigen/cpp/grpc/server/CMakeLists.txt | 2 +- src/ansys/eigen/cpp/rest/client/CMakeLists.txt | 2 +- src/ansys/eigen/cpp/rest/server/CMakeLists.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmark/tests/cpp/CMakeLists.txt b/benchmark/tests/cpp/CMakeLists.txt index 223350c7..23941923 100644 --- a/benchmark/tests/cpp/CMakeLists.txt +++ b/benchmark/tests/cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4...3.18) +cmake_minimum_required(VERSION 3.6...3.18) project(bm_api_eigen_example_tests VERSION 1.0 DESCRIPTION "The API Eigen Example project BM tests for C++") # Specify the C++ standard diff --git a/src/ansys/eigen/cpp/cpp-clients/CMakeLists.txt b/src/ansys/eigen/cpp/cpp-clients/CMakeLists.txt index af4cb795..84bfe01f 100644 --- a/src/ansys/eigen/cpp/cpp-clients/CMakeLists.txt +++ b/src/ansys/eigen/cpp/cpp-clients/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4...3.18) +cmake_minimum_required(VERSION 3.6...3.18) project(eigen_cpp_client) # Specify the C++ standard diff --git a/src/ansys/eigen/cpp/eigen-wrapper/CMakeLists.txt b/src/ansys/eigen/cpp/eigen-wrapper/CMakeLists.txt index 7c25478d..4f47a434 100644 --- a/src/ansys/eigen/cpp/eigen-wrapper/CMakeLists.txt +++ b/src/ansys/eigen/cpp/eigen-wrapper/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4...3.18) +cmake_minimum_required(VERSION 3.6...3.18) project(demo_eigen_wrapper) # Add the Eigen library to the CMake project - after being installed as "sudo apt libeigen3dev" diff --git a/src/ansys/eigen/cpp/grpc/client/CMakeLists.txt b/src/ansys/eigen/cpp/grpc/client/CMakeLists.txt index c76d93fa..91f63a23 100644 --- a/src/ansys/eigen/cpp/grpc/client/CMakeLists.txt +++ b/src/ansys/eigen/cpp/grpc/client/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4...3.18) +cmake_minimum_required(VERSION 3.6...3.18) project(api_eigen_example_grpc_client VERSION 1.0 DESCRIPTION "The API Eigen Example project gRPC client implemented in C++") # Specify the C++ standard diff --git a/src/ansys/eigen/cpp/grpc/server/CMakeLists.txt b/src/ansys/eigen/cpp/grpc/server/CMakeLists.txt index aedbd525..2b27d879 100644 --- a/src/ansys/eigen/cpp/grpc/server/CMakeLists.txt +++ b/src/ansys/eigen/cpp/grpc/server/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4...3.18) +cmake_minimum_required(VERSION 3.6...3.18) project(api_eigen_example_grpc_server VERSION 1.0 DESCRIPTION "The API Eigen Example project gRPC server implemented in C++") # Specify the C++ standard diff --git a/src/ansys/eigen/cpp/rest/client/CMakeLists.txt b/src/ansys/eigen/cpp/rest/client/CMakeLists.txt index 87463a6d..3a40ebef 100644 --- a/src/ansys/eigen/cpp/rest/client/CMakeLists.txt +++ b/src/ansys/eigen/cpp/rest/client/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4...3.18) +cmake_minimum_required(VERSION 3.6...3.18) project(api_eigen_example_rest_client VERSION 1.0 DESCRIPTION "The API Eigen Example project REST client implemented in C++") # Specify the C++ standard diff --git a/src/ansys/eigen/cpp/rest/server/CMakeLists.txt b/src/ansys/eigen/cpp/rest/server/CMakeLists.txt index 19e1dfde..3b22bd60 100644 --- a/src/ansys/eigen/cpp/rest/server/CMakeLists.txt +++ b/src/ansys/eigen/cpp/rest/server/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4...3.18) +cmake_minimum_required(VERSION 3.6...3.18) project(api_eigen_example_rest_server VERSION 1.0 DESCRIPTION "The API Eigen Example project REST server implemented in C++") # Specify the C++ standard From 91c2a5134092e284a8087174dc99730f38085791 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:22:38 +0200 Subject: [PATCH 4/6] fix: conan version --- src/ansys/eigen/cpp/grpc/client/conanfile.txt | 3 +++ src/ansys/eigen/cpp/grpc/server/conanfile.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/ansys/eigen/cpp/grpc/client/conanfile.txt b/src/ansys/eigen/cpp/grpc/client/conanfile.txt index c0167017..683722ee 100644 --- a/src/ansys/eigen/cpp/grpc/client/conanfile.txt +++ b/src/ansys/eigen/cpp/grpc/client/conanfile.txt @@ -1,6 +1,9 @@ [requires] grpc/1.39.1 +[tool_requires] +cmake/3.21.0 + [generators] cmake deploy diff --git a/src/ansys/eigen/cpp/grpc/server/conanfile.txt b/src/ansys/eigen/cpp/grpc/server/conanfile.txt index c8552680..8c0f38cf 100644 --- a/src/ansys/eigen/cpp/grpc/server/conanfile.txt +++ b/src/ansys/eigen/cpp/grpc/server/conanfile.txt @@ -2,6 +2,9 @@ grpc/1.39.1 eigen/3.4.0 +[tool_requires] +cmake/3.21.0 + [generators] cmake deploy From f60cd3fb2814facd662d22460f55985eebf6ac47 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:25:51 +0200 Subject: [PATCH 5/6] fix: add override --- src/ansys/eigen/cpp/grpc/client/conanfile.txt | 3 +++ src/ansys/eigen/cpp/grpc/server/conanfile.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/ansys/eigen/cpp/grpc/client/conanfile.txt b/src/ansys/eigen/cpp/grpc/client/conanfile.txt index 683722ee..66a08c6b 100644 --- a/src/ansys/eigen/cpp/grpc/client/conanfile.txt +++ b/src/ansys/eigen/cpp/grpc/client/conanfile.txt @@ -11,3 +11,6 @@ deploy [imports] bin, protoc* -> . @ root_package=protobuf bin, grpc_cpp_plugin -> . @ root_package=grpc + +[overrides] +openssl/1.1.1n diff --git a/src/ansys/eigen/cpp/grpc/server/conanfile.txt b/src/ansys/eigen/cpp/grpc/server/conanfile.txt index 8c0f38cf..95d7ad72 100644 --- a/src/ansys/eigen/cpp/grpc/server/conanfile.txt +++ b/src/ansys/eigen/cpp/grpc/server/conanfile.txt @@ -13,3 +13,6 @@ deploy bin, protoc* -> . @ root_package=protobuf bin, grpc_cpp_plugin -> . @ root_package=grpc bin, eigen* -> . @ root_package=eigen + +[overrides] +openssl/1.1.1n From ebc8c23b8b70ea520278414c0b6da491da0cf676 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:28:27 +0200 Subject: [PATCH 6/6] fix: revert conanfiles --- src/ansys/eigen/cpp/grpc/client/conanfile.txt | 6 ------ src/ansys/eigen/cpp/grpc/server/conanfile.txt | 6 ------ 2 files changed, 12 deletions(-) diff --git a/src/ansys/eigen/cpp/grpc/client/conanfile.txt b/src/ansys/eigen/cpp/grpc/client/conanfile.txt index 66a08c6b..c0167017 100644 --- a/src/ansys/eigen/cpp/grpc/client/conanfile.txt +++ b/src/ansys/eigen/cpp/grpc/client/conanfile.txt @@ -1,9 +1,6 @@ [requires] grpc/1.39.1 -[tool_requires] -cmake/3.21.0 - [generators] cmake deploy @@ -11,6 +8,3 @@ deploy [imports] bin, protoc* -> . @ root_package=protobuf bin, grpc_cpp_plugin -> . @ root_package=grpc - -[overrides] -openssl/1.1.1n diff --git a/src/ansys/eigen/cpp/grpc/server/conanfile.txt b/src/ansys/eigen/cpp/grpc/server/conanfile.txt index 95d7ad72..c8552680 100644 --- a/src/ansys/eigen/cpp/grpc/server/conanfile.txt +++ b/src/ansys/eigen/cpp/grpc/server/conanfile.txt @@ -2,9 +2,6 @@ grpc/1.39.1 eigen/3.4.0 -[tool_requires] -cmake/3.21.0 - [generators] cmake deploy @@ -13,6 +10,3 @@ deploy bin, protoc* -> . @ root_package=protobuf bin, grpc_cpp_plugin -> . @ root_package=grpc bin, eigen* -> . @ root_package=eigen - -[overrides] -openssl/1.1.1n