forked from ckan/ckanext-validation
-
Notifications
You must be signed in to change notification settings - Fork 1
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
QGOV changes, #4 #11
Open
ThrawnCA
wants to merge
25
commits into
keitaroinc:master
Choose a base branch
from
qld-gov-au:QOL-9122-merge-qgov-keitaro
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
QGOV changes, #4 #11
ThrawnCA
wants to merge
25
commits into
keitaroinc:master
from
qld-gov-au:QOL-9122-merge-qgov-keitaro
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- standardise whitespace - sort imports alphabetically - refactor code to extract helper functions - add more doc comments - put binary operators at start of line instead of end - use parameterised logging
- this is more consistent, when we're already making our strings binary
- We won't necessarily be instantly compatible with all future versions, we need version control
- It's better to put the shared code into plugin.py than into an __init__.py file, and putting it at the higher level lets us skip a bunch of '../' paths
- extract both the package ID and resource ID from the URL and ensure it's the right package for the resource
- This will make it easier to adjust and test our exact enqueueing behaviour since we can examine what is actually sent to the queue
- Passing IDs consumes far less memory on the job queue than entire resource dictionaries
- fix typos - fix repository URLs
- When using a resource API to update a resource, don't treat it as a package update
- Record only the resource ID, instead of the full resource dict. This greatly reduces the memory usage on the job queue server.
- Just use the validation timestamp, it's useful information
…ficient privileges
- Updating a dataset via the web UI should not trigger a validation job
- check for asynchronicity at runtime so we can always hook our action in - use chained actions so we don't block other customisation
- Unless package_patch provides an update to the resources, there's no need for validation
- Synchronous validation doesn't need to pass just an ID, full dict is fine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Changes to become more compatible with qld-gov-au fork, see #4. This includes several feature improvements.
.flake8
file so it applies to manual runs.ckan_cli
script so we can run Click or Paster with the same syntax.six
for Py2/Py3 compatibility.package_patch
calls that don't change any resources.plugin.py
, to simplify paths.io.BytesIO
instead ofsix.BytesIO
for fake files, since it's more consistent.ckanext-scheming
version for consistent testing.