Skip to content

Commit 53452ff

Browse files
updates in the DataSources api reference
1 parent d744415 commit 53452ff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ansys/dpf/core/data_sources.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def guess_result_key(filepath: str) -> str:
211211
>>> # Define the extension key for the file in the given path
212212
>>> my_file_key = my_data_sources.guess_result_key(filepath=path[0])
213213
>>> print(my_file_key)
214-
'd3plot'
214+
d3plot
215215
216216
"""
217217
result_keys = ["d3plot", "binout"]
@@ -254,7 +254,7 @@ def guess_second_key(filepath: str) -> str:
254254
>>> # - the file index in that list
255255
>>> my_file_key = my_data_sources.guess_second_key(filepath=paths["cas"][0])
256256
>>> print(my_file_key)
257-
'cas'
257+
cas
258258
259259
"""
260260
accepted = ["cas", "dat"]
@@ -468,7 +468,7 @@ def add_upstream(
468468
>>> # Create the DataSources object for the upstream data
469469
>>> my_data_sources_upstream = dpf.DataSources()
470470
>>> # Define the path where the main upstream data can be found
471-
>>> my_data_sources_upstream.set_result_file_path(filepath=paths["mode"])
471+
>>> my_data_sources_upstream.set_result_file_path(filepath=paths["mode"], key='mode')
472472
>>> # Add the additional upstream data to the upstream DataSources object
473473
>>> my_data_sources_upstream.add_file_path(filepath=paths["rst"], key='rst')
474474
>>>
@@ -507,7 +507,7 @@ def add_upstream_for_domain(self, upstream_data_sources: DataSources, domain_id:
507507
>>> # Download the result files
508508
>>> paths = examples.find_distributed_msup_folder()
509509
>>> # Create the main DataSources object
510-
>>> my_data_sources = dpf.DataSources()
510+
>>> my_data_sources = dpf.DataSources()
511511
>>> # Define the path where the main result file can be found and specify its domain
512512
>>> # We use a format string here because the function used to define the path gives the path to a folder
513513
>>> my_data_sources.set_domain_result_file_path(path=rf"{paths}\file_load_1.rfrq", key='rfrq', domain_id=0)
@@ -609,7 +609,7 @@ def result_files(self):
609609
>>>
610610
>>> # Get the path to the main result file of the main DataSources object
611611
>>> my_data_sources.result_files
612-
>>> # ['../site-packages/ansys/dpf/core/examples/result_files/msup/file.rfrq']
612+
['C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\ansys\\dpf\\core\\examples\\result_files\\msup\\file.rfrq']
613613
614614
- If you are checking the DataSources object created to define the upstream data, only the first one is listed.
615615

0 commit comments

Comments
 (0)