Skip to main content

SolarOps

SolarOps is an open-source Python library for validating and analyzing one site's historical solar photovoltaic power data. It works offline without AI, weather services or an account.

What it does

  • Load CSV files and pandas DataFrames with explicitly declared units, timezone and cadence.
  • Report malformed timestamps, DST ambiguity, duplicates, missing intervals and unavailable values.
  • Measure timestamp presence and usable-value coverage over explicit periods.
  • Explicitly sort, resolve duplicates, convert units/timezones, regularize and downsample data.
  • Identify neutral flatline and configured-range observations, with evidence.
  • Calculate coverage-aware period/daily energy and recorded peak interval-average power.
  • Create structured JSON and standalone HTML reports, with optional Matplotlib plots.

Original datasets remain unchanged; transformations return new datasets with history and provenance. Missing production is never silently counted as zero. Patterns are observations to investigate, not confirmed equipment faults.

Install from source

Python 3.10+ is required. From a downloaded source tree or repository checkout:

python -m venv .venv
# Windows: .venv\Scripts\Activate.ps1
# Linux/macOS: source .venv/bin/activate
python -m pip install .
# Optional plots:
python -m pip install ".[visualization]"
# Contributors:
python -m pip install -e ".[dev,visualization]"

The distribution name and import name are both solarops, version 0.1.0. The candidate is being prepared for first publication; the source installation above is usable before PyPI publication is complete. Runtime dependencies are pandas and, on Windows, tzdata. Matplotlib is optional; pytest is a development extra.

Quick start

This self-contained example uses synthetic measurements:

import pandas as pd
from solarops import SolarDataset
from solarops.metrics import calculate_energy
from solarops.reporting import create_report

site = SolarDataset.from_dataframe(
    pd.DataFrame({
        "timestamp": pd.date_range("2026-06-01 10:00", periods=4, freq="15min"),
        "power_kw": [4.0, 4.0, 4.0, 4.0],
    }),
    timestamp_col="timestamp", power_col="power_kw",
    timezone="Europe/Brussels", interval="15min", unit="kW",
)
period = dict(start="2026-06-01 10:00", end="2026-06-01 11:00")
energy = calculate_energy(site, **period)
assert energy.values["accepted_energy_kwh"] == 4.0
print(energy.summary())

report = create_report(site, **period)
report.to_json("solar_report.json")
report.to_html("solar_report.html")

Exports refuse existing files unless overwrite=True. Flatline/range detection is opt-in and requires explicit caller parameters; reports never infer thresholds.

Data contract and limitations

Only interval-average power, declared as W or kW, is supported. Timestamps mark interval starts; analysis periods are [start, end). The fixed sampling interval and IANA site timezone are required. Naive times are localized strictly; ambiguous/nonexistent DST times are never guessed. Aware times preserve their represented instants. Daily metrics use actual local calendar-day durations.

Energy is observed over usable covered durations. A relaxed acceptance threshold does not recover unknown production or convert partial energy into a complete total. Peaks are maxima of recorded interval averages, not instantaneous maxima. Do not load instantaneous samples, interval energy, cumulative meters or household net import/export as if they were PV interval-average production. No forecasting, automatic repairs or equipment-fault diagnosis is provided. The initial alpha API may evolve. The current release has been tested locally on Windows/Python 3.12; the included CI matrix expands verification after the repository is published.

Documentation and examples

From a source checkout, run:

python -m pytest
python examples/validate_synthetic.py
python examples/preprocess_synthetic.py
python examples/detect_synthetic.py
python examples/metrics_synthetic.py
python examples/report_synthetic.py --output-dir examples/generated_reports --overwrite
python examples/visualize_synthetic.py --output-dir examples/generated_plots

Examples ship in the source distribution/repository. Generated files, downloaded real datasets, local environments and personal assets are excluded from publication. Real-data evaluation downloads are separate and documented; automated tests are offline.

Licence and acknowledgement

MIT licensed; see LICENSE. SolarOps is an independent project inspired by the general problem space of Solar Data Tools. It does not copy that project's source, is not affiliated with it, and does not imply endorsement. Solar Data Tools already offers established PV data-quality analysis and diagnostics; see the comparison and attribution. Third-party evaluation data retains its own licence and attribution, separate from the SolarOps MIT licence.

Metadata

Release files for solarops 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solarops 0.1.0
File Size Uploaded Provenance Actions
solarops-0.1.0.tar.gz 90.3 kB With provenance Details for solarops-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for solarops 0.1.0
File Interpreter ABI Platform Actions
solarops-0.1.0-py3-none-any.whl Python 3 none any Details for solarops-0.1.0-py3-none-any.whl

Total release size: 124.1 kB

Release files / solarops-0.1.0.tar.gz

Download URL solarops-0.1.0.tar.gz
Size 90.3 kB
Tags Source
SHA-256 checksum
How to use checksums
38ca090b9ff6d7a9f81cbcc8142c83de9897f65e5326057cb701ad24795bf514
BLAKE2b-256 checksum
How to use checksums
10247751a2abfc87c7b9f43fc30653e1261b6a16be40a645bd91e77da9b4869c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / solarops-0.1.0-py3-none-any.whl

Download URL solarops-0.1.0-py3-none-any.whl
Size 33.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bddc032763651c9a08bed76e58173af0826b93d3cf09d87f86a1e74f16f2c050
BLAKE2b-256 checksum
How to use checksums
e3b06079739f71dde609763f78ec3d95827fb893cdddeaa5a9233e6b999faf55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for solarops 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for solarops-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page