From 89275c93cbcfbd7b6d40a5f006bc4586c35f0cac Mon Sep 17 00:00:00 2001 From: Jack Pierce Date: Mon, 4 Apr 2022 12:27:20 -0400 Subject: [PATCH] Uncomment out custom resources --- testpad.py | 58 +++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/testpad.py b/testpad.py index 2e44c3f..e976036 100644 --- a/testpad.py +++ b/testpad.py @@ -31,32 +31,32 @@ print(build_changeset(spec)) -# class DoNothingSpec(BaseModel): -# some_value: str -# -# class DoNothingCodeChange(CodeChangeResource): -# kind = 'DoNothingCodeChange' -# version = 'v1alpha' -# spec: DoNothingSpec -# -# def make_code_changes(self, path: Path) -> None: -# pass -# -# register_custom_resource(DoNothingCodeChange) -# -# another_spec = """ -# kind: Changeset -# version: v1alpha -# spec: -# name: time to do a thing -# issue_title: stuff -# issue_body: other stuff -# code_changes: -# - kind: DoNothingCodeChange -# version: v1alpha -# spec: -# some_value: "concrete value" -# -# """ -# -# print(build_changeset(another_spec)) +class DoNothingSpec(BaseModel): + some_value: str + +class DoNothingCodeChange(CodeChangeResource): + kind = 'DoNothingCodeChange' + version = 'v1alpha' + spec: DoNothingSpec + + def make_code_changes(self, path: Path) -> None: + pass + +register_custom_resource(DoNothingCodeChange) + +another_spec = """ +kind: Changeset +version: v1alpha +spec: + name: time to do a thing + issue_title: stuff + issue_body: other stuff + code_changes: + - kind: DoNothingCodeChange + version: v1alpha + spec: + some_value: "concrete value" + +""" + +print(build_changeset(another_spec))