Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add correct representation of Value curves and remove name from cost and function data components #45

Merged
merged 9 commits into from
Oct 22, 2024

Conversation

pesap
Copy link
Collaborator

@pesap pesap commented Sep 20, 2024

List of changes

  • Remove name from value_curves and cost functions,
  • Add new wrapper function for InputOutputCurve called LinearCurve,
  • Removed units field from TimeSeriesData,
  • Changed logic of how data is handled if pint.Quantity or BaseQuantity is passed,
  • Updated testing to check that data is the same instead of checking same instance,
  • Update fields from cost functions,

@pesap pesap added the bug Something isn't working label Sep 20, 2024
@pesap pesap self-assigned this Sep 20, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.43%. Comparing base (9dc0e3e) to head (9d9d5ea).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
+ Coverage   95.40%   95.43%   +0.03%     
==========================================
  Files          33       33              
  Lines        2719     2741      +22     
==========================================
+ Hits         2594     2616      +22     
  Misses        125      125              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pesap pesap requested a review from daniel-thom October 4, 2024 23:21
behaviour.

List of changes
- Changed data handling when we create an instance of
  `SingleTimeSeries`.
- Updated test to check that data inside a `SingleTimeSeries` is consistent since it could return
  two different instances when serialize and deserialize.
- Updated arrow storage to convert to `pa.Array` when serializing only
  and better type hint
src/infrasys/time_series_models.py Outdated Show resolved Hide resolved
src/infrasys/time_series_models.py Outdated Show resolved Hide resolved
src/infrasys/function_data.py Outdated Show resolved Hide resolved
src/infrasys/arrow_storage.py Outdated Show resolved Hide resolved
src/infrasys/cost_curves.py Outdated Show resolved Hide resolved
tests/test_system.py Outdated Show resolved Hide resolved
@pesap pesap merged commit ae517df into main Oct 22, 2024
6 checks passed
@pesap pesap deleted the ps/value_curves branch October 22, 2024 01:09
github-actions bot pushed a commit that referenced this pull request Oct 22, 2024
…cost and function data components (#45)

List of changes
- Changed data handling when we create an instance of
  `SingleTimeSeries`.
- Updated test to check that data inside a `SingleTimeSeries` is consistent since it could return
  two different instances when serialize and deserialize.
- Updated arrow storage to convert to `pa.Array` when serializing only
  and better type hint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants