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

Remove __lilac__ prefix for signals. #164

Merged
merged 9 commits into from
May 11, 2023
Merged

Remove __lilac__ prefix for signals. #164

merged 9 commits into from
May 11, 2023

Conversation

nsthorat
Copy link
Contributor

@nsthorat nsthorat commented May 10, 2023

  • Remove lilac as a separate column, we only return a single object now.
  • Fix the UI code to work with lilac.
  • now isSignalField will walk the tree downwards to determine if the path

Everything back to working:
image

Fixes #149

@nsthorat nsthorat changed the title [not ready] Remove __lilac__ prefix for signals. Remove __lilac__ prefix for signals. May 11, 2023
@nsthorat nsthorat requested review from dsmilkov and HalfdanJ and removed request for dsmilkov May 11, 2023 17:53
propertyA: lilacItem('valueA', {
propertyA: {
text_statistics: {
num_characters: 100
Copy link
Contributor

Choose a reason for hiding this comment

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

nit lilacItem()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, done!

*/
export function isSignalField(field: LilacSchemaField): boolean {
return field.path[0] === LILAC_COLUMN;
export function isSignalField(
Copy link
Contributor

Choose a reason for hiding this comment

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

Added a comment in your optimization bug that we can instead store parent reference in the field, and avoid extra parameter. But we can do that in seperate pr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should probably just walk downwards to 1) keep parity with python side and 2) keep json-serializability of this (since there's a circular reference), important for console.log() from unit tests

@HalfdanJ HalfdanJ requested a review from dsmilkov May 11, 2023 18:05
@nsthorat
Copy link
Contributor Author

Spoke with Daniel offline, he said LGTM as he's on phone. Submitting!

@nsthorat nsthorat merged commit eaccb42 into main May 11, 2023
3 checks passed
@nsthorat nsthorat deleted the nik-no-lilac branch May 11, 2023 19:17
if len(field_keys) != 2:
raise ValueError('Expected exactly two fields in signal manifest, '
f'the row UUID and root this signal is enriching. Got {field_keys}.')
return next(filter(lambda field: field != UUID_COLUMN, manifest.data_schema.fields.keys()))
Copy link
Collaborator

Choose a reason for hiding this comment

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

might be cleaner to just use manifest.enriched_path[0]

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

Successfully merging this pull request may close these issues.

Remove __lilac__, merge all the results under a single object.
3 participants