ansys / pyadditive

Pythonic interface client to Ansys additive simulation service
https://additive.docs.pyansys.com
MIT License
2 stars 1 forks source link

`ParametricStudy.save()` has a side effect of silently changing the study file path. #301

Closed pkrull-ansys closed 5 months ago

pkrull-ansys commented 5 months ago

🔍 Before submitting the issue

🐞 Description of the bug

When ParametricStudy.save() is called and the file_name parameter does not match the current study file name (which is stored in the file_name attribute), the study is saved to file_name and the file_name attribute is set to the new file name. This is an undocumented side effect.

📝 Steps to reproduce

from ansys.additive.core.parametric_study import ParametricStudy

study = ParametricStudy("study-file")
print(study.file_name)
study.save("new-study-file")
print(study.file_name)

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

24.2

🐍 Which Python version are you using?

3.9

📦 Installed packages

n/a
pkrull-ansys commented 5 months ago

Closed by #302