-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature/py3 #53
Feature/py3 #53
Conversation
…erator' linting errors, so we are going to just ignore them; I thought these were originally strings which is why I attempted to join them, but they are some form of lists
…plugin parameters
…for this extension; started to fix py3 errors, but a lot of them stem from controller to blueprint issue, so trying to make fresh slate for that commit
…f things no longer existing and/or being rewritten, will try to see how the tests do..
…e to 'fanstatic' directory; fixed template reference to dashboard home (following example in 'ckanext-datagovtheme' ./ckanext/datagovtheme/templates/templates_2_8/header.html:46)
…en though I'm not using it directly; the 'before_search' function in the plugin is causing an issue because there is no good way to verify a user is authorized right now
…e controller to blueprint conversion
…ally; fixed lint; these changes will change a lot of the plugin functionality...
… taken which may cause incomplete data uploads; but until we know the proper way to update the validation, this was deemed the best approach
…s' is imported from future for py3 support
…est_validate_dataset_action and added additional validation tests as referenced in TODO
…he rest of the tests;... well... lint passes and the tests seem to work on CKAN 2.8.... moving on to CKAN 2.9 now? :s"
…works in 2.8 or is commented out because of a schema change in the plugin; fixed lint
This PR is to complete this issue. |
@mogul Please remove the circleci checks 😅 |
Done. |
…t for the field; fixed test errors
Bug Found via
Will fix now.. |
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.
Most of these comments are minor tweaks/changes, great work!
|
||
converted_data, errors = df.validate(data, schema) | ||
|
||
# TODO: schema approach was changed, so we don't care if it's missing right now |
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.
Can we add what the desired functionality is?
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.
ADR.md
Outdated
|
||
### Consequences | ||
|
||
- Until the schema is updated properly, incomplete input data may cause unknown bugs throughout the system. |
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 is a little vague and harsh. I would say "until the schema is properly updated, users may be able to input data that is not exportable in the data.json file. Due to the limited number of users and very little new users, this risk was deemed acceptable."
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.
Agreed.
ADR.md
Outdated
Custom vaildator functions were written to handle the functionality that the imported validators provided. The following link was used as a reference, | ||
- https://docs.ckan.org/en/2.9/extensions/adding-custom-fields.html#custom-validators | ||
The validators were not registered with the plugin because the place where they were defined was already importing the plugin, so there would have | ||
been a circular dependency. Either way, the validators work as standalong functions that get called. |
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.
standalone
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.
Good catch 😄
ADR.md
Outdated
|
||
### Consequences | ||
|
||
- The string_length_validator has known issues where sometimes it allows strings that are longer than allowed. However, as a unit test, the function works. |
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.
We fixed this, correct?
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.
@@ -0,0 +1,17 @@ | |||
ARG CKAN_VERSION=2.8 |
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.
Do we want to try to remove this whole file?
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'll add this to the ADR.
requirements.txt
Outdated
@@ -1 +1,7 @@ | |||
flake8 |
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.
Shouldn't these be in a requirements-dev.txt
?
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'll add the dev-requirements.txt file
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.
Thanks for the changes, looks great!
I'm creating this PR a little early so that we have a somewhat good way to track changes from main. There were a few files that I broke up completely, for example,
ckanext/usmetadata/plugin.py
because it needed to be updated from controllers to blueprints and, since that's a big change, I stripped out constants into a separate file. Those constants are pretty important, but because I did that, we can't track the changes to those constants too well from this.Either way, this is a huge upgrade. ... more comments to follow..