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

Make all example files downloadable #1126

Merged
merged 25 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2c57768
Use pydpf/update_examples branch on examples_data repo
PProfizi Aug 29, 2023
e8f58c7
Delete all example files kept in the repo
PProfizi Aug 29, 2023
4aeef22
Switch all find_* methods in examples.py to using downloads._download…
PProfizi Aug 16, 2023
8403069
Adapt tests
PProfizi Aug 16, 2023
fa60260
Solve circular import
PProfizi Aug 28, 2023
abcfae6
Fix style
PProfizi Aug 29, 2023
1596045
Fix examples_data branch
PProfizi Aug 29, 2023
350d660
Fix .rth
PProfizi Aug 29, 2023
6b6de42
Update conftest.py
PProfizi Aug 29, 2023
0fe1292
Fix examples _module_path
PProfizi Aug 29, 2023
8df334d
update test_delete_downloaded_files
PProfizi Aug 29, 2023
262f472
Support examples.static_rst and the like lazy evaluation
PProfizi Aug 29, 2023
4e681e7
Update test_examples.py
PProfizi Aug 29, 2023
e444064
examples.find_* methods now work the same as download_*
PProfizi Sep 1, 2023
d83ebce
Merge branch 'master' into maint/make_all_examples_downloadable
PProfizi Sep 1, 2023
546d52a
Switch to equivalent pydpf-post branch
PProfizi Sep 4, 2023
91a079d
Try update test_multi_server.py
PProfizi Sep 4, 2023
70f1aac
Try update test_multi_server.py
PProfizi Sep 4, 2023
d139ea5
Switch back to master branch for example_repo
PProfizi Sep 4, 2023
28f0af8
Switch back to master branch for PyDPF-Post
PProfizi Sep 4, 2023
7bfd2eb
Clean-up examples.py
PProfizi Sep 4, 2023
2302730
Merge branch 'master' into maint/make_all_examples_downloadable
PProfizi Sep 6, 2023
3bbf38c
Merge branch 'master' into maint/make_all_examples_downloadable
PProfizi Sep 11, 2023
7998684
Merge branch 'master' into maint/make_all_examples_downloadable
PProfizi Sep 12, 2023
f541c60
Merge branch 'master' into maint/make_all_examples_downloadable
PProfizi Sep 14, 2023
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
Binary file removed src/ansys/dpf/core/examples/ASimpleBar.rst
Binary file not shown.
45 changes: 45 additions & 0 deletions src/ansys/dpf/core/examples/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
from .examples import *
from .downloads import *


# called if module.<name> fails
def __getattr__(name):
if name == "simple_bar":
global simple_bar
simple_bar = find_simple_bar()
return simple_bar
elif name == "static_rst":
global static_rst
static_rst = find_static_rst()
return static_rst
elif name == "complex_rst":
global complex_rst
complex_rst = find_complex_rst()
return complex_rst
elif name == "multishells_rst":
global multishells_rst
multishells_rst = find_multishells_rst()
return multishells_rst
elif name == "electric_therm":
global electric_therm
electric_therm = find_electric_therm()
return electric_therm
elif name == "steady_therm":
global steady_therm
steady_therm = find_steady_therm()
return steady_therm
elif name == "transient_therm":
global transient_therm
transient_therm = find_transient_therm()
return transient_therm
elif name == "msup_transient":
global msup_transient
msup_transient = find_msup_transient()
return msup_transient
elif name == "simple_cyclic":
global simple_cyclic
simple_cyclic = find_simple_cyclic()
return simple_cyclic

Check warning on line 42 in src/ansys/dpf/core/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/examples/__init__.py#L41-L42

Added lines #L41 - L42 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 46 in src/ansys/dpf/core/examples/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/examples/__init__.py#L45-L46

Added lines #L45 - L46 were not covered by tests
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Binary file removed src/ansys/dpf/core/examples/complex.rst
Binary file not shown.
Loading
Loading