-
Notifications
You must be signed in to change notification settings - Fork 1.1k
removed outdated parsing tool #33
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. I think the lines above ( |
You are right, these lines are obsolete now. I missed them because they didn't cause an error. |
I'm not sure what the appropriate scope is for this PR, so I'll suggest a few courses of action. A. Merge this. |
Looks like pvlib matlab does not have anything like a |
I'd advocate for keeping this function, but cutting it down as it doesn't need the surface tilt inputs. This is a good general convenience function. @wholmgren , I'll let you make the call, but I'd say lets merge this to make it functional, and put B into milestone 0.2. |
@Calama-Consulting that sounds good to me. @uvchik are you interested in making these changes? |
I pushed the changes and formatted the code according to the pep8 rules I know. |
AOI : float or DataFrame | ||
Angle of incedence of solar rays with respect | ||
to the module surface, from :py:mod:`pvl_getaoi`. AOI must be >=0 and <=180. | ||
to the module surface, from :py:mod:`pvl_getaoi`. |
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.
can you fix this reference? incidence is also misspelled above.
Did you use an automated PEP8 tool? It all looks good, although there are so many changes that I might have missed something. I would prefer for the returned DataFrame column names to be consistent across all functions, but I'm ok deferring this decision until later. I think I misread @Calama-Consulting's comment and agreed to something inadvertently. I would prefer for finish this off with a new test before merging. |
No, I had bad experience with an automated PEP8 tool. But I use IDEs (Spyder or Ninja-IDE) and they have integrated pep8 analyses similar to common spell checkers. It's annoying sometimes, but helps a lot ;-) I don't know Sphinx very good, but the references should be fine now. |
Is it possible to merge these commits, that would help us in our feedinlib-project. You can pull it to a new branch, if you don't want it in your master. Although I think it is better than the old version. |
I know that we're at an early stage still, but I would prefer to get in the habit of requiring new tests with all PRs that change or add functionality. So, it would be ideal if you could add a test (or tests) to |
Sorry, I don't know exactly what you want me to do. Do you want to test the functionality or the quality of the results? I could add a function call, like the one below to the test_irradiance module but I really don't know how these test routines work. def test_globalinplane():
aoi = irradiance.aoi(40, 180, ephem_data['apparent_zenith'],
ephem_data['apparent_azimuth'])
am = atmosphere.relativeairmass(ephem_data['apparent_zenith'])
gr_sand = irradiance.grounddiffuse(40, ghi, surface_type='sand')
diff_perez = irradiance.perez(
40, 180, irrad_data['DHI'], irrad_data['DNI'], dni_et,
ephem_data['apparent_zenith'], ephem_data['apparent_azimuth'], am)
irradiance.globalinplane(
AOI=aoi, DNI=irrad_data['DNI'], In_Plane_SkyDiffuse=diff_perez,
GR=gr_sand) The results look good but I got some negative beam radiation due to AOI greater 90 degree. AOI[AOI > 90] = 90 |
Sorry, I didn't meant to close it on purpose. Just pushed the wrong button. |
The ideal test(s) would cover both, but I'm ok with just the test shown above at this point. The negative values are a problem; thanks for pointing that out. Rather than operating on a slice of Eb = pd.Series(DNI * np.cos(np.radians(AOI))).clip_lower(0) The extra Both the negative values and the all float inputs are the sort of corner cases that are nice have tested in the test suite, but again, not necessary for now. Just noticed that the docs describe these inputs as either Thanks for your patience making this better! |
|
This looks good to me. Not a big deal at this point, but I did notice that AOI in the note section is in lowercase. Was that intentional? I also see that you're using lowercase names for your variables in your test code. I'm ok with changing the I forgot to mention that you can add a line referencing this change and issue to the what's new file. Add yourself to the contributors list too. Probably a good idea to rebase your commits on the current master before doing so. |
I changed the variable names to upper case to be consistent within the module. I would use existing conventions like PEP8 because this is easier for new contributors. For variable names I like the convention table of pylint: http://pylint-messages.wikidot.com/messages:c0103 Pylint is a program to check your code. It marks all lines where you broke the rules. You can integrate pylint in many IDEs or editors (http://docs.pylint.org/ide-integration) or use it as a standalone tool to check your modules. If you do the rebase, I will add this issue to the what's new wiki. Thank you :-) |
Go ahead and edit whats new, commit, and push. It might create a merge conflict, which either of us can fix. I prefer rebase for a situation like this since it keeps things a little cleaner but it's not a big deal. You'd need to do something close to this (untested):
Then edit what's new, commit, and push. You may need to add Maybe you'd like to contribute to #37. |
The input parameter has to be a float or a Series not a DataFrame.
I did the rebase. |
Great, go ahead an make your changes to whats new and then I'll merge. |
Done. |
I don't see the changes to the whats new file. Maybe a missed commit? |
I don't have the right to write the wiki, so it ended up as another pull request #38. |
Oh, you're just editing another source file in the repo and it should be included in this PR. The only difference is that it's source code for sphinx instead of python. Just merge your patch-1 branch into your master branch. The wiki is here and you should be able to edit that if you're so inclined. |
Okay, I got it. Sorry, I was a little confused. |
removed outdated parsing tool
Great! Thank you for the contribution and for your patience! |
Thanks, it was interesting for me, too. |
The call above causes the following error:
My changes fixed #21 for me.