From 23d020a21221d1539195083a9c0e1831027f5210 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:48:51 +0100 Subject: [PATCH 1/3] Create dispatch.yml --- .github/workflows/dispatch.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/dispatch.yml diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml new file mode 100644 index 0000000..baf16f1 --- /dev/null +++ b/.github/workflows/dispatch.yml @@ -0,0 +1,24 @@ +name: Dispatch + +on: + push: + branches: + - development + workflow_dispatch: + +jobs: + + dispatch: + + name: dispatch to validate + runs-on: ubuntu-latest + + steps: + + - run: ${{ tojson(github.event) }} + shell: cat {0} + + - run: | + curl -H "Authorization: token ${{ secrets.VALIDATE_REPO_GH_TOKEN }} " \ + -H 'Accept: application/vnd.github.everest-preview+json' "${{ vars.VALIDATE_REPO_DISPATCH_URL }}" \ + -d '{ "event_type": "submodule_dispatch", "client_payload": { "owner": "${{ github.event.repository.owner.login }}", "repo": "${{ github.event.repository.name }}", "branch": "${{ github.ref_name }}" } }' From 10e5a2a7a00237262566e334c592e557513706c8 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:16:07 +0100 Subject: [PATCH 2/3] Update dispatch.yml --- .github/workflows/dispatch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index baf16f1..155b2cf 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -4,6 +4,8 @@ on: push: branches: - development + paths-ignore: + - '.github/**' workflow_dispatch: jobs: From bc5ca00d565e50ecfc34aeb693968452321ecd8d Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:58:21 +0200 Subject: [PATCH 3/3] IVS-63 ValidationOutcome to dict in DEV --- models.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/models.py b/models.py index 493b20a..7af8e00 100644 --- a/models.py +++ b/models.py @@ -1107,6 +1107,19 @@ def __str__(self): 'Observed': self.observed } return f' '.join(f'{k}={v}' for k, v in members.items() if v) + + def to_dict(self): + return { + "id": self.id, + "instance_id": self.instance_public_id, + "validation_task_id": self.validation_task_public_id, + "feature": self.feature, + "feature_version": self.feature_version, + "severity": self.get_severity_display(), # Convert the integer to a human-readable string + "outcome_code": self.outcome_code, + "expected": self.expected, + "observed": self.observed, + } @property def instance_public_id(self):