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

Update to Windows data path name, and change to when examples folder is created #1615

Merged
merged 3 commits into from
May 18, 2023

Conversation

raph-luc
Copy link
Member

Resolves issue #1588 for pyfluent

Changes the point of creation of the data and examples paths from when pyfluent is first imported, to when the example files are downloaded.

In addition, before these changes Windows was saving to %LocalAppData%\ansys_fluent_core\ansys_fluent_core\example, after these changes it will save to %LocalAppData%\Ansys\ansys_fluent_core\example. The root directory %LocalAppData%\Ansys is already created when installing Ansys Fluent releases on Windows.

These changes do not influence the default data paths on Linux, only changes them on Windows.

To make things easier for CI/testing or other purposes in the future, we could make __init__.py check for an existing env variable for the data paths, like I noticed ansys/pyprimemesh does. Let me know if anyone thinks this would be useful.

I am going to suggest the same naming change to other pyansys repositories so we all potentially use the same naming scheme and root Ansys folder, and avoid cluttering the user's local app data folder on Windows (and see if they care about folders being created on import regardless of whether they will actually be used or not).

@raph-luc
Copy link
Member Author

raph-luc commented May 17, 2023

start_fluent_container() in fluent_container.py was not checking for existing directories before creating tempfile, and was failing with weird errors due to that when running the tests. Should now be fixed

edit: trying a different fix, now checking the examples_path folder exists for the docker container tests, when fluent is being launched in a docker container

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants