-
Notifications
You must be signed in to change notification settings - Fork 92
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
Splitting 3 database3.py classes into 3 files #955
Conversation
Just a note to any users, this changes where you need to import the |
Just to be transparent: of course I reviewed every usage of (It appears that since |
Yeah, probably most people pull up that interface via I think its a good change. Just highlighting the API change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, great work! I found one downstream import of DatabaseInterface
, but that doesn't block this in any way.
I didn't look hard at the tests or much of the code since it was just being moved around, but I did follow your commits as suggested so I did see the changes you made.
I think it looks really good.
Thanks for the save @opotowsky ! |
Description
The old
database3.py
file had 3 classes and several functions in it. But a better standard in Python is "1 class = 1 file" for big, meaty classes like this.Also, I was not sure it was obvious to people what all was in this file.
Since the default GitHub diff for this PR is so large, I tried to keep my commits atomic, so you could see what all was being done more easily. So, I would suggest looking at the commits, and not the diff. Though, to help, here is a brief synopsis of the changes in this PR:
db/database3.py:Database3
→ no changedb/database3.py:DatabaseInterface
→db/databaseInterface.py:DatabaseInterface
db/database3.py:Layout
→db/layout.py:Layout
bookkeeping/tests/test_databaseInterface.py
→bookkeeping/db/tests/test_databaseInterface.py
I also updated the major docstrings for
db/database3.py
, db/init.py, and
Layout` to be up-to-date.Checklist
doc/release/0.X.rst
) are up-to-date with any bug fixes or new features.doc
folder.setup.py
.