MI-DPLA / combine

Combine /kämˌbīn/ - Metadata Aggregator Platform
MIT License
26 stars 11 forks source link

refactor models.py #377

Closed ghukill closed 5 years ago

ghukill commented 5 years ago

Per an extremely helpful discussion, it was recommended that refactoring models.py to multiple smaller files might help with file management, navigation, etc.

Proposing a structure along the lines of:

models/
   __init__.py <------ will import classes from sibling .py files
   job.py
   record.py
   combinejob.py
   etc.

It might make sense to combine some classes into the same file, where they have interelated functionality (like interacting with s3). Or Livy session management. But certainly some of the larger classes like Job and Record and CombineJob might benefit from their own dedicated file.

An alternative would be breaking up Combine's main Django app core into more Django applications.

antmoth commented 5 years ago

I think this is sufficiently done to be closed, and further major improvements might warrant their own issue.

ghukill commented 5 years ago

Agreed.