Skip to content
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

Move modules #156

Merged
merged 3 commits into from
Apr 24, 2020
Merged

Move modules #156

merged 3 commits into from
Apr 24, 2020

Conversation

rouille
Copy link
Collaborator

@rouille rouille commented Apr 24, 2020

Purpose

Make PowerSimData independent of PreREISE and PostREISE.

Where to look

Files were moved in the powersimdata.tests and powersimdata.utility. The __all__ variable and the import statements were updated.

Time estimate

5 min

Note

All tests pass:

(v1) [~/REM/PowerSimData] (move_modules) brdo$ pytest . --verbose
================================================================ test session starts =================================================================
platform darwin -- Python 3.6.5, pytest-4.5.0, py-1.8.0, pluggy-0.13.0 -- /Users/brdo/PyEnv/REM/v1/bin/python
cachedir: .pytest_cache
rootdir: /Users/brdo/REM/PowerSimData
collected 107 items                                                                                                                                  

powersimdata/design/tests/test_object_persistence.py::test_create_json_of_target_object PASSED                                                 [  0%]
powersimdata/design/tests/test_object_persistence.py::test_write_read_json_of_target_object PASSED                                             [  1%]
powersimdata/design/tests/test_object_persistence.py::test_write_read_pickle_of_target_object PASSED                                           [  2%]
powersimdata/design/tests/test_resource_target_manager.py::test_expected_cap_factor PASSED                                                     [  3%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_next_capacity PASSED                                                 [  4%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_target PASSED                                                     [  5%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_shortfall_prev_gt_external PASSED                                 [  6%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_shortfall_external_gt_prev PASSED                                 [  7%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_no_shortfall_prev_gt_external PASSED                              [  8%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_no_shortfall_external_gt_prev PASSED                              [  9%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_overgeneration_prev_gt_external PASSED                            [ 10%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_overgeneration_external_gt_prev PASSED                            [ 11%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_no_overgeneration_prev_gt_external PASSED                         [ 12%]
powersimdata/design/tests/test_resource_target_manager.py::test_calculate_ce_no_overgeneration_external_gt_prev PASSED                         [ 13%]
powersimdata/design/tests/test_resource_target_manager.py::test_add_resource_solar PASSED                                                      [ 14%]
powersimdata/design/tests/test_resource_target_manager.py::test_cal_prev_solar PASSED                                                          [ 14%]
powersimdata/design/tests/test_resource_target_manager.py::test_cal_prev_pacific PASSED                                                        [ 15%]
powersimdata/design/tests/test_resource_target_manager.py::test_set_allowed_resources PASSED                                                   [ 16%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_available_resource PASSED                                          [ 17%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_capacity PASSED                                                    [ 18%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_capacity_factor PASSED                                             [ 19%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_curtailment PASSED                                                 [ 20%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_demand PASSED                                                      [ 21%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_generation PASSED                                                  [ 22%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_no_congest_capacity_factor PASSED                                  [ 23%]
powersimdata/design/tests/test_scenario_info.py::TestScenarioInfo::test_get_profile_resource PASSED                                            [ 24%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy PASSED                                                        [ 25%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_Atlantic_2 PASSED                                             [ 26%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_pacific_3 PASSED                                              [ 27%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_atlantic_4 PASSED                                             [ 28%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_pacific_external_6 PASSED                                     [ 28%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_pacific_solar0_7 PASSED                                       [ 29%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_pacific_solar75_8 PASSED                                      [ 30%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_pacific_solar100_9 PASSED                                     [ 31%]
powersimdata/design/tests/test_strategies.py::test_independent_capacity_strategy_windcurtail_10 PASSED                                         [ 32%]
powersimdata/design/tests/test_strategies.py::test_collaborative_capacity_strategy PASSED                                                      [ 33%]
powersimdata/design/tests/test_strategies.py::test_collaborative_capacity_strategy_overgeneration PASSED                                       [ 34%]
powersimdata/design/tests/test_strategies.py::test_collaborative_capacity_strategy_collab_curtailment PASSED                                   [ 35%]
powersimdata/design/tests/test_strategies.py::test_adding_addl_curtailment PASSED                                                              [ 36%]
powersimdata/design/tests/test_strategies.py::test_addl_curtailment_key_error PASSED                                                           [ 37%]
powersimdata/design/tests/test_target_manager_input.py::test_can_pass PASSED                                                                   [ 38%]
powersimdata/design/tests/test_target_manager_input.py::test_create_targets_from_dataframe PASSED                                              [ 39%]
powersimdata/design/tests/test_target_manager_input.py::test_populate_strategy_from_dataframe PASSED                                           [ 40%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_branches_connected_to_bus_1 PASSED                          [ 41%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_branches_connected_to_bus_4 PASSED                          [ 42%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_branches_connected_to_bus_5 PASSED                          [ 42%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_capacity_at_bus_1_solar_str PASSED                          [ 43%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_capacity_at_bus_1_solar_tuple PASSED                        [ 44%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_capacity_at_bus_2_wind PASSED                               [ 45%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_capacity_at_bus_7_solar PASSED                              [ 46%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_capacity_at_bus_7_solar_ng PASSED                           [ 47%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_first_degree_branches_101 PASSED                            [ 48%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_first_degree_branches_108 PASSED                            [ 49%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_stub_degree_1 PASSED                                        [ 50%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_stub_degree_5 PASSED                                        [ 51%]
powersimdata/design/tests/test_transmission.py::TestStubTopologyHelpers::test_find_stub_degree_7 PASSED                                        [ 52%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_MW_n_1 PASSED                                             [ 53%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_MW_n_2 PASSED                                             [ 54%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_MW_n_3 PASSED                                             [ 55%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_MWmiles_n_1 PASSED                                        [ 56%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_MWmiles_n_2 PASSED                                        [ 57%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_MWmiles_n_3 PASSED                                        [ 57%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_bad_method PASSED                                         [ 58%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_branch_upgrades_default PASSED                            [ 59%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_branch_upgrades_n_2 PASSED                                [ 60%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_branch_upgrades_n_3 PASSED                                [ 61%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_branch_upgrades_n_4 PASSED                                [ 62%]
powersimdata/design/tests/test_transmission.py::TestIdentifyMesh::test_identify_mesh_branch_upgrades_quantile90 PASSED                         [ 63%]
powersimdata/design/tests/test_transmission.py::TestIncrementBranch::test_increment_branch_scaling_ref_and_ct_and_increment1 PASSED            [ 64%]
powersimdata/design/tests/test_transmission.py::TestIncrementBranch::test_increment_branch_scaling_ref_and_ct_and_increment2 PASSED            [ 65%]
powersimdata/design/tests/test_transmission.py::TestIncrementBranch::test_increment_branch_scaling_ref_and_custom_increment PASSED             [ 66%]
powersimdata/design/tests/test_transmission.py::TestIncrementBranch::test_increment_branch_scaling_ref_and_increment PASSED                    [ 67%]
powersimdata/design/tests/test_transmission.py::TestIncrementBranch::test_increment_branch_scaling_ref_only PASSED                             [ 68%]
powersimdata/design/tests/test_transmission.py::TestScaleRenewableStubs::test_empty_ct_inplace_default PASSED                                  [ 69%]
powersimdata/design/tests/test_transmission.py::TestScaleRenewableStubs::test_empty_ct_inplace_false PASSED                                    [ 70%]
powersimdata/design/tests/test_transmission.py::TestScaleRenewableStubs::test_empty_ct_inplace_true PASSED                                     [ 71%]
powersimdata/design/tests/test_transmission.py::TestScaleRenewableStubs::test_empty_ct_no_fuzz PASSED                                          [ 71%]
powersimdata/design/tests/test_transmission.py::TestScaleRenewableStubs::test_existing_ct_unrelated_branch_id PASSED                           [ 72%]
powersimdata/design/tests/test_transmission.py::TestScaleRenewableStubs::test_existing_ct_zone_id_solar_wind PASSED                            [ 73%]
powersimdata/design/tests/test_transmission.py::TestScaleRenewableStubs::test_existing_ct_zone_id_wind PASSED                                  [ 74%]
powersimdata/input/tests/test_grid.py::test_interconnect_type PASSED                                                                           [ 75%]
powersimdata/input/tests/test_grid.py::test_interconnect_value PASSED                                                                          [ 76%]
powersimdata/input/tests/test_grid.py::test_interconnect_duplicate_value PASSED                                                                [ 77%]
powersimdata/input/tests/test_grid.py::test_interconnect_usa_is_unique PASSED                                                                  [ 78%]
powersimdata/input/tests/test_grid.py::test_add_column_to_data_frame PASSED                                                                    [ 79%]
powersimdata/input/tests/test_grid.py::test_grid_type PASSED                                                                                   [ 80%]
powersimdata/input/tests/test_grid.py::test_drop_one_interconnect PASSED                                                                       [ 81%]
powersimdata/input/tests/test_grid.py::test_drop_two_interconnect PASSED                                                                       [ 82%]
powersimdata/input/tests/test_grid.py::test_format_gencost_polynomial_only_same_n PASSED                                                       [ 83%]
powersimdata/input/tests/test_grid.py::test_format_gencost_polynomial_only_different_n PASSED                                                  [ 84%]
powersimdata/input/tests/test_grid.py::test_format_gencost_piece_wise_linear_only_same_n PASSED                                                [ 85%]
powersimdata/input/tests/test_grid.py::test_format_gencost_piece_wise_linear_only_different_n PASSED                                           [ 85%]
powersimdata/input/tests/test_grid.py::test_format_gencost_both_model_same_n PASSED                                                            [ 86%]
powersimdata/input/tests/test_grid.py::test_link PASSED                                                                                        [ 87%]
powersimdata/input/tests/test_grid.py::test_deepcopy_works PASSED                                                                              [ 88%]
powersimdata/input/tests/test_grid.py::test_that_fields_are_not_modified PASSED                                                                [ 89%]
powersimdata/tests/test_mocks.py::TestMocks::test_mock_grid_failures PASSED                                                                    [ 90%]
powersimdata/tests/test_mocks.py::TestMocks::test_mock_grid_successes PASSED                                                                   [ 91%]
powersimdata/tests/test_mocks.py::TestMocks::test_mock_hydro_stored_properly PASSED                                                            [ 92%]
powersimdata/tests/test_mocks.py::TestMocks::test_mock_pg_stored_properly PASSED                                                               [ 93%]
powersimdata/tests/test_mocks.py::TestMocks::test_mock_solar_stored_properly PASSED                                                            [ 94%]
powersimdata/tests/test_mocks.py::TestMocks::test_mock_wind_stored_properly PASSED                                                             [ 95%]
powersimdata/utility/tests/test_transfer_data.py::test_setup_server_connection PASSED                                                          [ 96%]
powersimdata/utility/tests/test_transfer_data.py::test_get_scenario_file_from_server_type PASSED                                               [ 97%]
powersimdata/utility/tests/test_transfer_data.py::test_get_scenario_file_from_server_header PASSED                                             [ 98%]
powersimdata/utility/tests/test_transfer_data.py::test_get_execute_file_from_server_type PASSED                                                [ 99%]
powersimdata/utility/tests/test_transfer_data.py::test_get_execute_file_from_server_header PASSED                                              [100%]

================================================================== warnings summary ==================================================================
powersimdata/input/tests/test_grid.py::test_that_fields_are_not_modified
powersimdata/input/tests/test_grid.py::test_that_fields_are_not_modified
  /Users/brdo/REM/PowerSimData/powersimdata/input/grid.py:100: DeprecationWarning: Grid property access is moving to dictionary indexing, i.e. grid['branch'] consistent with REISE.jl
    DeprecationWarning

-- Docs: https://docs.pytest.org/en/latest/warnings.html
====================================================== 107 passed, 2 warnings in 10.35 seconds =======================================================

@rouille rouille added this to the Egg Hunt milestone Apr 24, 2020
Copy link
Contributor

@kasparm kasparm left a comment

Choose a reason for hiding this comment

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

Great work.

@rouille rouille merged commit 4102e18 into develop Apr 24, 2020
@rouille rouille deleted the move_modules branch April 24, 2020 17:15
@ahurli ahurli mentioned this pull request Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants