Skip to content

Commit

Permalink
Auto-generate mermaid diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 21, 2024
0 parents commit ea526c9
Show file tree
Hide file tree
Showing 83 changed files with 12,447 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .devcontainer/file/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "File",
"image": "mcr.microsoft.com/devcontainers/python:3.11",
"postCreateCommand": "sudo apt install jq && pip install -r requirements.txt",
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"redhat.vscode-yaml"
],
"settings": {
"yaml.schemas": {
"schemas/base.schema.json": [
"decision-tree-compressed-new.yaml",
"decision-tree.yaml"
]
}
}
}
}
}
40 changes: 40 additions & 0 deletions .devcontainer/frontend/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "Frontend",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"forwardPorts": [
5173
],
"postCreateCommand": "cd frontend; npm install",
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"streetsidesoftware.code-spell-checker",
"mhutchie.git-graph",
"ms-vsliveshare.vsliveshare",
"Vue.volar",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
],
"settings": {
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.renderWhitespace": "boundary",
"files.trimTrailingWhitespace": true,
"terminal.integrated.inheritEnv": true,
"debug.toolBarLocation": "commandCenter",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
}
}
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.devcontainer/
.github/
.venv/
.vscode/
*.md
!README.md
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
line_length = 120
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_size = 4
12 changes: 12 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* @MinBZK/ai-validation-team

decision-tree.yaml @ruthkoole
categories.yaml @ruthkoole

# excluded files so github actions bot can auto update dependencies
# see https://github.com/orgs/community/discussions/23064
.github/workflows/*
.devcontainer/devcontainer.json
.pre-commit-config.yaml
frontend/package.json
frontend/package-lock.json
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug Report
description: Let us know about an unexpected error, a crash, or an incorrect behavior.
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
# Thank you for opening an issue.
## Filing a bug report
To fix problems, we need clear reproduction cases. Please fill in the bug report as exact as possible to help us resolve the issue.
- type: textarea
id: version
attributes:
label: Version
description: Specify the version of the software that you use
placeholder: 0.1.0
value:
validations:
required: false

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What should have happened?
placeholder: What should have happened?
value:
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened?
placeholder: What actually happened?
value:
validations:
required: true

- type: textarea
id: context
attributes:
label: Additional Context
description: |
Are there anything atypical about your situation that we should know?
placeholder: Additional context...
value:
validations:
required: false

- type: markdown
attributes:
value: |
**Note:** If the submit button is disabled and you have filled out all required fields, please check that you did not forget a **Title** for the issue.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Feature Request
description: Suggest a new feature or other enhancement.
labels: ["enhancement", "triage"]
body:
- type: markdown
attributes:
value: |
# Thank you for opening a feature request.
- type: textarea
id: version
attributes:
label: Version
description: Specify the version of the software that you use
placeholder: 0.1.0
value:
validations:
required: false

- type: textarea
id: use-case
attributes:
label: Use Cases
description: |
In order to properly evaluate a feature request, it is necessary to understand the use cases for it.
Please describe below the _end goal_ you are trying to achieve that has led you to request this feature.
Please keep this section focused on the problem and not on the suggested solution. We'll get to that in a moment, below!
placeholder:
value:
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposal
description: |
If you have an idea for a way to address the problem via a change to our product features, please describe it below.
If you're not sure of some details, don't worry! When we evaluate the feature request we may suggest modifications as necessary to work within the design constraints of OpenTofu Core.
placeholder:
value:
validations:
required: false

- type: markdown
attributes:
value: |
**Note:** If the submit button is disabled and you have filled out all required fields, please check that you did not forget a **Title** for the issue.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly

- package-ecosystem: "npm"
directory: "/frontend/"
schedule:
interval: weekly
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Description

Describe in detail the changes you are proposing, and the rationale.

Link all GitHub issues fixed by this PR.
Make sure to first open an issue, get community approval and only then create Pull Request to resolve it.
All Pull Requests must have an issue attached to them

Resolves #
51 changes: 51 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Dependabot & Pre-Commit auto-merge
on: pull_request

jobs:
automerge-dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
permissions:
contents: write
pull-requests: write
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable Auto-Approve for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable Auto-Merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

automerge-pre-commit:
runs-on: ubuntu-latest
if: github.actor == 'pre-commit-ci[bot]'
permissions:
contents: write
pull-requests: write
steps:
- name: Enable Auto-Approve for Pre-Commit
if: github.head_ref == 'pre-commit-ci-update-config'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable Auto-Merge for Pre-Commit
if: github.head_ref == 'pre-commit-ci-update-config'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
70 changes: 70 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: build

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: "minbzk/ai-act-beslisboom"

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
actions: read
steps:
- uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: pip3 install -r requirements.txt

- name: Build decision-tree.json
run: python script/inject_definitions_in_decision_tree.py

- name: Build categories.json
run: python script/convert_categories.py

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: linux/amd64,linux/arm64
Loading

0 comments on commit ea526c9

Please sign in to comment.