Skip to content

Commit

Permalink
finishing touches for v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanperr committed May 28, 2021
1 parent 7c8f45c commit 177b0d6
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 58 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions operational_analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
125 changes: 69 additions & 56 deletions sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ------------------------------------------------

Expand All @@ -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
Expand All @@ -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()

Expand All @@ -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.
Expand All @@ -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
Expand All @@ -123,38 +131,38 @@ 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
}

# 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 ---------------------------------------------
Expand All @@ -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',
Expand All @@ -181,19 +186,21 @@ 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",
),
]


# -- Options for manual page output ---------------------------------------

# 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 -------------------------------------------
Expand All @@ -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"

0 comments on commit 177b0d6

Please sign in to comment.