A Technical Deep Dive Into Flexible Metadata in Hyrax

Samvera Community Wiki


A Technical Deep Dive Into Flexible Metadata in Hyrax

How to join: Join our Cloud HD Video Meeting

  • You shouldn’t need a passcode, but just in case it prompts for it: 014626

  • If something goes wrong getting the meeting going, check in the #events-connect Slack channel while we figure it out.

Thanks and Welcome!

Some suggested resources

Running Hyrax (optional)

Workshop Outline

Workshop Outline, the crowd-sourced notes edition

Thanks for signing up for my workshop!

Just a quick note about our goals: before we switched to online, I had originally thought I would run a hands-on workshop where we all just run Hyrax and play around with Flexible Metadata while looking at some code.  Since we are now online and we have a nice mix of developers and repository managers, it's an unfair assumption that getting a Hyrax environment running is easy and second nature for everyone.  

So, I'm developing an agenda around an on-screen interactive demo that I'll be running, and you can choose whether you want to try to follow along or not. If you are able to run Hyrax in your desktop environment, it might add to the fun, but it is not required. I will make sure you still get a lot out of it.

So, the goal is to get into the nuts and bolts of Flexible Metadata, in a way that both repository managers and developers can understand, so that those roles have the shared understanding needed to support it.

Some suggested resources

You may have seen that there is a separate workshop at the first of the week called “Flexible Metadata in Hyku” by Nic Don Stanton-Roark. That is not a requirement for this workshop; however, I won’t be starting from square one covering Flexible Metadata from a functional/user perspective. If you haven’t actually worked with it or seen it in action, don’t worry, I have some resources that will help get you all on the same page.

For starters, we have this documentation page in our wiki space documenting Flexible Metadata, which is a great place to start with basic concepts and terminology. Best of all, it has a link to this video giving a functional walk-through via the UI.

And if you are a developer with lots of curious questions about where the voodoo magic is, that same page has developer notes that gets into the code.

Running Hyrax (optional for added fun)

If you are already accustomed to running Hyrax or other applications via Docker, the simple instructions that follow will look familiar to you. If you haven’t ventured there yet, the key would be to get to a place where you have a functioning Docker environment and are able to run Docker Compose.

Assuming that, these commands will bring up the same Hyrax environment I will be running the demo from:

git clone https://github.com/samvera/hyrax.git cd ./hyrax git checkout flexible-tech-workshop docker compose -f docker-compose-flexible.yml build docker compose -f docker-compose-flexible.yml up

Workshop Outline

How does Flexible Metadata work?

  • The heart of the matter: M3 profiles and the profile loader

  • Profiles associated with an AdminSet

  • Works are associated with a profile indirectly via AdminSet

  • Behavior of works’ attributes dynamically dictated by profile

What are the challenges?

  • Getting the configuration correct when enabling Flexible Metadata

  • Getting profiles in agreement with configuration and getting them to validate

What if?

  • What if I want to enable flexible metadata but I have pre-existing works that I want to associate to a profile?

  • What if I have a collection with works associated with a profile and someone uploads a new profile version?

  • What if I don’t want some works or work types to be managed by flexible metadata?

  • What if I’ve modified Hyrax core or basic metadata configurations and now those won’t be “mixed-in”?

  • What if I have non-user facing attributes that drive custom functionality?

What are the pitfalls?

  • Uh-oh, the ‘method not found’ error - the attribute you thought should be there isn't

  • Potential confusion around the other environment variables controlling flexible metadata

  • The (possible) downside of the "kitchen sink" method of preemptively adding any and all possible attributes in profiles