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

Code factoring duplicates a lot of work #35

Open
colmsnowplow opened this issue Mar 9, 2023 · 0 comments
Open

Code factoring duplicates a lot of work #35

colmsnowplow opened this issue Mar 9, 2023 · 0 comments

Comments

@colmsnowplow
Copy link
Contributor

We can optionally configure behaviour for duplicates generation in the config.

The main function pattern matches whether or not this config is provided, and then calls a different function if the config is present vs if it isn't.

These functions do mostly the same things, but they're propagated through the entire codebase, everything is defined twice.

Is there a good reason not to just set the default values for the duplicates config all to 0, and use just one function?

If there is, we could still remove duplicate code by factoring it such that we create single events, then evaluate the duplicates behaviour and either a) produce the same event again, or b) re-generate data for the relevant fields in the event, and produce it again (depending on whether we want natural or synthetic dupe).

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

1 participant