-
Notifications
You must be signed in to change notification settings - Fork 1.1k
"add __repr__() function to class PVSystem, LocalizedPVSystem, ModelChain, SingleAxisTracker, Location and add test for same" #174
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
Conversation
Thanks for submitting this. I'd lean towards including more attributes for PVSystem and add some for LocalizedPVSystem, but I don't have a specific recommendation for which to include and exclude. Also, please keep the line length to 79 or fewer characters. |
Thanks for advise. |
Please consolidate this PR and #175. The PR will automatically be updated when you push new commits to GitHub, so there's no need to create a second one for the same topic. We'll need tests similar to this one: https://github.com/pvlib/pvlib-python/blob/master/pvlib/test/test_location.py#L37 |
Thanks very much for the advise. Am new to the github workflow, so thanks for the patience. |
Regarding testing: |
@@ -8,7 +8,7 @@ | |||
|
|||
import pandas as pd | |||
|
|||
from pvlib import solarposition, pvsystem, clearsky, atmosphere | |||
from pvlib import solarposition, pvsystem, clearsky, atmosphere, location |
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.
Is this new import needed?
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.
You are right, there is no need for that import
Running the tests should be as easy as: conda or pip install |
Thanks for the guidance on the testing - I did pattern matching from the example. The test worked on my machine, not sure though. |
The tests look good, though we still need a couple for the trackers. Did you see the comments about the unnecessary location import and undesirable location attribute? They should show up in-line here, otherwise you can look at the files changed tab. |
Added the tests of repr() for the trackers |
Location in trackers adjusted - did not realize the override before. Thanks! |
You'll need to make the same changes to your Is there any reason to keep the Finally, you're going to need to rebase your commits on the latest version pvlib and resolve a merge conflict along the way. See this comment and google for more. |
…on in LocalizedPVSystem
Did the rebase, but think I killed some of my changed on the way. So will re-commit the modelchain and location file |
@JohannesOos we're close... I'm still hoping to get rid of the |
Adjusted the tests and replaced self.location with the lat and lon attributes inherited from location. |
Looks good to me. I'll merge tomorrow unless anyone objects. |
Cool, thanks for the help on getting me up to speed with github |
Thanks @JohannesOos! |
According to issue #142