Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Conversation

pwilkins
Copy link
Contributor

@pwilkins pwilkins commented Mar 3, 2015

Refactor the StellarGradebook code into Client, Base, Membership, and Gradebook classes. The intent of this PR is simply to separate the code into separate classes, nothing more. If this PR is reviewed as something more comprehensive, I'd prefer to resubmit the PR so that it specifically identifies the broader goal.
Addresses #7, #8, #9, and #10.
This PR is ready for review. @pdpinch @carsongee

@carsongee
Copy link
Contributor

Looks like you have some pep-8 stuff to deal with

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an actual docstring. Preferably the google style class doc string, but a simple description is fine too

@carsongee
Copy link
Contributor

https://github.com/mitodl/PyLmod/blob/feature/refactor-stellargradebook/pylmod/stellargradebook.py should no longer be here, and we should see it being removed from the diff. It has the added benefit that we can see better which pieces got moved where.

@pwilkins
Copy link
Contributor Author

pwilkins commented Mar 3, 2015

In my enthusiasm to get this committed I left numerous pylint and pep8 errors. I'm working on those now. I really only wanted to verify that code is split up properly for this PR.

@carsongee
Copy link
Contributor

No problem, it is just hard to tell without stellargradebook.py being deleted if you could commit that real quick I can ignore the style problems

@pwilkins
Copy link
Contributor Author

pwilkins commented Mar 3, 2015

I'd like eyes on this line: https://github.com/mitodl/PyLmod/pull/11/files#diff-a2ca8308d9281e045010f13ce409eb81R76
get_gradebook_id() is called in base.py.init() but properly belongs in the Gradebook class. Since Gradebook inherits Base, it sounds like a endless loop to have init() call it from Base.

@carsongee
Copy link
Contributor

Sure, so nothing in base.py uses that property and that initialization should move to the gradebook class __init__ method which should call it's super __init__

pwilkins added 2 commits March 4, 2015 14:38
… is still flawed though. I'm committing these changes so we can consider whether we need another class that inherits from both Membership and Gradebook.
…returned in __init__.py which I can't figure out
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't have base here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

@carsongee
Copy link
Contributor

I'm happy to merge after those last few comments are addressed. What a long strange trip... 🐍

pylmod/base.py Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice to at least correct the class name here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected the class name and the 'sg' variable as well. I also removed "stellargradebook" and "stellar" from all files where it was possible.

carsongee added a commit that referenced this pull request Mar 5, 2015
@carsongee carsongee merged commit 07ff4b8 into master Mar 5, 2015
@carsongee carsongee deleted the feature/refactor-stellargradebook branch March 5, 2015 21:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants