-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Improve PathLike support #4482
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
base: main
Are you sure you want to change the base?
Conversation
All Contributor License Agreement (CLA) signatures have been captured successfully. Thanks for contributing! |
There seem to be a couple other places this support is missing, will add. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances PathLike support across the PyFluent codebase by introducing a centralized PathType alias and updating function signatures to accept path-like objects in addition to strings. The changes enable users to pass pathlib.Path objects and other os.PathLike implementations where file paths are expected.
Key changes:
- Added a new
types.py
module with a centralizedPathType
alias for path-like objects - Updated function parameters across multiple modules to accept
PathType
instead of just strings - Added
os.fspath()
calls to convert path-like objects to strings when interfacing with underlying APIs
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/ansys/fluent/core/types.py |
New module defining PathType alias for centralized path handling |
src/ansys/fluent/core/session_utilities.py |
Updated function signatures to accept PathType for file paths |
src/ansys/fluent/core/session_pure_meshing.py |
Enhanced load_workflow method to accept PathType |
src/ansys/fluent/core/session_base_meshing.py |
Updated load_workflow method signature and implementation |
src/ansys/fluent/core/session.py |
Modified chdir method to accept PathType |
src/ansys/fluent/core/services/app_utilities.py |
Updated working directory methods to support PathType |
src/ansys/fluent/core/parametric.py |
Enhanced LocalParametricStudy constructor to accept PathType |
src/ansys/fluent/core/meshing/meshing_workflow.py |
Updated LoadWorkflow class to handle PathType |
src/ansys/fluent/core/launcher/standalone_launcher.py |
Enhanced launcher parameters to accept PathType |
src/ansys/fluent/core/launcher/slurm_launcher.py |
Updated launcher parameters for PathType support |
src/ansys/fluent/core/launcher/launcher.py |
Modified launch_fluent function to accept PathType |
src/ansys/fluent/core/filereader/case_file.py |
Updated CaseFile constructor to accept PathType |
src/ansys/fluent/core/examples/downloads.py |
Enhanced download functions to accept PathType |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
I'm getting trained up on the tutorials so am making lots of files and noticed this didn't work