Skip to content
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

Site-wide validation overrides #89

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wardi
Copy link

@wardi wardi commented Jul 17, 2023

We use this to implement a "UTF-8-only" policy, but the same could be used for standardizing other options across a site with a configuration option.

Copy link
Contributor

@ThrawnCA ThrawnCA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build is broken.

@wardi
Copy link
Author

wardi commented Jul 19, 2023

failure is unrelated to this change.

The problem is our tests are creating a resource with ckan's factory, which creates a dataset, then passes the resource to a new dataset factory, but that resource already belongs to a dataset.

@ThrawnCA
Copy link
Contributor

It may be unrelated, but it still means this change isn't properly tested.

How easily can the tests be fixed?

@wardi
Copy link
Author

wardi commented Jul 19, 2023

test resources should be created like this

resource = {"format": "CSV", "url": "https://some.url"}
dataset = factories.Dataset(resources=[resource])
instead of like
dataset = factories.Dataset(
owner_org=org["id"], resources=[factories.Resource()]
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants