Jac/filter spaces#225
Conversation
Write tests for methods in ds_and_wb class, including a failing test that expects the view_filter to be un-encoded
The logic of the fix is in ds_and_wb:82 Also refactored some methods to get consistent order of args.
| request_options.image_resolution = "high" | ||
|
|
||
| @staticmethod | ||
| def apply_pdf_options(request_options: TSC.PDFRequestOptions, args, logger): |
There was a problem hiding this comment.
Did you want to reorder the arguments on this method too?
| # only applicable for png | ||
| logger.warn("Height/width arguments not yet implemented in export") | ||
| except AttributeError as ae: | ||
| logger.debug("Unexpected: no user or default value is present: {}".format(ae.__str__())) |
There was a problem hiding this comment.
Is this messaging correct? What is user in this context?
There was a problem hiding this comment.
I don't expect to get here because argparse should set a default value for these options. The message means there is no user-set value or default value
There was a problem hiding this comment.
Ooooh, gotcha. English is hard. I read it as "There is no user" || "There is no default value" :) Maybe change user to user-specified?
There was a problem hiding this comment.
I ended up just deleting it - I realized that if they aren't set, I would have hit this error well before we get here anyway!
| DatasourcesAndWorkbooks.apply_option_value(logger, request_options, value) | ||
| else: # it must be a filter | ||
| DatasourcesAndWorkbooks.apply_filter_value(request_options, value, logger) | ||
| # the REST API doesn't appear to have the option to disambiguate with "Parameter.<fieldname>" |
There was a problem hiding this comment.
Just double checking. The comment says Parameter. but the code uses the plural Parameters.
- removed super defensive exception catching - stopped sending filters for workbooks - CR feedback
Fixes, code enhancements * remove lowercase call while parsing csv for adding users * set user agent (#219) * Add and clean up logging, always include version in logs (#234, #224) * Encoding filter values to handle spaces and special chars in filters (#225) * replace polling code with library call * readme updates (#235) * Read and warn when user sets thumbnail options. (including 'not yet implemented' message for --thumbnail-group) * freeze tsc dependency (#248) New functionality * added new --filter option to pass in un-encoded value for simpler input * Add --url, --include-all/--embedded-datasources for create/refresh/delete extract commands (#227) * Add new command for listing content on the site (#230) * Implement publishing options overwrite/append/replace arguments (including not-yet-implemented message for --replace) (#236) * implement --proxy, --no-proxy, --use-certificate option (#241) * add --token-file option (#243) --------- Co-authored-by: Bhuvnesh Singh <bhuvnesh.singh@salesforce.com>
fixes #176
Example export:
result contains only two columns for two products.