Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort uses absolute value #407

Open
2 tasks done
ansAFinney opened this issue May 28, 2024 · 1 comment
Open
2 tasks done

sort uses absolute value #407

ansAFinney opened this issue May 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ansAFinney
Copy link

ansAFinney commented May 28, 2024

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

sorting of jobs by values of parameters appears to be a sort of the absolute value of the parameter

📝 Steps to reproduce

run the mapdl tyre performance example

then run

from ansys.hps.client import Client, ProjectApi, JmsApi

cl = Client(url="https://localhost:8443/hps", username="repadmin", password="repadmin")
project = JmsApi(cl).get_project_by_name("Mapdl Tyre Performance")
api = ProjectApi(cl, project.id)

jobs = api.get_jobs(sort=["values.camber_angle"])

for job in jobs:
    print(f"camber_angle={job.values.get('camber_angle')}")

I see the result:

camber_angle=-0.6210272318289807
camber_angle=-1.5805662839207688
camber_angle=-3.1016291869012953
camber_angle=-3.249789124629034
camber_angle=-4.319690094308141
camber_angle=4.711344868950986
camber_angle=5.9100341893208554
camber_angle=-6.908193726448891
camber_angle=6.94445083678146
camber_angle=-7.957747421556585

The HPS server is running in WSL with the client and product running in native windows.

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

ansys hps client == 0.8.0
mapdl is 24r1
image

🐍 Which Python version are you using?

3.10

📦 Installed packages

annotated-types==0.6.0
ansys-hps-client==0.8.0
ansys-pyhps==0.6.0
backoff==2.2.1
certifi==2024.2.2
charset-normalizer==3.3.2
ecdsa==0.18.0
idna==3.6
# Editable install with no version control (mapdl-tyre-performance==0.1.0)
-e c:\ansysdev\mapdl_tyre_performance
marshmallow==3.21.1
marshmallow-oneofschema==3.1.1
packaging==24.0
pyasn1==0.6.0
pydantic==2.6.4
pydantic_core==2.16.3
PyJWT==2.8.0
python-jose==3.3.0
python-keycloak==2.12.0
requests==2.31.0
requests-toolbelt==0.9.1
rsa==4.9
six==1.16.0
typing_extensions==4.10.0
urllib3==1.26.18
@ansAFinney ansAFinney added the bug Something isn't working label May 28, 2024
@FedericoNegri
Copy link
Contributor

FedericoNegri commented May 29, 2024

@ansAFinney thanks for reporting. I could reproduce it, also in the web ui. It's a server bug, will update this issue once it gets resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants