Fli/improve archive download#170
Conversation
| self.run_script_string(script) | ||
| archive_created = self.run_script_string(script) | ||
| if not archive_created: | ||
| logging.error("failed to create the project archive. make sure that the solver PyAnsys sessions are closed.") |
There was a problem hiding this comment.
| logging.error("failed to create the project archive. make sure that the solver PyAnsys sessions are closed.") | |
| logging.error("Failed to create the project archive. Make sure that the solver PyAnsys sessions are closed.") |
Messages should use sentence case. They are to be brief, complete sentences.
PipKat
left a comment
There was a problem hiding this comment.
One minor doc edit of a message string.
…_download' into fli/improve_archive_download
| archive_name : str | ||
| Name of the project archive to use, without the file extension. | ||
| include_solution_result_files : bool, default: True | ||
| Whether to include solution/result files in the archive. |
There was a problem hiding this comment.
The use of solution/result always leaves to the question of whether this is an "or" or "and" construction. It would be better to remove the / and write out the conjunction.
| "failed to create the project archive. " | ||
| "make sure that the solver PyAnsys sessions are closed." |
There was a problem hiding this comment.
| "failed to create the project archive. " | |
| "make sure that the solver PyAnsys sessions are closed." | |
| "Failed to create the project archive. " | |
| "Make sure that the solver PyAnsys sessions are closed." |
You sentence construction--which means start with an initial cap. Otherwise, it is fine.
|
|
||
| Examples | ||
| -------- | ||
| Stop the PyMechanical session for the given system name. |
There was a problem hiding this comment.
| Stop the PyMechanical session for the given system name. | |
| Stop the PyMechanical session for the given system. |
|
|
||
| Examples | ||
| -------- | ||
| Stop the Fluent session for the given system name. |
There was a problem hiding this comment.
| Stop the Fluent session for the given system name. | |
| Stop the Fluent session for the given system. |
|
|
||
| Examples | ||
| -------- | ||
| Stop the Sherlock session for the given system name. |
There was a problem hiding this comment.
| Stop the Sherlock session for the given system name. | |
| Stop the Sherlock session for the given system. |
PipKat
left a comment
There was a problem hiding this comment.
Approved doc strings with minor suggestions.
| with open(file_path, mode="ab") as f: | ||
| f.write(response.file_content) | ||
|
|
||
| try_more = 3 |
There was a problem hiding this comment.
How can we verify that the PermissionError is due to an intermittent error not due to some other reason (e.g., disk is full, wrong file/directory permissions, path issue, etc) ?
There was a problem hiding this comment.
I guess we can't decide which is the case.
| # intermittent "Permission Denied" error can happen | ||
| if (try_more <= 0): | ||
| throw | ||
| try_more -= 1 |
There was a problem hiding this comment.
probably we should add a wait here to give enough time for intermittent error to clear.
e.g., time.sleep(0.01) # Wait for 10 milliseconds before retrying
No description provided.