ansys / pyensight

Python API for EnSight
http://ensight.docs.pyansys.com
MIT License
6 stars 2 forks source link

add support for downloading files from example-data pyansys repo #330

Closed mariostieriansys closed 1 year ago

mariostieriansys commented 1 year ago

In the context of the Ansys lab deployment, has been requested an API to download files from the ansys/example-data public repo, where all the other teams are storing files to be downloaded during the examples tutorials.

Since this is conceptually similar to what we are doing in load_example, I have split portion of the latter to create "download_pyansys_example" and use it in load_example.

download_pyansys_example will use by default the github location, while load_example will override it with our s3 bucket, and since it will download session files it still has got the code to deal with the session file loading.

In the docstrings I have provided an example, which I also included in one of the docker github tests

in ansys/example-data we haven't got yet "ensight" examples, but we can already take advantage of the many fluent/mechanical examples that are available

codecov-commenter commented 1 year ago

Codecov Report

Merging #330 (35c3113) into main (3dee16f) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
+ Coverage   80.18%   80.22%   +0.03%     
==========================================
  Files          18       18              
  Lines        2544     2554      +10     
  Branches      448      438      -10     
==========================================
+ Hits         2040     2049       +9     
  Misses        350      350              
- Partials      154      155       +1     
Files Coverage Δ
src/ansys/pyensight/core/session.py 90.87% <100.00%> (+0.16%) :arrow_up:

... and 1 file with indirect coverage changes