Skip to content

Commit

Permalink
Make IV capabilities optional (#90)
Browse files Browse the repository at this point in the history
* making iv optional

* add iv option to testing workflow
  • Loading branch information
kbonney authored Nov 9, 2023
1 parent 39f933c commit a888c40
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install pvops
run: |
python -m pip install --upgrade pip
pip install .
pip install .[iv]
- name: Test with pytest
run: |
pip install pytest pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ python:
- method: pip
path: .
extra_requirements:
- doc
- doc, iv
6 changes: 5 additions & 1 deletion docs/pages/moduleguides/iv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ IV Guide
Module Overview
----------------


These functions focus on current-voltage (IV) curve simulation and
classification.

.. note::
To use the capabilites in this module, pvOps must be installed with the ``iv`` option:
``pip install pvops[iv]``.


Tutorials that exemplify usage can be found at:
- `tutorial_iv_classifier.ipynb <https://github.com/sandialabs/pvOps/blob/master/tutorials/tutorial_iv_classifier.ipynb>`_.
- `tutorial_iv_diode_extractor.ipynb <https://github.com/sandialabs/pvOps/blob/master/tutorials/tutorial_iv_diode_extractor.ipynb>`_.
Expand Down
7 changes: 6 additions & 1 deletion pvops/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import warnings
from pvops import text
from pvops import text2time
from pvops import timeseries
from pvops import iv
try:
from pvops import iv
except ModuleNotFoundError:
# warnings.warn("")
pass

__version__ = '0.2.0'

Expand Down
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
'pvlib',
'pvanalytics',
'timezonefinder',
'pyDOE',
'tensorflow',
]

DOCS_REQUIRE = [
Expand All @@ -66,8 +64,14 @@
'sphinx_rtd_theme==1.3.0',
]

IV_REQUIRE = [
'keras',
'tensorflow',
'pyDOE',
]

EXTRAS_REQUIRE = {
'optional': ['ruptures'],
'iv': IV_REQUIRE,
'test': TESTS_REQUIRE,
'doc': DOCS_REQUIRE
}
Expand Down

0 comments on commit a888c40

Please sign in to comment.