8000 Merge pull request #65 from bmu/doctest_fixes · sschiffel/pvlib-python@e4efbcc · GitHub
[go: up one dir, main page]

Skip to content

Commit e4efbcc

Browse files
committed
Merge pull request pvlib#65 from bmu/doctest_fixes
Doctest fixes
2 parents d02dc89 + ecad0cd commit e4efbcc

File tree

2 files changed

+30
-23
lines changed

2 files changed

+30
-23
lines changed

docs/sphinx/source/whatsnew/v0.2.0.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Bug fixes
2626
* The release date of 0.1 was fixed in the documentation
2727
(see :ref:`whatsnew_0100`)
2828
* fix casting of DateTimeIndex to int64 epoch timestamp on machines with 32 bit python int (:issue:`63`)
29+
* fixed some docstrings with failing doctests (:issue:`62`)
2930

3031
Contributors
3132
~~~~~~~~~~~~

pvlib/pvsystem.py

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ def calcparams_desoto(S, temp_cell, alpha_isc, module_parameters, EgRef,
326326
to be 1). Source [1] suggests that an appropriate value for M
327327
as a function absolute airmass (AMa) may be:
328328
329-
>>> M = np.polyval([-0.000126, 0.002816, -0.024459, 0.086257, 0.918093], AMa)
329+
>>> M = np.polyval([-0.000126, 0.002816, -0.024459, 0.086257, 0.918093],
330+
... AMa) # doctest: +SKIP
330331
331332
M may be a DataFrame.
332333
@@ -404,43 +405,47 @@ def calcparams_desoto(S, temp_cell, alpha_isc, module_parameters, EgRef,
404405
temperature, and airmass) per DeSoto's equations.
405406
406407
Silicon (Si):
407-
EgRef = 1.121
408-
dEgdT = -0.0002677
408+
* EgRef = 1.121
409+
* dEgdT = -0.0002677
409410
410-
>>> M = polyval([-0.000126 0.002816 -0.024459 0.086257 0.918093], AMa)
411+
>>> M = np.polyval([-1.26E-4, 2.816E-3, -0.024459, 0.086257, 0.918093],
412+
... AMa) # doctest: +SKIP
411413
412-
Source = Reference 1
414+
Source: [1]
413415
414416
Cadmium Telluride (CdTe):
415-
EgRef = 1.475
416-
dEgdT = -0.0003
417+
* EgRef = 1.475
418+
* dEgdT = -0.0003
417419
418-
>>> M = polyval([-2.46E-5 9.607E-4 -0.0134 0.0716 0.9196], AMa)
420+
>>> M = np.polyval([-2.46E-5, 9.607E-4, -0.0134, 0.0716, 0.9196],
421+
... AMa) # doctest: +SKIP
419422
420-
Source = Reference 4
423+
Source: [4]
421424
422425
Copper Indium diSelenide (CIS):
423-
EgRef = 1.010
424-
dEgdT = -0.00011
426+
* EgRef = 1.010
427+
* dEgdT = -0.00011
425428
426-
>>> M = polyval([-3.74E-5 0.00125 -0.01462 0.0718 0.9210], AMa)
429+
>>> M = np.polyval([-3.74E-5, 0.00125, -0.01462, 0.0718, 0.9210],
430+
... AMa) # doctest: +SKIP
427431
428-
Source = Reference 4
432+
Source: [4]
429433
430434
Copper Indium Gallium diSelenide (CIGS):
431-
EgRef = 1.15
432-
dEgdT = ????
435+
* EgRef = 1.15
436+
* dEgdT = ????
433437
434-
>>> M = polyval([-9.07E-5 0.0022 -0.0202 0.0652 0.9417], AMa)
438+
>>> M = np.polyval([-9.07E-5, 0.0022, -0.0202, 0.0652, 0.9417],
439+
... AMa) # doctest: +SKIP
435440
436-
Source = Wikipedia
441+
Source: Wikipedia
437442
438443
Gallium Arsenide (GaAs):
444+
* EgRef = 1.424
445+
* dEgdT = -0.000433
446+
* M = unknown
439447
440-
EgRef = 1.424
441-
dEgdT = -0.000433
442-
M = unknown
443-
Source = Reference 4
448+
Source: [4]
444449
'''
445450

446451
M = np.max(M, 0)
@@ -506,9 +511,10 @@ def retrieve_sam(name=None, samfile=None):
506511
Examples
507512
--------
508513
509-
>>> invdb = pvsystem.retrieveSAM(name='SandiaInverter')
514+
>>> from pvlib import pvsystem
515+
>>> invdb = pvsystem.retrieve_sam(name='SandiaInverter')
510516
>>> inverter = invdb.AE_Solar_Energy__AE6_0__277V__277V__CEC_2012_
511-
>>> inverter
517+
>>> inverter
512518
Vac 277.000000
513519
Paco 6000.000000
514520
Pdco 6165.670000

0 commit comments

Comments
 (0)
0