본문으로 건너뛰기

@px.record

구현 상태 · contract_only

decorator @px.recordpx.field는 현재 공개 pipelinexlab.px facade에 없습니다. 이 페이지는 후속 구조화 값 계약을 위한 planned SSOT이며 현재 설치본에서 실행할 API reference가 아닙니다. 현재 record schema는 px.Record subclass의 annotated field로 선언하고, 그 밖의 target port는 지원되는 일반 Python annotation으로 선언합니다. planned 이름을 임의 dict나 local class로 대체해 발행하지 않습니다.

계획된 역할

Record는 서로 관련된 여러 field를 하나의 typed port value로 묶습니다. 예를 들어 한 하중 case의 stable key, 고정하중과 활하중을 하나의 schema로 정의합니다. Record 자체는 계산 Node나 실행 target이 아닙니다.

계획된 Studio 표현

Record contract가 구현되면 이 타입을 사용하는 Node input/result의 Typed ports와 값 inspector에 field 구조가 표시됩니다. Record field 수만큼 Canvas Node를 만들지는 않습니다.

계획된 spelling · 실행 불가

text
@px.record(record_key, *, description, row_key=None)
px.field(*, description, unit=None, constraints=None, default=px.REQUIRED)

계획된 매개변수

이름계획된 의미
record_keyschema를 구분하는 stable lower_snake_case key
descriptionRecord가 나타내는 값을 설명하는 문장
row_keyTable row를 안정적으로 구분할 선택적인 field 이름
px.field(...)field의 description, unit, constraint와 default metadata

경계

  • current facade에는 public Record decorator나 field marker가 없습니다. record schema 자체는 px.Record subclass가 선언합니다.
  • scalar와 current collection port는 지원되는 Python annotation을 직접 사용합니다.
  • 구조화 schema가 필요한 public package는 planned 이름을 자체 helper로 흉내 내지 않고 versioned Record contract가 제공될 때까지 그 API를 current로 발행하지 않습니다.
  • 계획 계약에서 Record 전체가 input/result handle 하나를 지나가며 Canvas topology를 만들지 않습니다.
  • 계획된 row_key는 required·non-null str 또는 int field를 가리킵니다.

다음