-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rename file name and path #2131
Conversation
Should we add Vale will then flag occurrences as errors. |
I think it's responsibility of every developer to follow existing naming convention for naming of arguments in future. We should not try to add all such names in Here is an example - |
@hpohekar That is a great point, thanks. Note that |
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.
A few filename
s that you might've missed (if you are already working on these, ignore me):
list
doc/settings_rstgen.py:15: --- Use the filename of the child class to generate the hyperlink to that class.
doc/source/api/general/data_transfer.rst:26: >>> mesh_filename = download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")
doc/source/api/general/data_transfer.rst:28: >>> pure_meshing_session.tui.file.read_mesh(import_filename)
doc/source/api/general/fielddata.rst:20: >>> import_filename = examples.download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")
doc/source/api/general/fielddata.rst:22: >>> solver.file.read(file_type="case", file_name=import_filename)
doc/source/api/meshing/index.rst:60: "FileName": import_filename,
doc/source/api/solver/settings.rst:241: >>> import_filename = examples.download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")
doc/source/api/solver/settings.rst:243: >>> solver.file.read(file_type="case", file_name=import_filename)
doc/source/conf.py:90:# The suffix(es) of source filenames.
doc/source/conf.py:146: "filename_pattern": r"\.py",
doc/source/examples/00-fluent/exhaust_system.py:51:import_filename = examples.download_file(
doc/source/examples/00-fluent/exhaust_system.py:82: FilePath=import_filename, IgnoreSolidNames=False, PartPerBody=False
doc/source/examples/00-fluent/exhaust_system.py:102: "FMDFileName": import_filename,
doc/source/examples/00-fluent/exhaust_system.rst:74: import_filename = examples.download_file(
doc/source/examples/00-fluent/exhaust_system.rst:158: FilePath=import_filename, IgnoreSolidNames=False, PartPerBody=False
doc/source/examples/00-fluent/exhaust_system.rst:178: "FMDFileName": import_filename,
doc/source/examples/00-fluent/mixing_elbow.py:48:import_filename = examples.download_file("mixing_elbow.pmdb", "pyfluent/mixing_elbow")
doc/source/examples/00-fluent/mixing_elbow.py:78: "FileName": import_filename,
doc/source/examples/00-fluent/mixing_elbow.rst:71: import_filename = examples.download_file("mixing_elbow.pmdb", "pyfluent/mixing_elbow")
doc/source/examples/00-fluent/mixing_elbow.rst:154: "FileName": import_filename,
doc/source/examples/00-fluent/mixing_elbow_settings_api.py:32:import_filename = examples.download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")
doc/source/examples/00-fluent/mixing_elbow_settings_api.py:51:solver.file.read(file_type="case", file_name=import_filename)
doc/source/examples/00-fluent/mixing_elbow_settings_api.rst:55: import_filename = examples.download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")
doc/source/examples/00-fluent/mixing_elbow_settings_api.rst:114: solver.file.read(file_type="case", file_name=import_filename)
doc/source/user_guide/meshing_workflows.rst:20: import_filename = examples.download_file('mixing_elbow.pmdb', 'pyfluent/mixing_elbow')
doc/source/user_guide/meshing_workflows.rst:26: 'FileName': import_filename, 'LengthUnit': 'in'
doc/source/user_guide/meshing_workflows.rst:127: import_filename = examples.download_file(
doc/source/user_guide/meshing_workflows.rst:133: FilePath=import_filename, IgnoreSolidNames=False, PartPerBody=False
doc/source/user_guide/meshing_workflows.rst:150: "FMDFileName": import_filename,
doc/source/user_guide/meshing_workflows.rst:583: import_filename = examples.download_file("mixing_elbow.pmdb", "pyfluent/mixing_elbow")
examples/00-fluent/exhaust_system.py:51:import_filename = examples.download_file(
examples/00-fluent/exhaust_system.py:82: FilePath=import_filename, IgnoreSolidNames=False, PartPerBody=False
examples/00-fluent/exhaust_system.py:102: "FMDFileName": import_filename,
examples/00-fluent/mixing_elbow.py:48:import_filename = examples.download_file("mixing_elbow.pmdb", "pyfluent/mixing_elbow")
examples/00-fluent/mixing_elbow.py:78: "FileName": import_filename,
examples/00-fluent/mixing_elbow_settings_api.py:32:import_filename = examples.download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")
examples/00-fluent/mixing_elbow_settings_api.py:51:solver.file.read(file_type="case", file_name=import_filename)
src/ansys/fluent/core/examples/downloads.py:76: urlretrieve(url, filename=local_path)
src/ansys/fluent/core/fluent_connection.py:416: cleanup_filename = f"cleanup-fluent-{host}-{pid}.{cleanup_file_ext}"
src/ansys/fluent/core/fluent_connection.py:417: logger.debug(f"Looking for {cleanup_filename}...")
src/ansys/fluent/core/fluent_connection.py:418: cleanup_file_path = Path(pwd, cleanup_filename)
src/ansys/fluent/core/fluent_connection.py:457: cleanup_filename = f"cleanup-fluent-{container_id}-{pid}.sh"
src/ansys/fluent/core/fluent_connection.py:458: logger.debug(f"Executing Fluent container cleanup script: {cleanup_filename}")
src/ansys/fluent/core/fluent_connection.py:461: container.exec_run(["bash", cleanup_filename], detach=True)
src/ansys/fluent/core/launcher/watchdog.py:161: "filename"
src/ansys/fluent/core/logging.py:45: 'filename': 'pyfluent.log',
src/ansys/fluent/core/logging.py:98: >>> config_dict['handlers']['pyfluent_file']['filename'] = 'test.log'
src/ansys/fluent/core/logging.py:117: file_name = config["handlers"]["pyfluent_file"]["filename"]
src/ansys/fluent/core/scheduler/load_machines.py:251:def _construct_machine_list_uge(host_filename):
src/ansys/fluent/core/scheduler/load_machines.py:255: with open(host_filename, "r") as peFile:
src/ansys/fluent/core/scheduler/load_machines.py:279:def _construct_machine_list_pbs(host_filename):
src/ansys/fluent/core/scheduler/load_machines.py:285: with open(host_filename, "r") as pbsFile:
tests/parametric/test_parametric_workflow.py:18: import_filename = examples.download_file(
tests/parametric/test_parametric_workflow.py:32: solver_session.file.read_case(file_name=import_filename)
tests/parametric/test_parametric_workflow.py:146: project_filename = Path(tmp_save_path) / "static_mixer_study.flprj"
tests/parametric/test_parametric_workflow.py:148: write_project_filename = str(container_workdir / "static_mixer_study.flprj")
tests/parametric/test_parametric_workflow.py:150: write_project_filename = str(project_filename)
tests/parametric/test_parametric_workflow.py:153: project_filename=write_project_filename
tests/parametric/test_parametric_workflow.py:155: assert project_filename.exists()
tests/parametric/test_parametric_workflow.py:165: solver_session.file.parametric_project.open(project_filename=write_project_filename)
tests/parametric/test_parametric_workflow.py:176: project_filename=write_project_save_as_name
tests/parametric/test_parametric_workflow.py:190: project_filename=write_project_save_as_copy_name
tests/test_batch_ops.py:12: case_filename = examples.download_file(
tests/test_batch_ops.py:16: solver.file.read_case(file_name=case_filename)
tests/test_batch_ops.py:28: case_filename = examples.download_file(
tests/test_batch_ops.py:33: solver.file.read_case(file_name=case_filename)
tests/test_field_data.py:20: import_filename = examples.download_file(
tests/test_field_data.py:23: solver.file.read(file_type="case", file_name=import_filename)
tests/test_field_data.py:121: import_filename = examples.download_file(
tests/test_field_data.py:132: solver.file.read(file_type="case", file_name=import_filename)
tests/test_field_data.py:177: import_filename = examples.download_file(
tests/test_field_data.py:185: solver.file.read(file_type="case", file_name=import_filename)
tests/test_field_data.py:305: import_filename = examples.download_file(
tests/test_field_data.py:321: solver.file.read(file_type="case", file_name=import_filename)
tests/test_field_data.py:357: import_filename = examples.download_file(
tests/test_field_data.py:360: solver.file.read(file_type="case", file_name=import_filename)
tests/test_fluent_fixes.py:12: import_filename = examples.download_file(
tests/test_fluent_fixes.py:16: solver.file.read_case(file_name=import_filename)
tests/test_fluent_session.py:110: cleanup_filename = (
tests/test_fluent_session.py:113: print(f"cleanup_filename: {cleanup_filename}")
tests/test_fluent_session.py:114: cmd_list.append(Path(cortex_pwd, cleanup_filename))
tests/test_meshing_queries.py:5:import_filename = examples.download_file(
tests/test_meshing_queries.py:13: meshing_session.tui.file.read_case(import_filename)
tests/test_pure_mesh_vs_mesh_workflow.py:63:# mesh_filename = download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")
tests/test_pure_mesh_vs_mesh_workflow.py:65:# pure_meshing_session.tui.file.read_mesh(mesh_filename)
tests/test_pure_mesh_vs_mesh_workflow.py:84: case_filename = download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")
tests/test_pure_mesh_vs_mesh_workflow.py:86: pure_meshing_session.tui.file.read_case(case_filename)
tests/test_session.py:309: import_filename = examples.download_file(
tests/test_session.py:313: case_filepath=import_filename, lightweight_mode=True
tests/test_svars.py:14: import_filename = examples.download_file(
tests/test_svars.py:17: solver.file.read(file_type="case", file_name=import_filename)
tests/test_svars.py:122: import_filename = examples.download_file(
tests/test_svars.py:125: solver.file.read(file_type="case", file_name=import_filename)
tests/util/fixture_fluent.py:22: file_name = f'_{full_file_name.split(".")[0]}_{file_type}_filename'
tests/util/fixture_fluent.py:32: dat_name = f'_{data_file_name.split(".")[0]}_{dat_file_type}_filename'
We are not going to change FilePath, it's default from Fluent. |
A few filepath
Note that these lists I am sharing are based on the latest version of this branch, and I haven't worked through all these items, there will be false positives or things that we shouldn't change, and I probably missed a few instances as well. Just trying to help you catch all of them (there are a lot). Feel free to ignore these if you're already aware of them or have a better way of finding them. |
I'm waiting to pass all tests first, then we will fix remaining from rsts. Thank you very much for your help. |
This PR is ready. |
…luent into fix/rename_file_name
@hpohekar, I have added @tejalprabhu01 as a reviewer because of the |
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.
Noticed an issue that doesn't show up in the tests as it is occurring in the detached watchdog process - see above
Edit: going to see if I can add a test to catch watchdog errors like this (will be a separate PR)
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.
These changes will be consumed by optiSLang for 24R2. Thanks for updating us about the changes!
filename
andfilepath
tofile_name