diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c09c349..f0c2f315 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,15 @@ # Changelog All notable changes to this project will be documented in this file. If you make a notable change to the project, please add a line describing the change to the "unreleased" section. The maintainers will make an effort to keep the [Github Releases](https://github.com/NREL/OpenOA/releases) page up to date with this changelog. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [2.2 - 2021-05-25] +## [2.2 - 2021-05-28] - IAV incorporation in AEP calculation - Set power to 0 for windspeeds above and below cutoff in IEC power curve function. - Split unit tests from regression tests and updated CI pipeline to run the full regression tests weekly. - Flake8 with Black code style implemented with git hook to run on commit - Updated long-term loss calculations to weight by monthly/daily long-term gross energy - Added wind turbine asset data to example ENGIE project +- Reduce amount of time it takes to run regression tests by decreasing number of monte carlo iterations. Reduce tolerance of float comparisons in plant analysis regression test. Linear regression on daily data is removed from test. - Bugfixes, such as fixing an improper python version specifier in setup.py and replacing some straggling references to the master branch with main. -- Reduce amount of time it takes to run regression tests by decreasing number of monte carlo iterations. Linear regression on daily data is also removed. ## [2.1 - 2021-02-17] - Modify bootstrapping approach for period of record sampling. Data is now sampled with replacement, across 100% of the POR data. diff --git a/operational_analysis/__init__.py b/operational_analysis/__init__.py index 7e379241..ee43e85b 100644 --- a/operational_analysis/__init__.py +++ b/operational_analysis/__init__.py @@ -1,4 +1,7 @@ __version__ = "2.2" +""" +When bumping version, please be sure to also update parameters in sphinx/conf.py +""" import os import json diff --git a/sphinx/conf.py b/sphinx/conf.py index aabbe479..ba52bbe6 100644 --- a/sphinx/conf.py +++ b/sphinx/conf.py @@ -20,25 +20,27 @@ import os import re import sys -import nbmerge -#Merge example Notebooks into one notebook to keep the required structure +import nbmerge + + +# Merge example Notebooks into one notebook to keep the required structure new_nb = nbmerge.merge_notebooks( - './', + "./", ( - './examples.ipynb', - '../examples/00_toolkit_examples.ipynb', - '../examples/01_qc_data.ipynb', - '../examples/02_plant_aep_analysis.ipynb', - '../examples/02b_augmented_plant_aep_analysis.ipynb', - '../examples/03_turbine_ideal_energy.ipynb', - '../examples/04_electrical_losses.ipynb', - '../examples/05_eya_gap_analysis.ipynb', - ) + "./examples.ipynb", + "../examples/00_toolkit_examples.ipynb", + "../examples/01_qc_data.ipynb", + "../examples/02_plant_aep_analysis.ipynb", + "../examples/02b_augmented_plant_aep_analysis.ipynb", + "../examples/03_turbine_ideal_energy.ipynb", + "../examples/04_electrical_losses.ipynb", + "../examples/05_eya_gap_analysis.ipynb", + ), ) -nbmerge.write_notebook(new_nb,'./examplesout.ipynb') +nbmerge.write_notebook(new_nb, "./examplesout.ipynb") -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath("..")) # -- General configuration ------------------------------------------------ @@ -49,31 +51,35 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.autodoc', - 'sphinx.ext.coverage', - 'sphinx.ext.mathjax', - 'sphinx.ext.ifconfig', - 'sphinx.ext.viewcode', - 'sphinx.ext.napoleon', - 'sphinx.ext.todo', - 'm2r','nbsphinx',] +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.coverage", + "sphinx.ext.mathjax", + "sphinx.ext.ifconfig", + "sphinx.ext.viewcode", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "m2r", + "nbsphinx", +] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # -source_suffix = ['.rst', '.md'] -#source_suffix = '.rst' +source_suffix = [".rst", ".md"] +# source_suffix = '.rst' # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = 'OpenOA' -copyright = '2018, NREL' -author = 'NREL PRUF OA Team' +project = "OpenOA" +copyright = "2021, NREL" +author = "NREL PRUF OA Team" + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -82,7 +88,8 @@ # Read the version from the __init__.py file without importing it def read(*names, **kwargs): with io.open( - os.path.join(os.path.dirname(__file__)[:-7], *names), encoding=kwargs.get("encoding", "utf8") + os.path.join(os.path.dirname(__file__)[:-7], *names), + encoding=kwargs.get("encoding", "utf8"), ) as fp: return fp.read() @@ -93,7 +100,8 @@ def find_version(*file_paths): if version_match: return version_match.group(1) raise RuntimeError("Unable to find version string.") - + + # The short X.Y version. version = find_version("operational_analysis", "__init__.py") # The full version, including alpha/beta/rc tags. @@ -109,10 +117,10 @@ def find_version(*file_paths): # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False @@ -123,24 +131,24 @@ def find_version(*file_paths): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = { - 'canonical_url': '', - 'analytics_id': '', + "canonical_url": "", + "analytics_id": "", # 'logo_only': False, - 'display_version': True, - 'prev_next_buttons_location': 'bottom', + "display_version": True, + "prev_next_buttons_location": "bottom", # 'style_external_links': False, # 'vcs_pageview_mode': 'display_github', # Toc options - 'collapse_navigation': False, - 'sticky_navigation': True, - 'navigation_depth': 4, + "collapse_navigation": False, + "sticky_navigation": True, + "navigation_depth": 4, # 'includehidden': True, # 'titles_only': False } @@ -148,13 +156,13 @@ def find_version(*file_paths): # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ["_static"] # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. -htmlhelp_basename = 'OpenOAdoc' +htmlhelp_basename = "OpenOAdoc" # -- Options for LaTeX output --------------------------------------------- @@ -163,15 +171,12 @@ def find_version(*file_paths): # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -181,8 +186,13 @@ def find_version(*file_paths): # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'OperationalAnalysis.tex', 'Operational Analysis Documentation', - 'NREL PRUF OA Team', 'manual'), + ( + master_doc, + "OperationalAnalysis.tex", + "Operational Analysis Documentation", + "NREL PRUF OA Team", + "manual", + ), ] @@ -190,10 +200,7 @@ def find_version(*file_paths): # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'operationalanalysis', 'Operational Analysis Documentation', - [author], 1) -] +man_pages = [(master_doc, "operationalanalysis", "Operational Analysis Documentation", [author], 1)] # -- Options for Texinfo output ------------------------------------------- @@ -202,13 +209,19 @@ def find_version(*file_paths): # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'OperationalAnalysis', 'Operational Analysis Documentation', - author, 'OperationalAnalysis', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "OperationalAnalysis", + "Operational Analysis Documentation", + author, + "OperationalAnalysis", + "One line description of project.", + "Miscellaneous", + ), ] # -- Options for Napolean napoleon_google_docstring = True napoleon_use_param = False napoleon_use_ivar = False -autoclass_content = 'both' +autoclass_content = "both"