QGOV changes, #4#11
Open
ThrawnCA wants to merge 25 commits into
Open
Conversation
- 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
This file contains hidden or 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
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.
.flake8file so it applies to manual runs.ckan_cliscript so we can run Click or Paster with the same syntax.sixfor Py2/Py3 compatibility.package_patchcalls that don't change any resources.plugin.py, to simplify paths.io.BytesIOinstead ofsix.BytesIOfor fake files, since it's more consistent.ckanext-schemingversion for consistent testing.