Skip to content

Commit

Permalink
Merge pull request #45 from samgdotson/docs-examples
Browse files Browse the repository at this point in the history
Docs examples
  • Loading branch information
smpark7 authored Mar 18, 2024
2 parents 2de6af8 + 0841bff commit 976abcc
Show file tree
Hide file tree
Showing 14 changed files with 2,831 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ipynb linguist-vendored
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install flake8 pytest pyomo==6.4.1
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install CBC
run: |
Expand Down
5 changes: 4 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ build:
os: "ubuntu-20.04"
tools:
python: "3.9"
jobs:
post_install:
- pip install pyomo==6.4.1

sphinx:
configuration: docs/source/conf.py
Expand All @@ -13,4 +16,4 @@ python:
- method: pip
path: .
extra_requirements:
- doc
- doc
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ cd osier
pip install .
# to also install the documentation dependencies
pip install .[doc]

# followed by
pip install pyomo==6.4.1
```


```{note}
Although `pyomo` is a dependency, the current version of `pyomo` (6.7.1, as of 2/29/24) has a bug
that prints erroneous errors during an `osier` simulation. Therefore, users are recommended to
install a specific version of `pyomo` after the main installation of `osier`. There is an open issue [#50](https://github.com/arfc/osier/issues/50)
related to this concern.
```

## Documentation
Expand Down
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
extensions = [
"myst_parser",
"sphinx.ext.napoleon",
"sphinx.ext.duration",
"sphinx.ext.autosectionlabel",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
Expand All @@ -41,6 +43,7 @@
"sphinx_design",
"sphinx.ext.mathjax",
"sphinx.ext.coverage",
"nbsphinx",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
944 changes: 944 additions & 0 deletions docs/source/examples/capacity_expansion_tutorial.ipynb

Large diffs are not rendered by default.

533 changes: 533 additions & 0 deletions docs/source/examples/dispatch_tutorial.ipynb

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/source/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `Osier` Examples


This section has examples that guide users from basic usage to more advanced topics.


## Guides
```{toctree}
:maxdepth: 3
tech_tutorial
dispatch_tutorial
capacity_expansion_tutorial
```
Loading

0 comments on commit 976abcc

Please sign in to comment.