Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yufeng zhou authored and yufeng zhou committed Nov 19, 2024
1 parent b42a9de commit 6ec10e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/pudl/metadata/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from collections.abc import Callable, Iterable
from functools import cached_property, lru_cache
from pathlib import Path
from typing import Annotated, Any, Literal, Self, TypeVar
from typing import Annotated, Any, Literal, Self, TypeVar, Optional

import jinja2
import numpy as np
Expand Down Expand Up @@ -897,11 +897,19 @@ class Contributor(PudlMeta):
"work package leader",
] = "project member"
organization: String | None = None
orcid: String | None = None
orcid: Optional[String]| None = None

def __repr__(self):
""" representation excluding None values."""
attrs = {k: v for k, v in self.__dict__.items() if v is not None}
attr_str = ", ".join(f"{k}={repr(v)}" for k, v in attrs.items())
return f"{self.__class__.__name__}({attr_str})"

@staticmethod
def dict_from_id(x: str) -> dict:
"""Construct dictionary from PUDL identifier."""
#data = copy.deepcopy(CONTRIBUTORS[x])

return copy.deepcopy(CONTRIBUTORS[x])

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions src/pudl/transform/params/ferc1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4649,8 +4649,8 @@
"row_seq": "row_seq",
"row_prvlg": "row_prvlg",
"report_prd": "report_prd",
"beg_yr_bal": "ending_balance",
"end_yr_bal": "starting_balance",
"beg_yr_bal": "starting_balance",
"end_yr_bal": "ending_balance",
"dr_acct_num": "account_detail",
"dr_amount": "decrease_in_other_regulatory_liabilities",
"credits": "increase_in_other_regulatory_liabilities",
Expand Down

0 comments on commit 6ec10e3

Please sign in to comment.