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

Improve RDM to Lingo migration #74

Merged
merged 22 commits into from
Aug 26, 2024

Conversation

johnatawnclementawn
Copy link
Member

@johnatawnclementawn johnatawnclementawn commented Aug 21, 2024

Resolves #68

You should be able to review this by:

  1. checking out the branch
  2. reload package
  3. visit bulk data manager (select Migrate to Lingo)
  4. select a Lingo thesaurus, e.g. SKOS
  5. Resources created should match records in the RDM

Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

+1 tested. The only thing I think is worth adding here is the order_by() to ensure we get deterministic pref labels, everything else is FYI only and should be g2g.

arches_lingo/etl_modules/migrate_to_lingo.py Show resolved Hide resolved
arches_lingo/etl_modules/migrate_to_lingo.py Outdated Show resolved Hide resolved
this.selectedLoadEvent = params.selectedLoadEvent || ko.observable();
this.formatTime = params.formatTime;
this.timeDifference = params.timeDifference;
this.activeTab = params.activeTab || ko.observable();
this.editHistoryUrl = `${arches.urls.edit_history}?transactionid=${ko.unwrap(params.selectedLoadEvent)?.loadid}`;

this.getSchemes = function(){
self.loading(true);
self.submit('get_schemes').then(function(response){
Copy link
Member

Choose a reason for hiding this comment

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

It's not worth polishing right now, just noting this should probably be a GET, not a POST. If you think the ETLManagerView needs to make this easier to accomplish that could be a core arches enhancement.


concepts_nodegroup_lookup, concepts_nodes = self.get_graph_tree(
CONCEPTS_GRAPH_ID
)
concepts_node_lookup = self.get_node_lookup(concepts_nodes)
self.etl_concepts(cursor, concepts_nodegroup_lookup, concepts_node_lookup)
# Prefetch concept hierarchy to avoid building it multiple times
concept_hierarchy, concepts_to_migrate = self.build_concept_hierarchy(
Copy link
Member

Choose a reason for hiding this comment

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

Nice. Also not worth polishing, but you can store this on self to stop having to pass it around.

arches_lingo/etl_modules/migrate_to_lingo.py Outdated Show resolved Hide resolved
arches_lingo/etl_modules/migrate_to_lingo.py Show resolved Hide resolved
@jacobtylerwalls jacobtylerwalls mentioned this pull request Aug 22, 2024
1 task
@johnatawnclementawn johnatawnclementawn merged commit df58303 into main Aug 26, 2024
6 checks passed
@johnatawnclementawn johnatawnclementawn deleted the 68_improve_rdm_to_lingo_migration branch August 26, 2024 19:05
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.

Improve RDM to Lingo ETL module
2 participants