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

Add ability to ignore certain fields #5

Closed
njoyard opened this issue Feb 12, 2016 · 4 comments
Closed

Add ability to ignore certain fields #5

njoyard opened this issue Feb 12, 2016 · 4 comments

Comments

@njoyard
Copy link

njoyard commented Feb 12, 2016

That does not seem feasible easily currently, maybe you'd have to parse dumped json and remove ignored fields manually from them before running the diff.

njoyard referenced this issue in njoyard/django-representatives Feb 12, 2016
@njoyard
Copy link
Author

njoyard commented Feb 12, 2016

Or you could even ditch GNU diff and compare dumps by parsing their json and looking up differences between models with dict(set(fieldsA.iteritems()) - set(fieldsB.iteritems())) or something similar

@jpic
Copy link
Member

jpic commented Feb 12, 2016

I think that would work, otherwise maybe we could drop fields with sed after dumping the data depending on a new "exclude" param for Fixture ? Not opinionated, just wondering

@njoyard
Copy link
Author

njoyard commented Feb 12, 2016

That's a solution, but then you're coupling your module with the text output format from dumpdata. We know it's valid JSON, but we never know, they may change the actual indented format (spaces, line breaks...) and that would break dbdiff if you rely on the actual text output.

@jpic
Copy link
Member

jpic commented Jun 8, 2016

@jpic jpic closed this as completed Jun 8, 2016
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

No branches or pull requests

2 participants