-
Notifications
You must be signed in to change notification settings - Fork 33
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
Partial alignment to qld-gov-au 2.10 version #106
Conversation
…ions apart, move plugin from folder to root plugin.py
…nds in sections classes
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.
Great to see this happening.
@JVickery-TBS are you able to provide a co-review in the next day :) |
pass | ||
|
||
|
||
@validation.command() | ||
@validation.command(name='init-db') |
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.
name is redundant here as click with automatically make underscores in function into hyphens. Unless if that is not true for older click versions
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'd say its best to not have ambiguity here as people may be searching for the init-db and not find this due to the function being init_db.
@@ -59,37 +66,38 @@ def run_validation_job(resource): | |||
{'ignore_auth': True}, {'id': resource['package_id']}) | |||
|
|||
source = None | |||
if resource.get('url_type') == 'upload': | |||
if resource.get(u'url_type') == u'upload': | |||
upload = uploader.get_resource_uploader(resource) | |||
if isinstance(upload, uploader.ResourceUpload): |
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.
This should check if the upload has a get_path
attribute instead, so that other extended ResourceUploaders (like the CloudStorage plugin) can work.
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.
if isinstance(upload, uploader.ResourceUpload):
-->> if hasattr(upload, 'get_path'):
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.
will come in the next cut
also will do upload check from qld-gov-au,
def is_uploaded_file(upload):
return isinstance(upload,
uploader.ALLOWED_UPLOAD_TYPES) and upload.filename
To begin alignment of the divergent trees, i've taken steps to match the folder/code structure from upstream to qld-gov-au version. There has not been any 'new' code added to this just yet.
Still to do: