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

Refactor to define document types via configuration? #157

Open
jimallman opened this issue Sep 23, 2016 · 0 comments
Open

Refactor to define document types via configuration? #157

jimallman opened this issue Sep 23, 2016 · 0 comments

Comments

@jimallman
Copy link
Member

@jar398 and I have talked about a general refactoring that would potentially remove lots of boilerplate code by defining document types (studies, collections, amendments, illustrations, etc.) with configuration. Sort of a type registry where we define:

  • Pattern (regexp) for defining a valid document ID
  • Shard naming convention
  • Distinguish “folderish” types (eg, study, illustration) from simple JSON documents
  • Limitations on file sizes, file types
  • Pattern for shard folder structure and singletons (eg next_ott_id.json)
  • Patterns for corresponding public URLs for a document

I'm pretty sure there would still be a fair amount of type-specific code for validation, testing, etc. But this might drastically shorten the time and expertise requireed to add new document types.

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

No branches or pull requests

1 participant