-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed api and web ui (if UI is really needed we will build this as a separate package) - Fixed CI and upgraded to python 3.11
- Loading branch information
1 parent
9a843f0
commit e1da42a
Showing
179 changed files
with
2,229 additions
and
19,320 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
make-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: select python version | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ".[doc]" | ||
- name: build documentation | ||
run: | | ||
cd docs | ||
make clean | ||
make html | ||
- name: deploy | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/_build/html | ||
force_orphan: true | ||
full_commit_message: ${{ github.event.head_commit.message }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Upload to PyPi | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
pypi-publish: | ||
name: upload release to PyPI | ||
runs-on: ubuntu-latest | ||
# Specifying a GitHub environment is optional, but strongly encouraged | ||
environment: release | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
# retrieve your distributions here | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Pytest | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
ci_test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ".[dev]" | ||
- name: Run pytest | ||
run: | | ||
pytest | ||
ci_ruff: | ||
runs-on: ubuntu-latest | ||
name: "ruff" | ||
steps: | ||
- uses: davidslusser/[email protected] | ||
with: | ||
src: "emerge" | ||
pip_install_command: "pip install -e .[dev]" | ||
python_version: "3.11" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
|
||
|
||
env | ||
.vscode/ | ||
|
||
# C extensions | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.8 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [--fix] | ||
# Run the formatter. | ||
- id: ruff-format |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
File renamed without changes
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
======== | ||
Scenario | ||
======== | ||
|
||
.. autofunction:: emerge.scenarios.scenario.create_der_scenarios | ||
|
||
.. autofunction:: emerge.scenarios.scenario.generate_scenarios |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
============ | ||
Enumerations | ||
============ | ||
|
||
.. autoclass:: emerge.scenarios.data_model.DERType | ||
:members: | ||
|
||
.. autoclass:: emerge.scenarios.data_model.CapacityStrategyEnum | ||
:members: | ||
|
||
.. autoclass:: emerge.scenarios.data_model.SelectionStrategyEnum | ||
:members: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
============= | ||
Documentation | ||
============= | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: References | ||
|
||
der-scenario | ||
selection-strategy | ||
sizing-strategy | ||
scenario-data-model | ||
enumerations |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
==================== | ||
Scenario Data Models | ||
==================== | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.CustomerModel | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.EnergyBasedSolarSizingStrategyInput | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.SizeWithProbabilityModel | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.DERScenarioInput | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.BasicDERModel | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.DistDERScenarioModel | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.LoadMetadataModel | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.DERScenarioInputModel | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.ScenarioBaseConfig | ||
:members: | ||
|
||
.. autopydantic_model:: emerge.scenarios.data_model.DERScenarioConfigModel | ||
:members: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
================== | ||
Selection Strategy | ||
================== | ||
|
||
|
||
.. autoclass:: emerge.scenarios.selection_strategy.RandomSelectionStrategy | ||
:members: | ||
|
||
.. autoclass:: emerge.scenarios.selection_strategy.CloseSelectionStrategy | ||
:members: | ||
|
||
.. autoclass:: emerge.scenarios.selection_strategy.FarSelectionStrategy | ||
:members: | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
================== | ||
Sizing Strategy | ||
================== | ||
|
||
|
||
.. autoclass:: emerge.scenarios.sizing_strategy.EnergyBasedSolarSizingStrategy | ||
:members: | ||
|
||
.. autoclass:: emerge.scenarios.sizing_strategy.PeakMultiplierSizingStrategy | ||
:members: | ||
|
||
.. autoclass:: emerge.scenarios.sizing_strategy.FixedSizingStrategy | ||
:members: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = "NREL-Emerge" | ||
copyright = "2024, Kapil Duwadi, Erik Pohl" | ||
author = "Kapil Duwadi, Erik Pohl" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"myst_parser", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.coverage", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.intersphinx", | ||
"sphinxcontrib.autodoc_pydantic", | ||
"sphinxcontrib.mermaid", | ||
] | ||
templates_path = ["_templates"] | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
autodoc_pydantic_model_show_json = False | ||
autodoc_pydantic_model_show_config_summary = False | ||
autodoc_pydantic_model_show_field_summary = False | ||
autodoc_inherit_docstrings = False | ||
autodoc_pydantic_field_show_constraints = False | ||
autodoc_pydantic_settings_show_validator_summary = False | ||
autodoc_pydantic_settings_show_validator_members = False | ||
autodoc_pydantic_validator_list_fields = False | ||
autodoc_pydantic_field_list_validators = False | ||
autodoc_pydantic_model_show_validator_summary = False | ||
|
||
html_theme = "pydata_sphinx_theme" | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_static_path = ["_static"] | ||
source_suffix = [".md", ".rst"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.