-
Notifications
You must be signed in to change notification settings - Fork 13
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
Jac/filter spaces #225
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.
# 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__())) | ||
# Always request high-res images | ||
request_options.image_resolution = "high" | ||
|
||
@staticmethod | ||
def apply_pdf_options(request_options: TSC.PDFRequestOptions, args, logger): |
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.
Did you want to reorder the arguments on this method too?
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.
yes :)
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this messaging correct? What is user
in this context?
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.