Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
0.17.0 - 2026-07-30
Added
New data prep stage: adjustments applied between load and
setup()are now declared, serialized, and replayed.CapDatagainsprep,prep_convert_units,prep_scale,prep_astype,prep_custom,prep_to_config,run_prep, anddescribe_prep;CapTestgainsmeas_prep/sim_prep, replayed after every load (includingreload) and written to the yaml config. See the new “Preparing Data” user guide page.CapData.drop_colsandCapData.rename_colsnow record a prep step by default and acceptrecord=Falsefor internal callers.New
CapData.rerun_filters_from(index)— partial pipeline re-run: truncates the chain to the retained prefix and re-runs the tail as live step objects with their current param values.Added
CapData.filter_backtracking()(and the underlyingBacktrackingfilter step) to remove single-axis-tracker backtracking intervals from the data. Backtracking activity is determined per interval from solar position and tracker geometry using the same geometric test as pvlib’stracking.singleaxis. Tracker geometry (axis_tilt,axis_azimuth,gcr,cross_axis_tilt) defaults to thesiterecord set byload_dataand can be overridden per call;keep_backtracking=Trueinverts the filter to keep only backtracking intervals. When site/geometry are unavailable or invalid, the filter warns and makes no change.New
captest.filtersmodule holding the entire filter-step surface: theBaseSummaryStep/BaseFilterbase classes and the concrete step classesIrradiance,Sensors,Time,Custom,Outliers,Clearsky,Pvsyst,Shade,PowerFactor,Power,Days,Missing,Regression, andRepCond. Each filter is now a first-class object with typedparamparameters, so steps can be constructed and run directly (e.g.Irradiance(low=200, high=800).run(cd)), inspected, reordered, and replayed. The row-filter helper functions (filter_irr,sensor_filter,check_all_perc_diff_comb, …) moved here fromcapdata.py.New
captest.clearskymodule — the clear-sky modeling functions (csky,pvlib_location,pvlib_system,get_tz_index) were extracted fromcapdata.py. (Clear-sky filtering is the separateClearskystep, which callspvlib.clearsky.detect_clearskydirectly.)Added
CapData.describe_filters()— a written, human-readable summary of a filtering run, built from each step’sexplanation(complementary to the tabularget_summary()).Added
CapData.filters_to_config()andCapData.run_pipeline(config)to serialize the filter chain to a list of plain dicts and replay it. The CapTest single-file YAML (to_yaml/from_yaml) now round-trips both themeasandsimfilter pipelines viameas_filters/sim_filterskeys.Added a
custom_namekeyword to everyCapData.filter_*wrapper method (and torep_cond/fit_regression) so steps can be labeled in the summary and plots without constructing the step class directly.Added a
function_namecolumn toget_summary()that retains the actual step class name even when acustom_nameis set.Added the
CapTest.auto_wrap_simparameter (defaultTrue). When the measured test falls within 60 days of a calendar-year boundary,CapTest.setup()now automatically wraps the simulated data into a contiguous year so it aligns with the year-end-spanning measured data — no manual step required. The auto-wrap is idempotent and reversible (setauto_wrap_sim=Falseand re-runsetup()to restore the un-wrapped sim data).Added
CapTest.rcas the single owner of a test’s reporting conditions. It is settable for manual override (ct.rc = df, a one-row DataFrame / Series / dict), which validates that every right-hand-side regression variable of the shared meas/sim formula is covered and records the source as"manual". Reporting conditions computed viarep_cond(onct.meas/ct.sim, orct.rep_cond(which=...)) now populateCapTest.rcautomatically — last-writer-wins, with a warning only when the source changes — and the single test RC round-trips throughto_yaml/from_yaml.New filter classes and
CapData.filter_*wrappers promoting filters that were previously passed tofilter_custominto first-class steps:RollingStd/filter_rolling_std(removes intervals whose rolling-window standard deviation is at or above a threshold — unstable/variable irradiance),AbsDiffPrev/filter_abs_diff_prev(removes intervals whose absolute fractional change from the previous interval exceeds a threshold), andBooleanFlag/filter_flag(removes intervals where a boolean/flag column is truthy, with aninverttoggle to keep only the truthy rows). AddedCapData.filter_threshold(column, low, high)— a one-sided or two-sided inclusive threshold on any column, backed by theIrradiancestep. AddedCapData.filter_sensors_abs_diff(thresholds)for the absolute-difference sensor comparison.New
CapTest.inv_ac_nameplateparam — per-inverter AC nameplate rating (kW); plant metadata and a convenient starting point for per-inverter clipping thresholds, round-trips through to_yaml/from_yaml.New
CapTest.to_mapping()— public dict export of the config mapping to_yaml writes; symmetric with from_mapping.RC-staleness warning: an RC-changing write now warns once, naming applied
ref_val='rep_irr'/'self_val'filter steps that resolved against the previous reporting conditions (merged with the rc_source-change warning when both apply); loading a config with RepCond steps in both pipelines under a computed rc_source warns that the configuration is ambiguous.CapTest.setup(side=...)— per-side setup that re-wires only the target CapData (sim-side setup may read meas but mutates only sim);CapTest.reload(side)— re-load one side from its stored path/loader and re-run per-side setup.reloadacceptspath=to point the side at a new data file (the new path replaces the stored one for later reloads and serialization) and preserves the outgoing side’s applied filter chain as its pending config sorun_test(side=...)re-applies it against the fresh data.New
CapTest.run_test(side='both'|'meas'|'sim')— one-call orchestrator (setup → pipeline replay, rc_source side first → fit → RC verification →CapTestResults); per-side runs re-run one chain and leave the other untouched.New
run_setupflag (defaultTrue) onCapTest.from_params/from_yaml/from_mapping— passFalsefor load-only construction: data is loaded butsetup()is skipped (no scalar propagation, no regression-column processing, nothing seeded); a latersetup()orrun_test()proceeds normally. New publicCapTest.meas_filters_pending/sim_filters_pendingattributes hold the config’s serialized filter pipelines untilrun_testreplays and consumes them (retained, with recovery guidance attached to the error, when a replay fails).
Changed
Value-rewriting prep steps raise if run after filters are applied; call
reset_filter()first. Column drops and renames are unaffected.ReportingIrradiance.plotnow detects a missing reporting irradiance withpd.isnarather than an identity test againstnp.nan. The identity form only held for that exact object, so a NaNirr_rcarriving as anumpy.float64took the branch that indexes the filtered data with NaN and raised aKeyError. The reporting-irradiance markers are now omitted for any NaN.Development tooling:
uv.lockis no longer committed, so CI resolves dependencies fresh and surfaces upstream breakage early. The ruff lint rule set is now pinned explicitly inpyproject.toml(E4,E7,E9,F,I,UP,SIM,C4) rather than inheriting ruff’s default selection, which changes between releases. Design specs and implementation plans underdocs/specs/anddocs/superpowers/are excluded from ruff, which now formats python code blocks in markdown. The pre-commit ruff revision and therufffloor both track 0.16.0 so local hooks and CI run the same version. Source was updated for the newly enabled rules (f-strings, import sorting, comprehensions); no behavior changed.Modernized the docs toolchain for current Python:
sphinx>=8.1,sphinx_rtd_theme>=3.0,nbsphinx>=0.9.7, andmyst-parserreplacing the archivedrecommonmark(dropped the staledocutilspin). The example notebooks (captest_class,captest_class_bifi,concise_capacity_test) now apply filter methods directly instead of the removed module-levelrun_teststep lists, so they execute cleanly during the docs build.Breaking:
CapTest.from_yaml/from_mappingno longer apply the config’s filter pipelines at load. Pipelines are stored on the instance asmeas_filters_pending/sim_filters_pendingand run byrun_test()(or manually viaCapData.run_pipeline), so a freshly loaded test holds unfiltered data for review andfrom_yaml(path).run_test()executes each pipeline exactly once. Consequently, after loading a config with a computedrc_source,ct.rcisNoneuntil the filters run; manual-RC configs are unchanged (values are validated and seeded during the construction-timesetup()).CapData.run_pipelinenow resets the applied chain before rebuilding (replay is restore-then-re-run); appending a pipeline onto an existing chain is no longer supported.Replay rollback is now a full state transaction for both
CapData.run_pipelineandCapData.rerun_filters_from: a failing step restores the filter chain, each re-run step’s runtime state,rc/rc_tool, and — when the CapData belongs to a CapTest — the test-level reporting conditions and their provenance (rc/rc_source) to their pre-call values, and attaches a note naming the failing step (Python 3.11+).CapTest.captest_results()now returns a structuredCapTestResultsobject (cap_ratio, pval-checked ratio, pass/fail + bounds, expected/actual/tested capacity, per-side points used, per-side regression tables, RC + provenance) instead of a bare float; the legacy printed report isstr(results)and the p-value Styler isresults.styled_pvalues(). On mismatched regression formulas the method still warns and now explicitly returnsNone. The module-levelprint_resultshelper is removed — its output lives on asCapTestResults.summary()— andcaptest_results_check_pvaluesis now a thin display wrapper over a singlecaptest_resultscall (same Styler return and printed cap-ratio lines).CapTest.captest_results(check_pvalues=True)now reports the p-value-checked predictions consistently throughout the results:cap_ratio,actual_capacity,expected_capacity,tested_capacity, and the pass/fail decision all use the headline (checked) values, and the newCapTestResults.pvalues_checkedflag records which variant is the headline (cap_ratio_pval_checkstill always carries the checked ratio). Also,CapTest.run_test()no longer overwrites a manual reporting-conditions value (rc_source='manual') when a replayed pipeline contains a RepCond step — the manual RC stays authoritative and the step computes a side-local RC only, matching thefrom_yaml/from_mappingreplay semantics.BaseSummaryStep.runnow rolls back steps appended by nested filter calls when_executeraises, andCapData._calc_rep_condassignsrc/rc_toolonly after computation succeeds (restoring the priorrcif CapTest propagation fails) — a failed step leaves the pipeline and RC state unchanged.Breaking: Filter steps now reject assignment to names that are neither a declared
paramparameter nor known runtime state, raisingAttributeErrorwith a close-match suggestion.Breaking:
CapData.data_filteredis now a derived, read-only property — thedatarows kept by the last filter (a defensive copy), ordatawhen no filters have run. It has no setter; clear filtering withCapData.reset_filter(). Code that assigned todata_filtereddirectly must drop the assignment.Breaking: Removed the
inplacekeyword from allCapData.filter_*methods and fromfit_regression— filters always act in place and record a step. Theinplace=Falsepreview path (returning a DataFrame without recording a step) is gone. (rep_cond_freqkeeps itsinplacetoggle, which is compute-and-return, not filtering.)Breaking: Dropped the
Filterprefix from the filter step class names and expanded the terse ones (FilterIrr→Irradiance,FilterPf→PowerFactor,FilterPvsyst→Pvsyst, etc.).FILTER_REGISTRYholds only the new names, so any YAML pipeline configs written with the oldtypestrings must be regenerated (step_from_configraises a close-match suggestion for unknown types).Converted
CapData.rep_condto aRepCondzero-removal step so the reporting-conditions calculation appears in the summary at its position in the filter chain.Reporting conditions are now owned at the test level by
CapTest.rcrather than read per-CapData.captest_resultspredicts both regressions atCapTest.rcand raisesValueErrorwhen it is unset;CapTest.rep_cond(which=None)defaults to the currentrc_source; andfilter_irr(ref_val="rep_irr")within aCapTestresolves against the single test RC, so asimfilter can anchor on the test’s reporting irradiance without passing the value manually.Breaking: Renamed the
CapTest.rep_cond_sourceparameter toCapTest.rc_source, matching the newCapTest.rcattribute it describes. The name changed everywhere it appears: the constructor keyword offrom_params/from_mapping, the attribute, and thecaptestkey written byto_yaml. Configs written by v0.16.0 will not load —from_yaml/from_mappingraiseValueError: Unknown key 'rep_cond_source' under the 'captest' sub-mapping. Did you mean 'rc_source'?— so rename the key in any saved config (and any script passing it) before loading.Removed the internal
summary/summary_ix/removed/keptmirror lists, thefilter_countsdict, and theupdate_summarydecorator.get_summary(),describe_filters(), and the visualization methods (scatter_filters,timeseries_filters,get_filtering_table) now derive everything from theCapData.filterschain.scatter_filters()andtimeseries_filters()now draw the retained-points layer last so surviving points render on top of the removed-point layers.Breaking: Removed the
wrap_yearparameter fromCapData.filter_time(and theTimefilter). Year-end wrapping of the simulated data is no longer a manual filter step — it now happens automatically atCapTest.setup()time via the newCapTest.auto_wrap_simparameter (see Added). Code that calledfilter_time(..., wrap_year=True)to align a year-end-spanning test should drop that argument and letCapTestwrap the sim data on setup.Breaking: Unified the
Sensorsfilter’s sensor-comparison selection. TheSensorsstep now takesmethod('percent_diff'or'abs_diff', or a customfunc(series, threshold) -> boolcallable) andthresholds(renamed fromperc_diff); the separaterow_filterparameter is removed.CapData.filter_sensors(perc_diff=..., row_filter=...)becomesfilter_sensors(thresholds=..., method=...). Callers that passedrow_filter=abs_diff_from_averageshould use the newfilter_sensors_abs_diff(...)wrapper ormethod='abs_diff'. Thecheck_all_perc_diff_combhelper is no longer re-exported fromcaptest.capdata; import it fromcaptest.filters.
Removed
Breaking: removed the
single_irr_weighted_tempparameter ofprtest.perf_ratio_temp_corr_nrel. Passing it now raisesTypeError; remove the argument from calling code, which will produce the same PR it always should have. The option collapsed the per-interval cell temperatures to a single irradiance weighted mean before temperature correcting, but it cannot change the reportedpr: the correction factor is linear in cell temperature and each interval’s contribution to the expected DC is weighted by its POA irradiance — the same weight used to average the temperature — sosum_i G_i * (1 + g * (T_i - b))and(1 + g * (T_w - b)) * sum_i G_iare identical. The option appeared to change the result only while the correction was applied as a division (see the fix below), which is not linear in temperature. Contract language calling for a single irradiance weighted cell temperature is already satisfied by the per-interval calculation.Removed the legacy module-level
capdata.run_test(cd, steps)(imperative method+args tuples); the name is reused by the newCapTest.run_test()orchestrator. Config-driven pipelines (run_pipeline,from_yaml) supersede it.
Fixed
import captestno longer raisesAttributeError: module 'importlib' has no attribute 'util'in a minimal install.calcparams,plotting, andcapdatacallimportlib.util.find_specto detect optional dependencies but only didimport importlib, which does not bind theutilsubmodule; the import happened to work only when another installed package had already importedimportlib.util. All three nowimport importlib.utilexplicitly.prtest.perf_ratio_temp_corr_nrelnow multiplies the DC nameplate by the temperature correction factor1 + (power_temp_coeff / 100) * (temp_cell - base_temp)instead of dividing by it, matching the weather-corrected performance ratio defined in NREL/TP-5200-57991. The division inverted the correction: cell temperatures abovebase_tempraised the expected DC in the denominator rather than lowering it, so reported PR values were biased low for hot conditions and high for cold ones. PR values computed with this function will change.Remote URIs (e.g.
s3://bucket/...) and path objects now work consistently for every path argument to the loaders, not just thepathargument ofload_data/DataLoader.util.read_jsonandutil.read_yamlread throughUPathinstead of the built-inopen, so they resolve fsspec-backed URIs;load_datano longer wrapsgroup_columnsandsiteinpathlib.Path, which corrupted the scheme of a URI (s3://bucket→s3:/bucket) and caused a remotesitefile to be silently skipped.load_data,load_pvsyst, andload_excel_column_groupsnow also acceptpathlib.PathandUPathinstances in addition to strings, andDataLoader.loadpasses the path tofile_readeras a string so fsspec-aware readers such aspandas.read_csvaccept it.CapTest._maybe_wrap_sim_year_endnow uses a fixed July 1 → June 30 wrap window (derived fromsim_year) instead of one centered on the measured test dates, so a measured test within 60 days of the year boundary produces a contiguous 8760-row wrapped sim year.
0.16.0 - 2026-06-24
Added
Added
bifi_power_tc_meas_tbompreset test setup using field-measured back-of-module temperature.Added
bifi_e2848_etotal_rear_shade_measpreset test setup that applies rear-shading losses on the measured side via thee_totalrear_shadefactor (the modeled rear maps directly to PVsystGlobBak).Added
bifi_power_tc_etotal_rear_shade_simandbifi_power_tc_etotal_rear_shade_measpreset test setups: temperature-corrected power regressed against total effective irradiance, with rear shading handled in the modeled data or on the measured side, respectively.Added
bifi_e2848_etotal_rear_shade_sim_spec_correctedandbifi_e2848_etotal_rear_shade_meas_spec_correctedpreset test setups combining the total-irradiance regression with the First Solar spectral correction applied to front-side POA.Added a required
descriptionkey toTEST_SETUPSregistry entries and updated validation.Added a “Predefined Test Setups” section to the API reference and updated user guides for new presets.
Added Sphinx documentation stubs for
validate_test_setup,resolve_test_setup, andperc_wrap.Exposed
test_setupsas a top-level export (captest.test_setups) so the available preset names and descriptions can be printed directly.
Changed
Renamed the
bifi_power_tcpreset test setup tobifi_power_tc_calc_tbom.Breaking: Renamed the
bifi_e2848_etotalpreset test setup tobifi_e2848_etotal_rear_shade_simso the name states that rear shading is handled in the modeled (PVsyst) data (rpoa_pvsyst = GlobBak + BackShd). The newbifi_e2848_etotal_rear_shade_measvariant handles rear shading on the measured side.Modified
CapData.rep_condparameter order! If you were relying on the ability to pass kwargs as positional args you will now be passing the WRONG arguments.Updated
CapData.rep_conddoc string to more clearly describe default calculations defined incaptest.TEST_SETUPSRemoved the redundant
front_poaparameter fromTEST_SETUPSpresets whereirr_balisFalse.CapData.process_regression_columns(andCapTest.setup) now print a “Reusing existing column ‘_ _agg’; skipping aggregation of the group.” message when a pre-aggregated column already exists in the data and aggregation is skipped. Previously the reuse was silent, so verbose output only showed “Aggregating …” blocks for groups whose agg column was missing. Allowed fully suppressing printed output from load_data function by passing verbose=False, summary=False, and report=False.
Fixed
CapData.agg_groupnow passesmin_count=1forsumaggregations so a row where every column in the group isNaNaggregates toNaNinstead of0.0. This was most visible for single-column power groups (e.g. mappingpowerto('real_pwr_mtr', 'sum')inregression_cols), where summing is a no-op but previously converted missing values into a real zero that then flowed into filtering and regression.
0.15.1 - 2026-05-12
Fixed
404 Error for examples launch binder badge
0.15.0 - 2026-05-12
Added
New
captest.captestmodule. ExportsCapTest,TEST_SETUPS, the three scatter callablesscatter_default,scatter_etotal,scatter_bifi_power_tc, and the helpersperc_wrap,print_results,highlight_pvals,load_config,resolve_test_setup,validate_test_setup.New
CapTestclass (captest.captest.CapTest) — Binds a measured and a modeledCapDatatogether, holds every test-level setting (regression formula, reporting-conditions recipe, filter bounds, nameplate, tolerance, calc-params scalars), and drives the full capacity-test workflow from a single object.New
TEST_SETUPSregistry of named regression presets shipped with pvcaptest. Four presets ship:e2848_default(default ASTM E2848),bifi_e2848_etotal(bifacial ASTM withe_total),bifi_power_tc(temperature-corrected bifacialpower ~ poa + rpoa), ande2848_spec_corrected_poa(ASTM with a spectral-correction factor applied to POA irradiance).New
process_regression_columnsmethod onCapData, which recursively walks theregression_colsdictionary.New calcparams module with simple functions that return calculated regressors. E.g., the
e_totalfunction calculates total POA irradiance from front and rear POA.New
captest.calcparamsfunctions for spectrally corrected irradiance tests:apparent_zenith,apparent_zenith_pvsyst(handles the PVsyst half-hour timestamp shift internally),absolute_airmass,precipitable_water_gueymard,scale,spectral_factor_firstsolar,multiply, and the named aliaspoa_spec_corrected.New
captest.calcparamsfunctions to support the defaultTEST_SETUPS:e_total,rpoa_pvsyst,avg_typ_cell_temp,cell_temp,bom_temp,power_temp_correct.CapTest.from_yaml/CapTest.to_yamlfor a curated round-trip through a yaml config file.New
ScatterPlotandScatterBifiPowerTcclasses incaptest.plottingthat are used with the shipped scatter callables (scatter_default,scatter_etotal,scatter_bifi_power_tc).POA vs power scatter plots can be split so morning and afternoon points are a different color or different marker (glyph).
POA vs power scatter plot function includes kwargs to switch between plotting raw power or temperature corrected power.
Documentation: new user-guide page
user_guide/captestdescribing use of CapTest class.
Changed
Breaking: The
agg_sensorsmethod no longer updates theregression_colsdictionary. This functionality has been moved toprocess_regression_columns.CapData.filter_timenow defaultsendto the last timestamp ofdata_filteredwhen onlystartis provided withoutdays, and defaultsstartto the first timestamp ofdata_filteredwhen onlyendis provided withoutdays.Breaking: the module-level cross-
CapDatafunctionscapdata.captest_results,capdata.captest_results_check_pvalues,capdata.pick_attr,capdata.get_summary(*args),capdata.overlay_scatters,capdata.determine_pass_or_fail, andplotting.residual_plothave been removed. Equivalent methods now live onCapTest(ct.captest_results(),ct.captest_results_check_pvalues(),ct.get_summary(),ct.overlay_scatters(),ct.determine_pass_or_fail(),ct.residual_plot()).pick_attris superseded by therep_cond_sourceparameter onCapTest. Single-CapDatacd.get_summary()is unchanged.Breaking: The
CapData.rep_condmethod has had the calculation of reporting conditions for multiple time periods moved to a separate method -rep_cond_freq.Breaking:
CapData.rep_condandCapData.rep_cond_freqare now formula-agnostic: they derive rhs variables fromregression_formulaviautil.parse_regression_formula.CapData.scatterandCapData.scatter_hvare now formula-agnostic thin wrappers: they resolve the y (lhs) and x (first rhs) columns fromregression_formularather than hardcoding"power"and"poa". For non-default regression presets preferCapTest.scatter_plots, which picks the correct scatter callable (single or multi-panel) from the resolved preset.In
filter_irrthe string to use the reporting irradiance as the reference irradiance to filter around has been changed fromrep_irr.
Convention
The left-hand-side key of the regression formula is always
"power"across shippedTEST_SETUPSpresets, even when the formula regresses a derived quantity like temperature-corrected power. Code that hardcodes"power"as the lhs key continues to work with all shipped presets.
0.14.0 - 2026-04-07
Added
perf_ratio_temp_corr_nrelaccepts measured back-of-module temperature viatemp_bomparameter, skipping the BOM calculation from ambient temp and wind.perf_ratio_temp_corr_nrelacceptssingle_irr_weighted_tempparameter to use a single irradiance-weighted cell temperature for the correction.Plotting function
residual_plotto create plots of residuals vs regression parameters.load_datacan be used with the defaultfile_readerto load csv files from an S3 bucket. Requires the new optional dependencys3fs.agg_sensorsmethod verbose option, which prints summary of aggregations.Column groups are now accessible as attributes of
CapDatainstances (e.g.,cd.poareturns the data for thepoagroup). Attributes are created automatically whenload_datais called or whenCapData.create_column_group_attributes()is called manually.CapData.rename_cols()method to rename columns consistently acrossdata,data_filtered, andcolumn_groups.agg_sensorssupports nested subgroup aggregation: pass a dictionary as the value for a group inagg_mapto first aggregate subgroups and then aggregate the subgroup results. Aggregated columns are added to a new"agg"key incolumn_groupsand are accessible asCapDataattributes prefixed withaggs_.CapData.plot()andplotting.plot()accept aplot_defaults_pathparameter to explicitly specify the path to the plot defaults JSON file.
Changed
DataLoader.loadnow has asummaryparameter (defaultTrue) that controls file loading status output.verbosedefault changed fromTruetoFalseand now enables both summary output and detailed reindexing information.DataLoader._reindex_loaded_filesandDataLoader._join_filesrenamed toreindex_loaded_filesandjoin_files(public API).load_datanow skips sort, drop_duplicates, and reindex when no data is loaded and issues a warning instead of raising an error.Failed-to-load troubleshooting message now includes kwargs passed to
file_reader.filter_clearskyno longer acceptswindow_lengthas a direct parameter. It now defaults toinfer_limits=True(pvlib recommended, Reno 2016). Passwindow_lengthand other pvlibdetect_clearskyparameters via**kwargs.filter_missingrefactored to use theflocindexer; thecolumnsparameter now accepts column group keys in addition to column names.
Fixed
Removed stale references to the removed
irr_rc_balancedfunction from docstrings ofperc_bounds,rep_cond, andpredict_capacities. These now referenceReportingIrradiance, the class that replaced it.rep_conddocstring now documents that whenirr_bal=True, the reporting temperature and wind speed are the means of the data within the balanced irradiance band.CapData.plot()now reads and writes a per-instance defaults file namedplot_defaults_{name}.jsoninstead of the sharedplot_defaults.json, preventing conflicts when multipleCapDataobjects are used in the same session (issue #117).Columns listed in the plot defaults file that are no longer present in the data are ignored with a
UserWarningrather than causing an error. If all stored columns are missing, the dashboard falls back to auto-detected default groups (issue #115).Fixed inaccurate docstring note: the plot defaults file is resolved relative to the current working directory, not the calling file’s directory.
filter_clearskypositional arg bug wherewindow_lengthwas passed asinfer_limitsto pvlib’sdetect_clearsky.filter_outliersnow detects NaN values in the poa and power columns before fitting the EllipticEnvelope. AUserWarningis issued andfilter_missingis automatically called on those columns; both are recorded in the filter summary.filter_powerno longer incorrectly removes rows with NaN values when filtering on a multi-column power group.DataLoader.loadno longer raisesUnboundLocalErrorwhen all files fail to load; setsdatatoNoneand issues a warning.reindex_datetimenow handles duplicate indices by dropping duplicates and warning instead of raising aValueError.filter_irrno longer uses pandasquery(), fixing a compatibility error with pandas v2.2.3.
0.13.4 - 2026-02-17
Changed
Removed upper version limits for numpy, pandas, and param dependencies
Replaced use of deprecated
copykwarg removed in numpy 2.4Removed use of pytz package and refactored timezone handling
Fixed
p-value checking for pandas 2 and 3 compatibility
param 2.0 deprecation for passing positional arg to ClassSelector
Various deprecation warnings in tests
Errors due to pandas 3.0 API changes, compatability for copy-on-write changes
0.13.3 - 2026-02-06
Changed
Migrated from versioneer to setuptools-scm for git-based version management
Migrated from setup.py to modern pyproject.toml with [project] section
Added uv for dependency management and development workflows
Updated version access to use
importlib.metadata.version()Updated
numpyversion constraint to<2.4.0for compatibility, temporarilyUpdated
paramversion constraint to<2.0for compatibilityUpdated
pandasversion constraint to<3.0for compatibility, temporarilyUpdated development status classifier to “4 - Beta”
Simplified license metadata format in pyproject.toml
Moved testing and documentation dependencies to dependency-groups
Updated read the docs configuration to use uv
Removed
setup.py (all configuration moved to pyproject.toml)
Versioneer dependency and configuration
scipy dependency (replaced scipy.stats.mode with pandas.Series.mode in July 2023, unused imports removed January 2026)
Added
setuptools-scm for automatic version generation from git tags
Modern pyproject.toml with complete project metadata
Just command runner (justfile) with development recipes
Just recipes for testing package builds and version checking
Just recipe for building docs
MAINTAINER.md documentation for project maintainers
0.13.2 - 2025-07-17
Fixed
Change to nan for compatability with numpy 2.0
Update file_reader to warn but load empty csv files
0.13.1 - 2024-06-05
Fixed
Issue 112 - plotting tool would plot only last curve for plots with more than 25 curves.
0.13.0 - 2024-05-05
Added
load_datacan read site location and system information for generating clear sky irradiance from a json or yaml file.New plotting module with a plot function which replaces the CapData.plot method. The new plot function creates a panel dashboard with expanded functionality. Internally, removes the plotting dependency on the CapData.trans_keys attribute.
locandfloccan be used to retrieve the regression columns, similar to previous rview functionality by usingregcols.
Changed
Removed the CapData
trans_keysattribute, which was a copy of thecolumn_groupskeys and would be modified by the oldCapData.plotmethod.trans_keysmade it difficult to create aCapDataobject without using theload_datafunction.Replaces all uses of
viewandrviewwithlocandfloc.Updated
locandflocto always return a DataFrame. Previously these would sometimes return a Series.load_datanow checks if any individual files were loaded when loading multiple files from a directory.Adds underlay curve of unfiltered power to the linked timeseries created when calling
scatter_hvwithtimeseries=True.Changes selected points on scatter plot and linked timeseries produced by
scatter_hvto red.Tolerances may now be fractions eg ‘- 3.5’
The plotting methods
scatter_hv,scatter_filters, andtimeseries_filtersdo not require a column labeled ‘index’ with string datetimes in thedataDataFrame anymore. Also, the index of thedataDataFrame does not need to be named ‘Timeseries’.Removes the
add_index_colkwarg option fromutil.reindex.
0.12.0 - 2023-08-27
Added
Added a user guide section to the documentation with an overview and bifacial tests section.
Added verbose kwarg to the DataLoader load method, which prints which files have been loaded
DataLoader load method has new kwarg print_errors
DataLoader load method stores list of paths of files that fail to load in failed_to_load attribute
CapData method to save column_groups dictionary to excel
Github action to build and publish to PyPI on tags like v* pushed from master
Changed
Updates to make pvcaptest compatible with pvlib 0.10 and scipy 1.11
Update to make pvcaptest compatible with bokeh v3.0.0, change
plot_widthandplot_heighttowidthandheightMake bokeh v3 minimum version
Drop support for python 3.7
Drop to_numeric from io.file_reader
CapData.column_groups is instance of ColumnGroups now when group_columns is a callable
Changed defaults for the CapData plot method to single column
0.11.2 - 2023-04-20
Added
Adds CI testing across python 3.7 to 3.11 on OSX, Linux, and Windows using Github actions.
Changed
Re-organized project root directory to place captest package under a src directory, see PR #83.
Re-organized the extras for pip installation into optional, test, docs, and all. Updated the installation section of the docs to reflect change.
Updated installation instructions with links to pandas and conda docs for more information on environments.
Re-organized installation instructions.
Changed instructions on creating a conda env for pvcaptest to directly download the env yaml file from the repository rather than the whole repository.
Clean up RTD configuration, particularly added project directory to PYTHONPATH in the docs build environment, so the docs build against checked out version instead of installed version from conda.
Updates to documentation to add new modules, remove history section of releases, and remove references to Travis CI.
Fixed
Cleaned up issues in tests found after re-implementing CI on other platforms.
0.11.1 - 2023-04-09
Added
Added new dependencies - colorcet, param
Added openpyxl as an optional dependency
Loads bokeh as holoviews extension in captest imports so user doesn’t need to
Changed
Removed use of hvplot, replaced with holoviews to avoid adding unnecessary dependency. PR #73.
Fixed
Typo in the import check of panel
0.11.0 - 2023-04-07 [YANKED]
Added
Added columngroups module with a ColumnGroups class that extends python dictionaries to include each column group as an attribute and repr is formatted for easy reading.
Created the
locandfloccallables for CapData, which allow easier access to columns of thedataanddata_filteredattributes, repsectively. Will replaceviewandrviewmethod.Added
read_jsonfunction to util module.Added
read_yamlfunction to util module.Added the io module with functions to load data and return instances of CapData containing the loaded data.
Added the ReportingIrradiance class for calculations of a reporting irradiance that is between the 40th and 60th percentile.
ReportingIrradiance.plotincludes a dashboard type view of the selected and possible reporting irradiance values and method to save possible reporting conditions table to csv.Added the
spatial_uncertandexpanded_uncertmethods. Improvements and testing needed.
Changed
Moved group_columns method, series_type, and type definitions from the capdata module to the columngroups module and changed group_columns from a CapData method to a function that returns a ColumnGroups instance.
Completely refactored the algorithim to determine the reporting irradiance when
irr_balis set to True. Now an instance of the new ReportingIrradiance class is created and used to determine the reporting irradiance.Updated the examples to reflect the changes to the API for data loading, column grouping, selection (loc and floc vs view and rview), and balanced reporting irradiance.
Changed the
scatter_hvmethod to be more flexible and not require temperature or wind regression columns.
Removed
Removed the value checking functionality of the group_columns function. Data quality is outside the scope of the pvcaptest project.
Removed the
load_data,load_das, andload_pvsystmethods from the CapData class. Replaced with io module.
0.10.0 - 2021-07-25
Added
Added the filter_missing CapData method to remove missing data from specified columns. By default removes only intervals that contain missing data in the regression variable columns.
Added option to filter_irr method to specify using the reporting irradiance in the CapData object as the reference irradiance.
Added option to the filter_time method to drop the specified time period instead of dropping all other times.
Added option to filter_clearsky method to keep time periods with unstable irradiance.
Added new attributes to CapData: removed, kept, filter_counts. The update_summary decorator now stores the index of points removed, the index of points remaining after each filter, and the number of times any filter has been run for each filter applied.
Adds new plotting method, scatter_filters, which shows which filtering step removed which time intervals of data in a plot of irradiance vs. power.
New plotting method, timeseries_filters, which shows which fitlering step removed which time intervals of data in a plot of power vs. time.
New plotting function, overlay_scatters, that overlays irradiance vs. power scatter plots of the data remaining after the last filtering step of the two CapData objects passed to the function.
New get_filtering_table method that returns a DataFrame documenting the which time intervals are removed by which filter and which time intervals remain after all filtering.
Adds the run_test function, which applies the passed list of CapData filtering methods to the CapData object passed.
Adds the points_summary method, which prints the number of points remaining after all filtering, the length of the test period, the average points remaining after filtering per day, if enough points have been collected, if more points are needed how many, and how many days left if the rate of points holds.
Changed
Updated filter_pvsyst method to handle inverter output variables that have underscores or spaces like ‘IL Pmin’ and ‘IL_Pmin’.
load_das method no longer drops columns and rows that contain no data
Format of hover tooltip in plots produced by plot method now includes comma separator for thousands.
Changes captest to pvcaptest in documentation.
get_reg_cols method default changed to get and rename the columns defined in the
regression_colsattribute rather than expecting regression variables/columns to be identified by the keys ‘power’, ‘poa’, ‘t_amb’, and ‘w_vel’ in theregression_colsattribute.
0.9.0 - 2020-08-16
Changed
Updated clear sky functions which rely on pandas
index.tz_localizeto use nonexistent argument rather than errors argument, which was deprecated in pandas v1.0.Made Pandas v1.0 or greater a requirement for pvcaptest.
Change to test against python v3.7* and v3.8*
Updated installation instructions.
0.8.0 - 2020-04-13
Added
Added a filter_power method to the CapData class.
Added a filter_days method to the CapData class.
Changed
Allow get_reg_cols to accept a single regression variable as a string. Previously required passing list with at least two entries.
Fixed bug in filter_clearksy that applied filter to data rather than data_filtered attribute.
Added option to plot method to use column names for hover labels instead of abbreviated column names.
Improved formatting of the filtering summary output. See issue #12 for details.
Cleaned up source code by correcting linter errors.
0.7.0 - 2020-03-08
Added
New filter_shade method separate from the filter_pvsyst method.
captest_results method warns when it automatically attempts to correct for W vs kW.
Changed
Filter_pvsyst method filters on IL Pmin, IL Pmax, IL Vmin, and IL Vmax and warns if any of the four are missing. Previously failed if any of the four were missing.
cp_results returns a warning if the regression formulas of the passed CapData objects do not match instead of warning and continuing.
Updates to make captest compatible with pvlib 0.7.0
Editing of the complete capacity test example to use new names and improve explanations of features.
Names were changed to remove ambiguous abbreviations:
flt - filter; API changes in many places
cntg_eoy - wrap_year_end; API change
cp_results - captest_results; API change
res_summary - captest_results_check_pvalues; API change
reg_fml - regression_formula; API change
irrRC_balanced - irr_rc_balanced; API change
df_beg - df_start
ix_ser - ix_series
mnth - month
months_boy - months_year_start
months_eoy - months_year_end
loop_cnt - loop_count
cprat - cap_ratio
cprat_cpval - cap_ratio_check_pvalues
trans - column_groups; API change
set_translation - group_columns
trans_report - column_type_report
set_trans argument of load_data - group_columns
review_trans - review_column_groups
set_reg_trans - set_regression_cols
reg_trans - regression_cols
update_reg_trans argument of agg_sensors - update_regression_cols
reg_cpt - fit_regression
ols_model - regression_results
Removed
Removed the inv_trans_dict function. This was intended for use within the module and was unused.
0.6.0 - 2019-09-15
Added
Setup Travis CI to test pull requests and test and deploy to pypi for tags on master.
Setup project documentation hosted by Read the Docs using sphinx, nbshpinx, napolean, recommonmark, AutoStructify
Changed
Versioning changed from manual update in __version.py file to using versioneer to update version number from git tag.
Updated this file to follow the Keep a Changelog formatting conventions.
Moved repository to an organization github account from my personal github account.
Examples moved from root/examples directory to docs/examples. Executed versions of the examples display on read the docs.
All examples can be launched through binder in live notebooks.
The environment file has been updated to work for binder and Read the Docs.
0.5.3 - 2019-05-12
Changed
Update name and location of conda environment yml file, so there is a single file and it works with binder.
Removed binder directory.
Update readme to reflect changes to conda environment.yml
Minor updates to example.
Minor documentation string updates.
0.5.1 - 2019-05-01
Added
Addition of clear sky modeling using pvlib library. See new example notebook ‘Clear Sky Examples’.
Added a new method,
predict_capacitiesfor calculating reporting conditions and predicted outputs by month.New example notebook demonstrating use of
rep_condandpredict_capacities.Add warning when filter removes all data.
Changed
Changed Holoviews dependency to >= v1.11. DatLink added in v1.11 is required for scatter_hv method.
Expanded docstring for the load_data method to more clearly explain how the method joins multiple files (by row).
Update installation directions in README.
Updated conda environment file (conda_env.yml) to match updated dependencies.
Moved all filtering and regression functionality from CapTest class into the CapData class and replace CapTest class with functions for results comparing CapData objects.
Significant refactor of the rep_cond function. Removed any time filtering and prediction from rep_cond. Rep_cond acts on filtered data in the df_flt attribute.
agg_sensorsmethod updated to be more explicit and flexible.Changed
filter_sensorsto filter based on percent difference between all combinations of pairs of sensors measuring the same environmental factor. Corrected bug where standard deviation filter could not detect outliers with more than two, but still a small number of sensors.Adjusted bounds check of columns of data when importing so that translation dictionary names would not have ‘valuesError’ added to them.
Made printout of bounds check results optional when loading data.
Adjusted the type_defs and sub_type_defs, so that translation dictionary keys are more accurate for PVsyst data.