Skip to content
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

Do not package example files #475

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions src/ansys/dpf/post/examples/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,48 @@

# must copy files over when using docker
# running_docker = os.environ.get('DPF_DOCKER', False)


# called if module.<name> fails
def __getattr__(name):
if name == "simple_bar":
global simple_bar
simple_bar = find_simple_bar()
return simple_bar

Check warning on line 25 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L24-L25

Added lines #L24 - L25 were not covered by tests
elif name == "static_rst":
global static_rst
static_rst = find_static_rst()
return static_rst

Check warning on line 29 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L28-L29

Added lines #L28 - L29 were not covered by tests
elif name == "complex_rst":
global complex_rst
complex_rst = find_complex_rst()
return complex_rst

Check warning on line 33 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L32-L33

Added lines #L32 - L33 were not covered by tests
elif name == "multishells_rst":
global multishells_rst
multishells_rst = find_multishells_rst()
return multishells_rst

Check warning on line 37 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L36-L37

Added lines #L36 - L37 were not covered by tests
elif name == "electric_therm":
global electric_therm
electric_therm = find_electric_therm()
return electric_therm

Check warning on line 41 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L40-L41

Added lines #L40 - L41 were not covered by tests
elif name == "steady_therm":
global steady_therm
steady_therm = find_steady_therm()
return steady_therm

Check warning on line 45 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L44-L45

Added lines #L44 - L45 were not covered by tests
elif name == "transient_therm":
global transient_therm
transient_therm = find_transient_therm()
return transient_therm

Check warning on line 49 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L48-L49

Added lines #L48 - L49 were not covered by tests
elif name == "msup_transient":
global msup_transient
msup_transient = find_msup_transient()
return msup_transient

Check warning on line 53 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L52-L53

Added lines #L52 - L53 were not covered by tests
elif name == "simple_cyclic":
global simple_cyclic
simple_cyclic = find_simple_cyclic()
return simple_cyclic

Check warning on line 57 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L56-L57

Added lines #L56 - L57 were not covered by tests
elif name == "distributed_msup_folder":
global distributed_msup_folder
distributed_msup_folder = find_distributed_msup_folder()
return distributed_msup_folder

Check warning on line 61 in src/ansys/dpf/post/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/post/examples/__init__.py#L60-L61

Added lines #L60 - L61 were not covered by tests
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")