Skip to content

Commit 4993fca

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

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/ansys/dpf/core/data_sources.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -592,30 +592,27 @@ def result_files(self):
592592
Examples
593593
--------
594594
>>> from ansys.dpf import core as dpf
595-
>>> from ansys.dpf.core import examples
596595
>>>
597-
>>> # Download the result files
598-
>>> paths = examples.download_msup_files_to_dict()
599596
>>> # Create the main DataSources object with a main file path
600-
>>> my_data_sources = dpf.DataSources(result_path=paths["rfrq"])
597+
>>> my_data_sources = dpf.DataSources(result_path='/tmp/file.rfrq')
601598
>>>
602599
>>> # Create the DataSources object for the upstream data
603-
>>> my_data_sources_upstream = dpf.DataSources(result_path=paths["mode"])
600+
>>> my_data_sources_upstream = dpf.DataSources(result_path='/tmp/file.mode')
604601
>>> # Add the additional upstream data to the upstream DataSources object
605-
>>> my_data_sources_upstream.add_file_path(filepath=paths["rst"], key='rst')
602+
>>> my_data_sources_upstream.add_file_path(filepath='/tmp/file.rst', key='rst')
606603
>>>
607604
>>> # Add the upstream DataSources to the main DataSources object
608605
>>> my_data_sources.add_upstream(upstream_data_sources=my_data_sources_upstream)
609606
>>>
610607
>>> # Get the path to the main result file of the main DataSources object
611608
>>> my_data_sources.result_files
612-
['C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\ansys\\dpf\\core\\examples\\result_files\\msup\\file.rfrq']
609+
['/tmp/file.rfrq']
613610
614611
- If you are checking the DataSources object created to define the upstream data, only the first one is listed.
615612
616613
>>> # Get the path to the upstream file of the upstream DataSources object
617614
>>> my_data_sources_upstream.result_files
618-
[..\\.venv\\Lib\\site-packages\\ansys\\dpf\\core\\examples\\result_files\\msup\\file.mode']
615+
['/tmp/file.mode']
619616
620617
- If you have a ``DataSources`` object with more than one domain, a empty list is returned.
621618

0 commit comments

Comments
 (0)