SG-35561 export csv python changes#386
Conversation
|
Test cases dependes on changes made in |
carlos-villavicencio-adsk
left a comment
There was a problem hiding this comment.
Let's add some documentation in the /docs directory. This will end up in the docs site.
|
Hello @kuldeepgudekar , please merge the |
| self.assertIn("'page_id' missing", str(cm.exception)) | ||
|
|
||
| @unittest.mock.patch("shotgun_api3.shotgun.Http.request") | ||
| def test_export_page_without_layout_name(self, mock_request): |
There was a problem hiding this comment.
We have not exposed the ExportPage entity so that we can't create it from self.sg, we can only query it. We can create it from FPTR ui calls.
carlos-villavicencio-adsk
left a comment
There was a problem hiding this comment.
LGTM.
Before moving forward, I have two requests:
-
Please add some documentation to the
docsdirectory. This will be automatically be rendered at the help site here: https://developers.shotgridsoftware.com/python-api/ -
If you plan to release this ASAP, you can include some of the release pre-requisites like the ones on this PR. Otherwise, you can open a new PR, but please note that this should be done before releasing a new version.
Thanks @carlos-villavicencio-adsk , I have updated it with required changes. |
carlos-villavicencio-adsk
left a comment
There was a problem hiding this comment.
LGTM. Let's wait more approvals from the team
dbccd47
# Conflicts: # HISTORY.rst # shotgun_api3/shotgun.py
HISTORY.rst
Outdated
| - Add ``export_page`` method to Shotgun class. | ||
| - Update in documentation. |
There was a problem hiding this comment.
Let's add a clearer and more customer-friendly message for the release notes, please.
mchesnay
left a comment
There was a problem hiding this comment.
Added a couple of comments for docstrings.
shotgun_api3/shotgun.py
Outdated
| """ | ||
| Export the specified page to the given format. | ||
| This method allows you to export a page to CSV. | ||
| Respective layout or page should be marked as API Exportable in the Shotgun. |
There was a problem hiding this comment.
| Respective layout or page should be marked as API Exportable in the Shotgun. | |
| Respective layout or page should be marked as API Exportable in the Flow Production Tracking UI. |
shotgun_api3/shotgun.py
Outdated
| "ID,Name,Status\\n1,Shot 001,ip\\n2,Shot 002,rev\\n" | ||
| :param int page_id: The ID of the page to export. | ||
| :param str format: The format to export the page to. Supported format is ``"csv"``. | ||
| :param str layout_name: optional layout name. This should be the name of the layout seen in the Shotgun UI. |
There was a problem hiding this comment.
| :param str layout_name: optional layout name. This should be the name of the layout seen in the Shotgun UI. | |
| :param str layout_name: Optional layout name. This should be the name of the layout seen in the Flow Production Tracking UI. |
d359d05
Includes change for the new API enpoint export_page and test case around it. The report download test case is unavailable due to the following reasons: