Conversation
Develop -> Main for v0.8 release (#682)
* update from pig iron to sponge iron * changelog * update lco naming in test
#771) * more robust api calls, suggested by copilot after all my api calls were failing * run precommit * Update h2integrate/resource/utilities/download_tools.py Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> * import warnings was missing * Apply suggestions from code review Co-authored-by: John Jasa <john.jasa@nrel.gov> * Apply suggestion from @johnjasa --------- Co-authored-by: Pietro Bortolotti <pietro.bortolotti@nrel.gov> Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> Co-authored-by: John Jasa <john.jasa@nrel.gov>
…errant CI issues (#795)
…786) * removed logic in profast base for commodity units * updated profast LCO and baseclass - still have clean-up todo * fixed some bugs * got profast npv working * renamed function used for compute_units * udpated numpy npv * Added docstrings to compute_price_units and shifted it to tools * Removed is_electricity_producer * Adding back run_model call that was actually necessary * Updating other examples for new finance setup: * Trying to fix failing tests * Removed placeholder logic for NPV, just having sell price units explicitly defined * Removed last of logic that mapped names to units in H2IntegrateModel * added new tool and fixed NPV models * added in comments and docstring to tools * undid previous change to a test structure for an npv model * added test to profast_npv that uses nonstandard price units * added subtest for heat-based commodity * minor typo fix * Simplified the units handling * updated numpy npv to be able to handle nonstandard units --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
…791) * add to and default feedstocks * move check_reource_dir tests to test_utilities and fix issues * update usage in resource tools * remove old usage * update changelog * add PR number * remove subtest for loading data into a context * update feedstock default directory and comment * fixed bug w tests * updated to use walruns operator * use a fixture to temporarily set environment variables and clean them up consistently * ensure the original value is preserved * fix user error * added comments warning folks about the sensitivities of the test that caused headaches --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
* move url retrieval below filename check in case of file, not api * add missing and condition * add missing arguments to monthly conversion * add missing discrete i/o * add missing discrete i/o in super call * use all() on np.isclose() comparison * use expected numpy array, not pandas dataframe * remove unnecessary default price definition * add test for eia feedstock from file usage and model run * update changelog * fix test after change from pd to np * Update h2integrate/feedstocks/test/test_feedstocks.py Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> * Update h2integrate/feedstocks/test/test_feedstocks.py Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> * update all model calls --------- Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> Co-authored-by: John Jasa <johnjasa11@gmail.com>
…tion (#797) * convert temp_copy_of_example workaround to use temp_copy_of_example * update changelog --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
…iew, unify the docs build (#787) * Revamped the adding a new technology page * Updating model overview docs and other pages * Updated changelog * Update docs/developer_guide/adding_a_new_technology.md * Update docs/developer_guide/adding_a_new_technology.md * Update docs/developer_guide/adding_a_new_technology.md * Update docs/developer_guide/adding_a_new_technology.md * update docs * Cleaning up part of the docs --------- Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: kbrunik <kbrunik@gmail.com>
* updated SLC framework to require user to specify demand technology and only connect upstream techs to the controller * fixed bug * updated error message * added framework tests for SLC * renamed local variable of tech_graph to upstream_tech_graph * updated SLC doc page * added integration test example * added integration tests * added units with set and get_val and updated the one subtest thats failing to be more useful * added control classifier to demand comps * Renamed `slc_config` to `slc_topology` to reduce confusion * Minor SLC logic clarifications --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
…lity (#801) * add feedstock_dir to EIA NG inputs * allow for parent directory creation in multi-folder creation * better control flow using data_subdir only when no input * fix issues and update fixture usage * update changelog * update changelog * only check feedstock_dir if filename is not None * update changelog * fix erroneous filename handling, duplicated directory resolution and missing assignment * Fix changelog --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
* move tests for split indices * revert obsolete changes to plant schema * fix bugs in length 3 connections for src_indices * remove use of eval * add ValueError for non-zero destination slice starts * allow for src_indices tiling into destination * update wind solar electrolyzer example to demonstrate different finance and connection approaches * add tests for each finance/connection approach added to wind solar electrolyzer example * add documentation for variable slicing in technology connections * update changelog * fix typo * Update docs/user_guide/connecting_technologies.md improve comment Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> --------- Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
* Removing a lot of warnings when building docs * Loosening ammonia tolerance in the example test * Cleaning up a few more docs build issues * Fixing minor doc indentation issues
* made it so profast npv can take in multi-year sell price costs * updated error handling for misisng sell price value * added subtest for inflation test * updated profast NPV doc page * updated BasicProFASTParameterConfig.from_dict() so that user-provided escalation values are not overwritten with the inflation rate * updated so sell price is input as a dictionary to ProFAST * minor updates to profast parameter config and added test * updated so ProFAST NPV is input an array rather than a dict * minor clarification in doc page * updated changelog
* added calc_azimuth_angle to pysam solar * removed azimuth specified in test_pvwatts_integration
…ariables (#798) * added draft of generalizing api key tools * generalized api methods properly * moved base environment var functions to core * removed old work * minor clean-ups to generalized stuff * removed commented out code * removed usage of globals() * started adding in test file * added another test and bugfix in loading environment variable from file * removed commented out code and added todos * updated so that setter method is called after _get_env_with_fallback * added doc strings to setter methods in nlr_developer_api_keys.py * refactored environment tools with help from Rob * minor changes to nlr_developer_api_keys * updated tests for env_tools * updated conftest.py files * updated doc page * updated conftest.py files and get_environment_variables * added doc page for debugging environment variable problems * updated doc page so formatting is nice * typo fix in model_overview.md * updates to doc pages * added set_vars as input to get_nlr_developer_api_credential and updated conftest.py files * updated debugging environment variables doc page * cleaned up some of test_env_tools.py * finished cleanups to test_env_tools.py * updated conftest.py files * updated changelog * Added new method to check for duplicate defined environment variables and to raise a user warning * changed executable code cell to python code block in doc page * commiting johns doc changes --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
* correct rate units from galUS to galUS/h * update pipe units for water from galUS to galUS/h * update changelog
* added draft of generalizing api key tools * generalized api methods properly * moved base environment var functions to core * removed old work * minor clean-ups to generalized stuff * removed commented out code * removed usage of globals() * started adding in test file * added another test and bugfix in loading environment variable from file * removed commented out code and added todos * updated so that setter method is called after _get_env_with_fallback * added doc strings to setter methods in nlr_developer_api_keys.py * refactored environment tools with help from Rob * minor changes to nlr_developer_api_keys * updated tests for env_tools * updated conftest.py files * updated doc page * updated conftest.py files and get_environment_variables * added doc page for debugging environment variable problems * updated doc page so formatting is nice * typo fix in model_overview.md * updates to doc pages * added set_vars as input to get_nlr_developer_api_credential and updated conftest.py files * updated debugging environment variables doc page * cleaned up some of test_env_tools.py * finished cleanups to test_env_tools.py * updated conftest.py files * updated changelog * Added new method to check for duplicate defined environment variables and to raise a user warning * changed executable code cell to python code block in doc page * trying to understand problem with openmeteo downloads * still trying to understand openmeteo downloads * got openmeteo solar data to work properly * minor change to solar_resource_base * cleaned up openmeteo solar data * removed print statement * minor cleanups to openmeteo solar model * added all resource files that could be used for testing - will likely remove some of these * Added big integration test of openmeteo solar models * updated openmeteo wind and moved make_time_index to utility file * removed 3 recently added resource files * updated solar resource test that was failing * added doc string and comments to new function in download_tools * removed commented out code from openmeteo solar * updated subtest values for example 13 and 26 * removed old download resource file and corresponding subtests * updated resource_index.md * updated changelog * Added fail-fast false to CI * Updated floris test --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
* Add nuclear thermal plant model with primary `heat` and `electricity` modes * Add HTSE/SOEC model with heat input --------- Co-authored-by: Daniel Mark Mikkelson <89001004104222@fedidcard.gov> Co-authored-by: mikkdm <74319124+mikkdm@users.noreply.github.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: John Jasa <john.jasa@nrel.gov>
* Adding inflation rate to numpy NPV calc * Update docs/finance_models/numpy_financial_npv.md Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com> * renaming discount_rate to real_discount_rate for numpy npv * Inconsequential change to trigger CI * add wacc calculation to numpy npv and clarify that the numpy npv model is pre-tax --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com> Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
* Updating throughout to remove last of doc warnings * Fix PR reference for docs build warnings Updated PR reference for fixing docs build warnings in CHANGELOG.
* Bug fix for output path handling * update changelog * update eia test to reflect expected failure mode * Changed EIA key logic to use monkeypatch --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
* updated how technology_graph edge data is added and added test and updated what info is given to the SLC model wrt upstream techs * updated slc baseclass method that would break with new use case * Making graph edges always a list * Updating commodity edges to always be lists * updated changelog * removed unused method and minor change --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
* added Path validator to schema validators * added unit test * Very minor type checking changes to yaml schema --------- Co-authored-by: John Jasa <johnjasa11@gmail.com>
* rename and move openloop_storage_control_base to remove 'storage' since it can be used for converters * update changelog and class hierarchy
* update changelog * Bump version number --------- Co-authored-by: kbrunik <kbrunik@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.9 release: develop -> main
New Features
EIANaturalGasFeedstockConfigandEIANaturalGasFeedstockCostModelto load EIA natural gas prices from file or to retrieve them from the EIA API. The model is able to retrieve the US or any of the 50 states' annual or monthly values, which will be converted into an hourly timeseries. PR 719PeakLoadManagementHeuristicOpenLoopStorageControlleras a storage control strategy. PR 641Updates
Modeling
ECOElectrolyzerPerformanceModelPR 690plant_lifein addition to scalar and per-timestep arrays. PR 700{commodity}_set_pointas an input to hydrogen fuel cell model PR 709n_control_windowton_control_window_hoursfor unit clarity PR 712AmmoniaSynLoopPerformanceModelPR 760constantpricing mode for Grid cost models, allowing an explicit scalar price configuration alongsideper_timestepandper_yearmodes. PR 764AmmoniaSynLoopPerformanceModeland splitAmmoniaSynLoopCostModelinto its own module. PR 770inflation_rateinput toNumpyFinancialNPVFinanceConfigthat is combined withreal_discount_ratevia the Fisher equation to form the effective rate passed tonumpy_financial.npv, allowing users to supply either a nominal discount rate (withinflation_rate=0, the default) or a real discount rate together with an explicit inflation rate. Matches how ProFAST combines its real discount rate andgeneral_inflationinputs. PR 788discount_rateinput toreal_discount_rateinNumpyFinancialNPVFinanceConfigto clarify that it is combined withinflation_ratevia the Fisher equation. The ProFAST models keep their existingdiscount_ratename. Updated the numpy NPV model, tests, docs, and the example 19 config accordingly. PR TBD{tech}_buy_priceinput directly to the technology's own buy-price input via OpenMDAO 3.44 input-to-input connections, so a singleprob.set_val()on (for example)grid.electricity_buy_pricenow propagates to the SLC. PR 791cost_per_tech: feedstockmode correctly sumsVarOpExfrom all upstream feedstocks for a multi-feedstock dispatchable, including a fuel-cell-style hydrogen-plus-oxygen scenario and a case with feedstocks at different graph depths. PR 793_compute_price_unitsand_compute_rate_unitsinh2integrate.finances.toolsand integrated usage of these functions into all finance models (numpy_financial_npv,profast_npv,profast_lco) accordingly. PR 786slc_configtoslc_topologyto distinguish it from the user-authoredcontrol_parametersblock. PR 784slc_configtoslc_topologyto distinguish it from the user-authoredcontrol_parametersblock. PR 784commodity_sell_priceinput toProFastNPVto be per year of the plant life. Also updatedBasicProFASTParameterConfig.as_dict()so explicitly input escalation values are not overwritten to the general inflation rate PR 799calc_azimuth_angle()toPYSAMSolarPlantPerformanceModelto provide default azimuth angle based on whether the site is in the northern or southern hemisphere PR 806OpenLoopStorageControlBasetoOpenLoopControlBaseandOpenLoopStorageControlBaseConfigtoOpenLoopControlBaseConfigand moved them out of the control storage sub-directory. PR 828Infrastructure
{commodity}_demandinputs to{commodity}_set_pointon all converter performance components to align with storage baseclass naming and distinguish converter operating targets from demand components. PR 691pose_optimizationPR 695feedstocks.pyhas moved fromh2integrate/core/toh2_integrate/feedstocksPR 719technology_interconnectionsPR 720H2IntegrateModel,load_yaml,write_yaml, andwrite_readable_yamlas package-level imports PR 728.h2integrate_model.pyby deferring imports of heavy dependencies until they are needed PR 762design_of_experimentstoparameter_sweepthroughout the codebase to avoid confusion with "Department of Energy" (DOE) in the energy domain. The core code supports both the newparameter_sweepand legacydesign_of_experimentsYAML keys for backward compatibility. Updated all driver configs, examples, tests, and documentation. Added generator type descriptions to the parameter sweep docs page and updated the run-cases docs to recommend parameter sweeps over manual for-loops. PR 768__init__.pyfiles to allow for direct imports of models from the package level and to ensure all models are properly imported and used insupported_models.pyPR 769PYSAMWindPlantPerformanceModelin examples 01 (01_onshore_steel_mn) and 02 (02_texas_ammonia), updating the affectedtest_steel_example/test_simple_ammonia_exampleexpected values, fixing a pre-existingcases.sqlcache-path bug and module-scoping the fixtures inh2integrate/postprocess/test/test_sql_timeseries_to_csv.pyso the example only runs once for all four tests. PR 782n_timesteps,dt,plant_life, andfraction_of_year_simulatedas attributes onCostModelBaseClass(matchingPerformanceModelBaseClass) and updated all cost and performance model subclasses acrossh2integrate/to use these attributes instead of reading them fromplant_config, removing redundant boilerplate from individual components. PR 783docs/generate_model_overview.py) that classifies every registered class insupported_modelsand appends the first sentence of each class's docstring. Migrated.readthedocs.yamlto invokedocs/build_book.shviabuild.commandsso hosted and local builds stay in sync. PR 787h2integrate/resource/utilities/file_tools.py::check_resource_dirto a general functionh2integrate/core/utilities/file_utils.py::check_data_dirwith a wrapped version for resource data (check_resource_dir) and feedstock data (check_feedstock_data). PR 791is_electricity_producerhelper fromh2integrate.core.commodity_stream_definitionsand the electricity-specific auto-detection branch inH2IntegrateModel, making finance-subgroupcommodity_streamresolution fully commodity-agnostic; updated exampleplant_config.yamlfiles that previously relied on the auto-detection to setcommodity_streamexplicitly. PR 786napoleon_use_ivarand addednapoleon_custom_sectionsso custom Google-style sections (Inputs, Outputs, Promoted Inputs, Promoted Outputs, Subsystems, Discrete Inputs, Discrete Outputs, Options, Behavior, Side Effects) render cleanly.etoc.toctreecategory emitted by autosummary:recursive:stubs._autosummary/files at the start of every docs build.Methods:docstring sections that collided with autodoc method discovery.:no-index:to hand-authored autoclass directives that duplicated autosummary entries.docs/_templates/autosummary/module.rsttemplate that filters pytestconftest.pysubmodules from generated stubs, eliminating the "failed to import conftest" warnings that appeared on the Read the Docs build.GeoH2SubsurfaceCostModelMyST label indocs/technology_models/geologic_hydrogen.mdtomathur-modified-geoh2-costto remove an ambiguous cross-reference with the autosummary entry for the Python class of the same name.h2integrate/core/file_utils.py::check_data_dirto allow for the creation of nested directories, not just the final subdirectory for smoother initialization of a feedstock directory PR 801.feedstock_dirto the EIA natural gas retrieval to align the downloading or loading of the feedstock data with the resource data methodology PR 801.commodityof inH2Integrate.create_technology_graphto use lists instead of strings to account for systems with multiple commodities connected between two technologies PR 823Fixes
check_inputsaroundStoragePerformanceModelPR 684