8000 Create iam.py, consistent naming for IAM functions by cwhanse · Pull Request #783 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Create iam.py, consistent naming for IAM functions #783

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

Merged
merged 35 commits into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
73f4638
move iam functions to iam.py
cwhanse Oct 2, 2019
a89cc01
move function tests to test_iam.py
cwhanse Oct 2, 2019
0f1c90c
adjust PVSystem methods, add deprecation for functions and PVSystem m…
cwhanse Oct 2, 2019
0a55b54
adjust PVSystem tests, test for function deprecation
cwhanse Oct 2, 2019
8505a0d
move sapm aoi function, adjust ModelChain methods
cwhanse Oct 2, 2019
f48742c
remove _ typo
cwhanse Oct 2, 2019
1bcde31
lint fixes
cwhanse Oct 2, 2019
c51bc08
move fixture to correct place
cwhanse Oct 2, 2019
5e01712
move sapm_module_params fixture to conftest.py
cwhanse Oct 2, 2019
e5bebe1
fix cut/paste errors
cwhanse Oct 3, 2019
549fc2c
add missing keys to fixture, add missing text to pvsystem.sapm docstring
cwhanse Oct 3, 2019
42210e4
fix and update pvsystem.sapm tests
cwhanse Oct 3, 2019
1475db6
remove DataFrame test for sapm, lint fixes
cwhanse Oct 3, 2019
006768d
implement PVSystem.get_iam, add deprecation test for pvsystem.sapm_ao…
cwhanse Oct 3, 2019
c10af4c
lint
cwhanse Oct 3, 2019
b9e39ac
Merge branch 'master' into iam
cwhanse Oct 3, 2019
ab1fbbc
test fixes, add Material to sapm_module_params fixture
cwhanse Oct 3, 2019
4dadd4b
test fixes
cwhanse Oct 4, 2019
7f14c95
add martin_ruiz to modelchain
cwhanse Oct 4, 2019
9164592
finish adding martin_ruiz to modelchain
cwhanse Oct 4, 2019
2fe7396
add test for ModelChain.infer_aoi_model, improve coverage
cwhanse Oct 4, 2019
3d6bcf5
repair delete mistake
cwhanse Oct 4, 2019
64a6b3c
test for invalid aoi model parameters in ModelChain
cwhanse Oct 4, 2019
152ef7a
update api, whatsnew
cwhanse Oct 4, 2019
46db9d7
test fix
cwhanse Oct 4, 2019
ea6fe81
fixture for aoi_model tests
cwhanse Oct 4, 2019
2529351
bad indent
cwhanse Oct 4, 2019
f641cd0
docstring and lint
cwhanse Oct 4, 2019
f331949
lint
cwhanse Oct 4, 2019
ec723c6
module docstring, changes to tests
cwhanse Oct 15, 2019
cf998ea
test fixes
cwhanse Oct 15, 2019
23f2677
another test fix
cwhanse Oct 16, 2019
1e63f04
improve coverage
cwhanse Oct 16, 2019
5fb7cc8
fix exception test
cwhanse Oct 16, 2019
b43b28c
fix the fix
cwhanse Oct 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
< 10000 div style="left: -107px; top: -7px" data-view-component="true" class="Popover-message Box position-relative mx-auto text-left color-shadow-large p-2 mt-2">
Diff view
Diff view
Prev Previous commit
Next Next commit
test fixes
  • Loading branch information
cwhanse committed Oct 15, 2019
commit cf998ea4357fb08012fc196bc088f6cd215d42c4
2 changes: 1 addition & 1 deletion pvlib/test/test_modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def test_infer_aoi_model_invalid(location, system_no_aoi):
with pytest.raises(ValueError):
Copy link
Member

Choose a reason for hiding this comment

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

The ModelChain initialization is complicated enough that we should probably be more careful in this test by adding a check for the right text in the message. Something like:

with pytest.raises(ValueError) as excinfo:
    ModelChain...
assert 'could not infer AOI model' in str(excinfo.value)  

ModelChain(system_no_aoi, location, orientation_strategy='None',
spectral_model='no_loss')
assert 'could not infer AOI model' in str(sys.exc_info())
assert 'could not infer AOI model' in str(sys.exc_info())


def constant_spectral_loss(mc):
Expand Down
2 changes: 1 addition & 1 deletion pvlib/test/test_pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_PVSystem_get_iam(mocker, iam_model, model_params):
system = pvsystem.PVSystem(module_parameters=model_params)
thetas = 1
iam = system.get_iam(thetas, iam_model=iam_model)
assert m.assert_called_once_with(thetas, model_params)
assert m.assert_called_once_with(thetas, **model_params)
assert iam < 1.


Expand Down
0