-
Notifications
You must be signed in to change notification settings - Fork 124
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
Expand download options #928
Conversation
@akaszynski can you check on linux locally? |
Will do. |
@germa89 For the labels we could replace:
|
ansys/mapdl/core/mapdl_grpc.py
Outdated
|
||
""" | ||
|
||
extensions_all = ['OUT', 'FULL', 'RST', 'CDB', 'ERR', 'DB', 'LOG'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@germa89 From my remembers when I was a solver developer, there are more file extensions existing for mapdl as : .rsdp .rfrq .mode .rth .rmg .dump .....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but those are the files extension that will be downloaded when issuing mapdl.download('all')
. I believe most of the time, the regular user is interested mainly in ['OUT', 'FULL', 'RST', 'CDB', 'ERR', 'DB', 'LOG'].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a download_project
. Prototype:
def download_project(self, extensions=['rst', 'full', <more>]):
Remove '"project"' and '"all"from
download. The files parameter should accept either a list or a
glob` pattern, but not general terms like "all" and "project". Edge case is someone wants to download a file named "all", but it seems like a bad design practice to have a non-explicit API.
I'd like to see the following:
|
Codecov Report
@@ Coverage Diff @@
## main #928 +/- ##
==========================================
+ Coverage 72.78% 72.83% +0.04%
==========================================
Files 39 39
Lines 5681 5676 -5
==========================================
- Hits 4135 4134 -1
+ Misses 1546 1542 -4 |
Since the download function is fully changed, I did not implement a "soft deprecation" of "target". If you want, I can add a keyword "target", that if provided, will raise that warning. We would change the exception (input a keyword that is not accepted) by a warning. But I don't see a good reason for that, and I don't like it. Btw, I changed in source code any call to the old 'download' function for '_download'. Hence we should not see more errors. Basically, if you want the old function, use All of this is properly documented in our docs (guide + docstrings). |
Close #926 by implementing new behaviors for
mapdl.download
:Notes
Happy to have any kind of feedback.