-
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
base: develop
Are you sure you want to change the base?
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 :) |
@@ -4,6 +4,18 @@ | |||
from ckan.lib.helpers import url_for_static | |||
from ckantoolkit import url_for, _, config, asbool, literal, h | |||
|
|||
def _get_helpers(): |
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.
underscore syntax for python implies that the method should not be imported into another module, but this is used in plugin.py for get_helpers.
change to match the rest of the methods. E.g. get_actions
and get_blueprints
. So plugins.py imports ckanext.validation.helpers
and does helpers.get_helpers
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
@@ -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'):
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: