From 0de50975b3e3592f82f848fef22331cac978e551 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 08:56:11 +0000 Subject: [PATCH 1/4] Initial plan From 8e3e979ccd2b06480eca73691858649bfeb743ba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 08:56:51 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- LICENSE | 2 +- examples/cfx_static_mixer/exec_cfx.py | 2 +- examples/cfx_static_mixer/project_setup.py | 2 +- .../fluent_2d_heat_exchanger/project_setup.py | 2 +- examples/fluent_nozzle/project_setup.py | 2 +- examples/generic_api/project_setup.py | 2 +- examples/lsdyna_cylinder_plate/lsdyna_job.py | 2 +- .../mapdl_linked_analyses/project_setup.py | 2 +- examples/mapdl_motorbike_frame/exec_mapdl.py | 2 +- .../mapdl_motorbike_frame/project_query.py | 2 +- .../mapdl_motorbike_frame/project_setup.py | 2 +- examples/mapdl_motorbike_frame/task_files.py | 2 +- .../mapdl_tyre_performance/project_setup.py | 2 +- examples/python_large_output/evaluate.py | 2 +- examples/python_large_output/exec_python.py | 2 +- examples/python_large_output/project_setup.py | 2 +- .../python_linked_multi_process_step/eval.py | 2 +- .../project_setup.py | 2 +- examples/python_multi_process_step/eval.py | 2 +- .../project_setup.py | 2 +- .../python_multi_process_step/task_files.py | 2 +- .../python_two_bar_truss_problem/evaluate.py | 2 +- .../exec_python.py | 2 +- .../project_setup.py | 2 +- generate_resources.py | 2 +- oidc_pkce.py | 22 +++++++------------ src/ansys/hps/client/__init__.py | 2 +- src/ansys/hps/client/__version__.py | 2 +- src/ansys/hps/client/auth/__init__.py | 2 +- src/ansys/hps/client/auth/api/__init__.py | 2 +- src/ansys/hps/client/auth/api/auth_api.py | 2 +- .../hps/client/auth/resource/__init__.py | 2 +- src/ansys/hps/client/auth/resource/user.py | 2 +- src/ansys/hps/client/auth/schema/__init__.py | 2 +- src/ansys/hps/client/auth/schema/user.py | 2 +- src/ansys/hps/client/authenticate.py | 2 +- src/ansys/hps/client/check_version.py | 2 +- src/ansys/hps/client/client.py | 2 +- src/ansys/hps/client/common/__init__.py | 2 +- src/ansys/hps/client/common/base_resource.py | 2 +- src/ansys/hps/client/common/base_schema.py | 2 +- src/ansys/hps/client/common/dict_model.py | 2 +- .../hps/client/common/restricted_value.py | 2 +- src/ansys/hps/client/connection.py | 2 +- src/ansys/hps/client/exceptions.py | 2 +- src/ansys/hps/client/jms/__init__.py | 2 +- src/ansys/hps/client/jms/api/__init__.py | 2 +- src/ansys/hps/client/jms/api/base.py | 2 +- src/ansys/hps/client/jms/api/jms_api.py | 2 +- src/ansys/hps/client/jms/api/project_api.py | 2 +- src/ansys/hps/client/jms/keys.py | 2 +- src/ansys/hps/client/jms/resource/__init__.py | 2 +- .../hps/client/jms/resource/algorithm.py | 2 +- src/ansys/hps/client/jms/resource/file.py | 2 +- .../client/jms/resource/fitness_definition.py | 2 +- src/ansys/hps/client/jms/resource/job.py | 2 +- .../hps/client/jms/resource/job_definition.py | 2 +- .../client/jms/resource/license_context.py | 2 +- .../hps/client/jms/resource/operation.py | 2 +- .../jms/resource/parameter_definition.py | 2 +- .../client/jms/resource/parameter_mapping.py | 2 +- .../hps/client/jms/resource/permission.py | 2 +- src/ansys/hps/client/jms/resource/project.py | 2 +- .../hps/client/jms/resource/selection.py | 2 +- src/ansys/hps/client/jms/resource/task.py | 2 +- .../hps/client/jms/resource/task_command.py | 2 +- .../jms/resource/task_command_definition.py | 2 +- .../client/jms/resource/task_definition.py | 2 +- .../jms/resource/task_definition_template.py | 2 +- src/ansys/hps/client/jms/schema/__init__.py | 2 +- src/ansys/hps/client/jms/schema/algorithm.py | 2 +- src/ansys/hps/client/jms/schema/file.py | 2 +- .../client/jms/schema/fitness_definition.py | 2 +- src/ansys/hps/client/jms/schema/job.py | 2 +- .../hps/client/jms/schema/job_definition.py | 2 +- .../hps/client/jms/schema/license_context.py | 2 +- .../hps/client/jms/schema/object_reference.py | 2 +- src/ansys/hps/client/jms/schema/operation.py | 2 +- .../client/jms/schema/parameter_definition.py | 2 +- .../client/jms/schema/parameter_mapping.py | 2 +- src/ansys/hps/client/jms/schema/permission.py | 2 +- src/ansys/hps/client/jms/schema/project.py | 2 +- src/ansys/hps/client/jms/schema/selection.py | 2 +- src/ansys/hps/client/jms/schema/task.py | 2 +- .../hps/client/jms/schema/task_command.py | 2 +- .../jms/schema/task_command_definition.py | 2 +- .../hps/client/jms/schema/task_definition.py | 2 +- .../jms/schema/task_definition_template.py | 2 +- src/ansys/hps/client/rms/__init__.py | 2 +- src/ansys/hps/client/rms/api/__init__.py | 2 +- src/ansys/hps/client/rms/api/base.py | 2 +- src/ansys/hps/client/rms/api/rms_api.py | 2 +- src/ansys/hps/client/rms/models.py | 2 +- src/ansys/hps/client/warnings.py | 2 +- tests/__init__.py | 2 +- tests/auth/__init__.py | 2 +- tests/auth/test_api.py | 2 +- tests/auth/test_authenticate.py | 2 +- tests/conftest.py | 2 +- tests/jms/__init__.py | 2 +- tests/jms/test_algorithms.py | 2 +- tests/jms/test_files.py | 2 +- tests/jms/test_fitness_definition.py | 2 +- tests/jms/test_jms_api.py | 2 +- tests/jms/test_job_definitions.py | 2 +- tests/jms/test_jobs.py | 2 +- tests/jms/test_models.py | 2 +- tests/jms/test_parameter_definitions.py | 2 +- tests/jms/test_project_permissions.py | 2 +- tests/jms/test_projects.py | 2 +- tests/jms/test_resources.py | 2 +- tests/jms/test_task_commands.py | 2 +- tests/jms/test_task_definition.py | 2 +- tests/jms/test_task_definition_templates.py | 2 +- tests/jms/test_task_files.py | 2 +- tests/jms/test_tasks.py | 2 +- tests/rms/__init__.py | 2 +- tests/rms/test_api.py | 2 +- tests/rms/test_compute_resource_sets.py | 2 +- tests/rms/test_evaluators.py | 2 +- tests/rms/test_models.py | 2 +- tests/rms/test_serialization.py | 2 +- tests/test_check_versions.py | 2 +- tests/test_client.py | 2 +- tests/test_connection.py | 2 +- tests/test_examples.py | 2 +- tests/test_exceptions.py | 2 +- tests/test_services.py | 2 +- tests/utils.py | 2 +- 129 files changed, 136 insertions(+), 142 deletions(-) diff --git a/LICENSE b/LICENSE index e40f17b8d..d74618a4e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +Copyright (c) 2022 - 2026 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 diff --git a/examples/cfx_static_mixer/exec_cfx.py b/examples/cfx_static_mixer/exec_cfx.py index 330646fd2..72bfa7d6e 100644 --- a/examples/cfx_static_mixer/exec_cfx.py +++ b/examples/cfx_static_mixer/exec_cfx.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/cfx_static_mixer/project_setup.py b/examples/cfx_static_mixer/project_setup.py index 7d2b76dd9..f8b95d657 100644 --- a/examples/cfx_static_mixer/project_setup.py +++ b/examples/cfx_static_mixer/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/fluent_2d_heat_exchanger/project_setup.py b/examples/fluent_2d_heat_exchanger/project_setup.py index 94a81a1b4..5aa51507c 100644 --- a/examples/fluent_2d_heat_exchanger/project_setup.py +++ b/examples/fluent_2d_heat_exchanger/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/fluent_nozzle/project_setup.py b/examples/fluent_nozzle/project_setup.py index 944d6dbb9..da663120d 100644 --- a/examples/fluent_nozzle/project_setup.py +++ b/examples/fluent_nozzle/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/generic_api/project_setup.py b/examples/generic_api/project_setup.py index a1cc22387..c8415fe3d 100644 --- a/examples/generic_api/project_setup.py +++ b/examples/generic_api/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/lsdyna_cylinder_plate/lsdyna_job.py b/examples/lsdyna_cylinder_plate/lsdyna_job.py index dad2e0bc3..8c42da85f 100644 --- a/examples/lsdyna_cylinder_plate/lsdyna_job.py +++ b/examples/lsdyna_cylinder_plate/lsdyna_job.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/mapdl_linked_analyses/project_setup.py b/examples/mapdl_linked_analyses/project_setup.py index bc24cd481..ca2f0b79c 100644 --- a/examples/mapdl_linked_analyses/project_setup.py +++ b/examples/mapdl_linked_analyses/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/mapdl_motorbike_frame/exec_mapdl.py b/examples/mapdl_motorbike_frame/exec_mapdl.py index d177c32ab..a51b07d62 100644 --- a/examples/mapdl_motorbike_frame/exec_mapdl.py +++ b/examples/mapdl_motorbike_frame/exec_mapdl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/mapdl_motorbike_frame/project_query.py b/examples/mapdl_motorbike_frame/project_query.py index 242bea64a..9721cf2a9 100644 --- a/examples/mapdl_motorbike_frame/project_query.py +++ b/examples/mapdl_motorbike_frame/project_query.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/mapdl_motorbike_frame/project_setup.py b/examples/mapdl_motorbike_frame/project_setup.py index 1b03d68bb..d036ae7e5 100644 --- a/examples/mapdl_motorbike_frame/project_setup.py +++ b/examples/mapdl_motorbike_frame/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/mapdl_motorbike_frame/task_files.py b/examples/mapdl_motorbike_frame/task_files.py index 8c820eae6..5f518f0f9 100644 --- a/examples/mapdl_motorbike_frame/task_files.py +++ b/examples/mapdl_motorbike_frame/task_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/mapdl_tyre_performance/project_setup.py b/examples/mapdl_tyre_performance/project_setup.py index d8b9bcbd2..c79d1702e 100644 --- a/examples/mapdl_tyre_performance/project_setup.py +++ b/examples/mapdl_tyre_performance/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_large_output/evaluate.py b/examples/python_large_output/evaluate.py index a6dbdf227..72bd8812c 100644 --- a/examples/python_large_output/evaluate.py +++ b/examples/python_large_output/evaluate.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_large_output/exec_python.py b/examples/python_large_output/exec_python.py index ca24ae468..fdebb9977 100644 --- a/examples/python_large_output/exec_python.py +++ b/examples/python_large_output/exec_python.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_large_output/project_setup.py b/examples/python_large_output/project_setup.py index 07a0a5314..865ae59c1 100644 --- a/examples/python_large_output/project_setup.py +++ b/examples/python_large_output/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_linked_multi_process_step/eval.py b/examples/python_linked_multi_process_step/eval.py index 9ab0c0b49..feafee118 100644 --- a/examples/python_linked_multi_process_step/eval.py +++ b/examples/python_linked_multi_process_step/eval.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_linked_multi_process_step/project_setup.py b/examples/python_linked_multi_process_step/project_setup.py index c5a52daf1..e41f174e7 100644 --- a/examples/python_linked_multi_process_step/project_setup.py +++ b/examples/python_linked_multi_process_step/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_multi_process_step/eval.py b/examples/python_multi_process_step/eval.py index beab09a95..7c09d6f07 100644 --- a/examples/python_multi_process_step/eval.py +++ b/examples/python_multi_process_step/eval.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_multi_process_step/project_setup.py b/examples/python_multi_process_step/project_setup.py index 8d7374524..e33df8d2e 100644 --- a/examples/python_multi_process_step/project_setup.py +++ b/examples/python_multi_process_step/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_multi_process_step/task_files.py b/examples/python_multi_process_step/task_files.py index 18aa13883..8e7390292 100644 --- a/examples/python_multi_process_step/task_files.py +++ b/examples/python_multi_process_step/task_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_two_bar_truss_problem/evaluate.py b/examples/python_two_bar_truss_problem/evaluate.py index b02929e4e..6b38d3841 100644 --- a/examples/python_two_bar_truss_problem/evaluate.py +++ b/examples/python_two_bar_truss_problem/evaluate.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_two_bar_truss_problem/exec_python.py b/examples/python_two_bar_truss_problem/exec_python.py index ca24ae468..fdebb9977 100644 --- a/examples/python_two_bar_truss_problem/exec_python.py +++ b/examples/python_two_bar_truss_problem/exec_python.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/python_two_bar_truss_problem/project_setup.py b/examples/python_two_bar_truss_problem/project_setup.py index 0b85eacb3..9c2fd7157 100644 --- a/examples/python_two_bar_truss_problem/project_setup.py +++ b/examples/python_two_bar_truss_problem/project_setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/generate_resources.py b/generate_resources.py index da8eb167d..7b1ea44ef 100644 --- a/generate_resources.py +++ b/generate_resources.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/oidc_pkce.py b/oidc_pkce.py index 69fb4b9b2..6217ebcb7 100644 --- a/oidc_pkce.py +++ b/oidc_pkce.py @@ -1,5 +1,4 @@ -""" -Script to demonstrate how to authenticate with an OIDC provider +"""Script to demonstrate how to authenticate with an OIDC provider using the Authorization Code Flow with PKCE. Mostly inspired by: @@ -10,13 +9,13 @@ import argparse import base64 import hashlib -from http.server import BaseHTTPRequestHandler, HTTPServer import os import re import socket +import webbrowser +from http.server import BaseHTTPRequestHandler, HTTPServer from typing import Any from urllib import parse -import webbrowser import requests from requests import Request @@ -30,7 +29,6 @@ def __init__(self, *args, **kwargs): class OAuthHttpHandler(BaseHTTPRequestHandler): def do_GET(self): - parsed = parse.urlparse(self.path) qs = parse.parse_qs(parsed.query) self.server.authorization_code = qs["code"][0] @@ -38,7 +36,7 @@ def do_GET(self): self.send_response(200) self.send_header("Content-Type", "text/html") self.end_headers() - html_body = """ + html_body = b"""