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

10787 search export as system values #10789

Merged
merged 31 commits into from
Jul 4, 2024

Conversation

whatisgalen
Copy link
Member

@whatisgalen whatisgalen commented Apr 18, 2024

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

This PR enables exported search results to be rendered as their "system values", i.e. the node value comes from
datatype.transform_export_values() instead of datatype.get_display_value(). For exmaple concepts would render as their uuids instead of preflabels. It has a minor addition to the UI as well.

Screenshot 2024-04-17 at 6 30 47 PM

Issues Solved

#10787

Checklist

  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Ticket Background

Further comments

Copy link
Member

@chiatt chiatt left a comment

Choose a reason for hiding this comment

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

This is a good start, but would be much better concept specific but rather apply to all datatypes. That would eliminate the need for datatype checking and allow for future and custom datatypes to control how data is exported.

The boolean variable could be 'Export System Value' and then in search_export the boolean would just determine whether 'get_display_value' or 'transform_export_values' is called.

arches/app/search/search_export.py Outdated Show resolved Hide resolved
arches/app/search/search_export.py Outdated Show resolved Hide resolved
@whatisgalen
Copy link
Member Author

This is a good start, but would be much better concept specific but rather apply to all datatypes. That would eliminate the need for datatype checking and allow for future and custom datatypes to control how data is exported.

The boolean variable could be 'Export System Value' and then in search_export the boolean would just determine whether 'get_display_value' or 'transform_export_values' is called.

fix in latest

@whatisgalen whatisgalen changed the title 10787 search export concept uuids 10787 search export as system values Apr 30, 2024
@whatisgalen
Copy link
Member Author

FWIW coverage "failed" because of this delta:
Coverage decreased from 65.89301327398458% to 65.87992212023681%

@whatisgalen whatisgalen requested a review from chiatt May 2, 2024 10:37
whatisgalen added a commit that referenced this pull request May 9, 2024
@whatisgalen whatisgalen linked an issue May 11, 2024 that may be closed by this pull request
tests/search/search_export_tests.py Outdated Show resolved Hide resolved
tests/search/search_export_tests.py Outdated Show resolved Hide resolved
Copy link
Member

@chiatt chiatt left a comment

Choose a reason for hiding this comment

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

Looks good to me!

node_value = datatype.get_display_value(tile, node)
if self.export_system_values:
node_value = datatype.transform_export_values(
value, **{"concept_export_value_type": "id"}
Copy link
Member

Choose a reason for hiding this comment

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

Just a note - 'concept_export_value_type' is used here because that's the argument in both the domain and concept datatypes. Might be nice to use something more generic in the controlled list manager.

@whatisgalen whatisgalen merged commit b8ff657 into dev/7.6.x Jul 4, 2024
7 checks passed
@whatisgalen whatisgalen deleted the 10787_search_export_concept_uuids branch July 4, 2024 00:59
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.

Search Export - export concept values as uuid
3 participants