rwijtvliet / portfolyo

Handling timeseries for power and gas retail portfolios.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[enhancement] remove default units #89

Open rwijtvliet opened 4 months ago

rwijtvliet commented 4 months ago

To simplify the code, raise errors where before assumptions were made, about the unit of a value. Require the user to be more specific.

branch remove_defaults.

Some desired behaviour:

The documentation is already updated.

Best approach is probably to first update the tests.

Tackle this issue before doing https://github.com/rwijtvliet/portfolyo/issues/88

Pizza2Pizza commented 3 months ago

PfLine({'w': pd.Series([1, 2], pd.date_range('2024', freq='AS', periods=2), dtype='pint[MWh]')}) # raises error (incorrect dimensionality) by calling it i get IndexError: tuple index out of range. is it correct?

rwijtvliet commented 3 months ago

Yes, it's correct. w indicates a power and expects a unit with dimension [energy]/[time], such as MW. q indicates an energy and expects a unit such as MWh or J. See here