-
Notifications
You must be signed in to change notification settings - Fork 0
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 Datetime Logger #1
Conversation
result_json = serialise_constraints(example_constraints) | ||
expected_json = """{"module": "smartnoise-synth", "version": "1.0.4", "constraints": {"birthdays": {"type": "_ssynth_datetime_transformer:DateTimeTransformer", "params": {"epoch": "1970-01-01T00:00:00"}}}}""" # noqa | ||
expected_json_updated = expected_json.replace( | ||
"1.0.4", pkg_resources.get_distribution(SSYNTH).version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! i guess we could use the same logic for the measurement pipeline in our test with opendp. Instead of updating each time we use a new version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes ^^ let's be lazy
# "date": ChainTransformer( | ||
# [DateTimeTransformer(), MinMaxTransformer(nullable=False)] | ||
# ), | ||
"date": DateTimeTransformer(epoch="1993-06-04"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure to fully understand the epoch. For what i understand, its the date of reference during the transformation from date to float (nb of days since reference - 1970-01-01 being 0 by default). Is it only testing this aspect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is testing that the serialiser works also when given another start date of reference, so from what I understand in this case 0 would start the "1993-06-04".
But I am just testing the de/serialiser works not the underlying library
No description provided.