Update to Windows data path name, and change to when examples folder is created #1615
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 noticedansys/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).