loris-imageserver / loris

Loris IIIF Image Server
Other
209 stars 87 forks source link

Refactor the profile data into a structured object #391

Closed alexwlchan closed 6 years ago

alexwlchan commented 6 years ago

The profile field is a list that contains a compliance URI and a structured object, which is how it’s represented in an info.json blob – but that leads to somewhat weird-looking code like:

self.profile[1]['qualities'] += ['gray', 'color']

I think it’s clearer to write:

self.profile.description['qualities'] += ['gray', 'color']

This is the refactoring that arose from trying to do that, plus the usual battery of extra tests.


Some notes: