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

refactor: upgrade CA-SK with event classes #6013

Merged
merged 5 commits into from
Oct 25, 2023

Commits on Oct 24, 2023

  1. refactor: upgrade CA-SK with event classes

    Upgrade the parser to use the ProductionBreakdown, ProductionMix,
    TotalConsumption, and ZoneKey classes. This should yield no functional
    change. Note that this does not resolve the current issue with the
    fetch_consumption function. Additionally:
    
    - Comply with Black's 88-column default line length limit.
    - Factor out duplicate code.
    
    Refs: electricitymaps#5986, electricitymaps#6011, electricitymaps#6013
    kruschk committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    33678c0 View commit details
    Browse the repository at this point in the history
  2. refactor: address review comments

    - Be more specific about the return type of the _request function.
    - Import the Any type directly.
    - Swap out pytz in exchange for zoneinfo.
    - Use the ProductionMix.add_value method instead of a dictionary
      comprehension.
    
    Refs: electricitymaps#5986, electricitymaps#6011, electricitymaps#6013
    kruschk committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    617bc4a View commit details
    Browse the repository at this point in the history
  3. refactor: switch to TotalConsumptionList

    Swap out TotalConsumption for TotalConsumptionList, as the former is
    considered an implementation detail while the latter is part of the
    public API.
    
    Refs: electricitymaps#5986, electricitymaps#6011, electricitymaps#6013
    kruschk committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    455a35e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a60f16 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2023

  1. Configuration menu
    Copy the full SHA
    84a13e4 View commit details
    Browse the repository at this point in the history