How sandialabs/pvops works
Project type and purpose
• pvops is an open-source Python library (not a web app) for fusing text-based metadata with time-series performance data from photovoltaic sites.
• Its purpose is to provide pipelines for:
• Text processing and classification (pvops/text)
• Converting text events into time stamps (pvops/text2time)
• Time-series preprocessing and modeling (pvops/timeseries)
• I-V curve analysis and simulation (pvops/iv)
File structure
• Top-level directories:
• pvops/ ← source code, organized by module
• pvops/tests/ ← unit/fixture tests
• tutorials/ ← example notebooks + data
• docs/ ← Sphinx documentation
• Inside pvops/, main submodules:
• text/ ← NLP, classification, utilities
• text2time/ ← text-to-timestamp logic, visualization
• timeseries/ ← TS preprocessing, model implementations
• iv/ ← I-V data extractors, physics utils, simulators
• Cross-cutting utilities:
• Configuration & CI:
• setup.py, requirements.txt, noxfile.py, .github/workflows for build/test, .readthedocs.yml
README for additional insights
• Confirms module breakdown and links to in-depth docs/tutorials on ReadTheDocs.
• No runtime external services (DBs or APIs), this is purely a library with data inputs/outputs.
a. Main components:
• Data Inputs
– Raw text logs/notes (tutorials/example_data, stopwords.txt)
– Raw production time-series (CSV example data)
– I-V measurement files
• Core Modules
1. Text Processing (pvops/text)
2. Text2Time Converter (pvops/text2time)
3. Time-Series Processor & Models (pvops/timeseries)
4. I-V Analyzer & Simulator (pvops/iv)
• Outputs
– Cleaned time-series with event timestamps
– Model predictions/metrics
• Documentation & CI
– Sphinx docs (docs/)
– Automated tests (pvops/tests/, GitHub Actions)
b. Relationships & interactions:
1. Raw text flows into Text Processing ⇒ cleaned tokens, classifications
2. Classified events feed into Text2Time ⇒ timestamped events aligned with time-series
3. Time-series preprocessor ingests raw CSV + timestamped events ⇒ feature matrices
4. Processed data goes into Models (in timeseries/models and iv/models) ⇒ predictions
5. Visualization modules produce plots at each stage
6. Tests validate each submodule in isolation
7. Tutorials/instruction notebooks orchestrate end-to-end pipelines
c. Architectural patterns / design principles:
• Modular design: clearly delineated subpackages by domain (Single Responsibility)
• Pluggable models: timeseries/models and iv/models define interchangeable algorithms
• Test harness: pytest structure in pvops/tests to ensure stability
• Documentation-driven: Sphinx source under docs/ auto-published
d. Technologies, frameworks, libraries:
• Python 3.x, setuptools (setup.py), pip install
• pytest for tests, nox for multi-session testing
• Sphinx for docs, Jupyter notebooks for tutorials
• numpy, pandas, scikit-learn (implied), matplotlib/seaborn
Elements
• Clear labels: name each module (text, text2time, timeseries, iv)
• “Core Library”
• “Data”
• “Documentation & CI”
• “Tutorials & Examples”