Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add requirement tracing with mantra #4

Merged
merged 37 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f5a9f0f
feat: add docs and req-links to publisher
mhatzl Aug 9, 2023
cdf87a4
feat: add doc and req-links for creation macros
mhatzl Aug 10, 2023
fc21a47
feat: add doc and req-links to the event module
mhatzl Aug 10, 2023
86b4c42
feat: add doc and req-links for the EventEntry
mhatzl Aug 10, 2023
8c27957
feat: add doc and req-links for Origin
mhatzl Aug 10, 2023
97e07fc
fix: update publisher macro to allow expressions
mhatzl Aug 10, 2023
02a5134
fix: remove unnecessary clone when unsubscribing
mhatzl Aug 10, 2023
deec126
feat: add doc and req-links to subscription module
mhatzl Aug 10, 2023
cfdf281
feat: add doc and req-links to min-concretise test
mhatzl Aug 10, 2023
687b727
feat: add doc and req-links to min-filter example
mhatzl Aug 10, 2023
182bb32
feat: add doc and req-links to min-msg example
mhatzl Aug 10, 2023
cb101b8
fix: add filter req to min-filter example
mhatzl Aug 10, 2023
0c0077d
feat: add doc and req-links to min-public example
mhatzl Aug 10, 2023
3e2b643
feat: add req-links for set_event tests
mhatzl Aug 10, 2023
fbd67b5
feat: add cap.test req-links
mhatzl Aug 10, 2023
7a19efb
feat: add req-link for multithreaded events
mhatzl Aug 10, 2023
a3588bb
feat: add mult-events for single subs test
mhatzl Aug 10, 2023
1c847b3
feat: add issue templates and CodeOfConduct
mhatzl Aug 10, 2023
132e872
feat: add git-hooks for commit structure checks
mhatzl Aug 10, 2023
b726346
feat: add release and auto-lock actions
mhatzl Aug 10, 2023
466f3a7
feat: add DoD and qa-req links
mhatzl Aug 11, 2023
4649133
fix: replace req-tag syntax
mhatzl Aug 16, 2023
b34c14d
fix: relative doc-link
mhatzl Aug 16, 2023
28af97d
fix: change highlighting of macro-samples
mhatzl Aug 16, 2023
bc2cc3d
fix: hide internal macros from doc
mhatzl Aug 16, 2023
90a6c7f
fix: hide internals from doc
mhatzl Aug 18, 2023
3ee065c
fix: update wiki links for requirement- IDs
mhatzl Aug 21, 2023
aa68ba2
fix: adapt DoD for PR template
mhatzl Aug 21, 2023
4a8af45
fix: replace renamed req-id
mhatzl Aug 21, 2023
159b634
chore: add wiki-links to references
mhatzl Aug 31, 2023
1c65637
fix: update wiki-link for [req:cap.ctrl]
mhatzl Sep 1, 2023
d120207
fix: remove auto-lock-pr action
mhatzl Sep 1, 2023
95414dc
fix: remove clutter from templates
mhatzl Sep 1, 2023
e93dba7
fix: remove clutter from issue templates
mhatzl Sep 13, 2023
525af81
fix: apply clippy suggestions
mhatzl Sep 13, 2023
41f5192
fix: remove wiki-links from references
mhatzl Sep 13, 2023
3a255f8
feat: add mantra workflows
mhatzl Sep 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/add-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Add Test
about: Propose a new test case.
title: "[TEST] "
labels: ["waiting-on-assignee"]
assignees: ''

---

## Is this test case related to other issues/PRs?



## Describe the test case steps



## Describe alternatives you've considered



## Additional context


41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report-form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Bug Report Form
description: Form that guides you to create a bug report.
title: "[Bug] "
# Source partially taken from: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more information?
placeholder: ex. [email protected]
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what happened!
- type: input
id: version
attributes:
label: Version
description: What version of our software where you running?
placeholder: ex. v1.0.1 or post the git commit hash
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/mhatzl/evident/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug Report
about: Create a bug report to help us improve.
title: "[BUG] "
labels: ["waiting-on-assignee"]
assignees: ''

---

## Describe the bug you've found, and why you think it is a bug



## To Reproduce

**Steps to reproduce the behavior:**

1. ...


## Screenshots



## Version/Branch used



## Additional context


5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Project Discussions
url: https://github.com/mhatzl/evident/discussions
about: Please ask and answer questions here.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature Request
about: Tell us about a feature you need.
title: "[REQ] "
labels: ["waiting-on-assignee", "req-missing-wiki-entry"]
assignees: ''

---

## Is your feature request related to other issues/PRs?



## Describe the solution you'd like



## Describe alternatives you've considered



## Additional context


16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/improve-documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Improve Documentation
about: Is there something you do not understand?
title: "[DOC] "
labels: ["waiting-on-assignee"]
assignees: ''

---

## Describe what is/was unclear to you



## Describe what would help you to better understand the documentation


10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/other-topic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Other Topic
about: Select if you are not sure what else to choose.
title: "[OTHER] "
labels: ["waiting-on-assignee"]
assignees: ''

---


16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/spelling-mistake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Spelling Mistake
about: Help us improve our spelling.
title: "[SPELL] "
labels: ["waiting-on-assignee", "good-first-issue"]
assignees: ''

---

## Where is the spelling mistake located?



## Describe the mistake


16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/warn-us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Warn Us
about: Warn us about a possible problem.
title: "[WARN] "
labels: ["waiting-on-assignee"]
assignees: ''

---

## Describe what you want to warn us about



## Describe what you suggest doing about it


30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## List of issues that this PR closes

[[

e.g. closes #1 closes #2 …

]]

## Definition of Done ([req:qa.DoD])

**Please consider the following requirements:**

- [ ] Add/Update requirement references (see: [req:qa.tracing])
- [ ] Add usage examples in doc-comments (see: [req:qa.ux.usage])
- [ ] Only use macros if they improve *evident's* usability (see: [req:qa.ux.macros])
- [ ] Prefer `RwLock` over `Mutex` (see: [req:qa.perf.locks])

**Note:** You may ignore requirements that are not relevant to your PR.

## Decisions you made for this PR

{{

Add a clear and concise description about your decisions related to this PR.

**Note:** May be omitted if decisions are documented in committed files.

**Note:** Decisions may be added to the "Decision Records" section in the wiki.

}}
55 changes: 55 additions & 0 deletions .github/workflows/mantra_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Runs mantra check to write the overview of reference changes in a PR comment.
name: mantra-pr
on:
pull_request:

permissions:
issues: write
pull-requests: write

jobs:
mantra-pr:
runs-on: ubuntu-latest
container:
image: manuelhatzl/mantra:main

env:
BRANCH_NAME: ${{ github.base_ref }}

steps:
- uses: actions/checkout@v3
with:
repository: 'mhatzl/evident-wiki'
path: './req_folder'
sparse-checkout: 5-Requirements

- uses: actions/checkout@v3
with:
path: './proj_folder'

- name: check
id: check
# '&>' to get stderr and stdout in one file, so error logs get included in output.
# Uses ' ' (U+2002) instead of regular space for output, because GitHub output cannot handle regular spaces
# see: https://stackoverflow.com/questions/59191913/how-do-i-get-the-output-of-a-specific-step-in-github-actions
run: |
mantra check --branch-name=$BRANCH_NAME ./req_folder ./proj_folder &> check_overview.md
output="$(cat check_overview.md)"
output="${output//\'/\\\'}"
output="${output//\"/\\\"}"
output="${output//$'\n'/\\\\n}"
output="${output// / }"
cat check_overview.md
echo "check-overview=$output" >> $GITHUB_OUTPUT

- name: comment
uses: actions/github-script@v6
with:
script: |
const check_overview = '${{ steps.check.outputs.check-overview }}'.replaceAll('\\n', '\n')
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: check_overview
})
63 changes: 63 additions & 0 deletions .github/workflows/mantra_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: mantra-sync
on:
push:
branches: main

permissions:
contents: write

jobs:
# Synchronizes references between project and wiki.
mantra-sync:
runs-on: ubuntu-latest
container:
image: manuelhatzl/mantra:main

env:
BRANCH_NAME: ${{ github.ref_name }}

steps:
- uses: actions/checkout@v3
with:
repository: 'mhatzl/evident-wiki'
path: './wiki'
# PAT with 'workflow' permission required in case wiki-links in workflow files get updated
token: ${{ secrets.EVIDENT_TOKEN }}

- uses: actions/checkout@v3
with:
path: './proj_folder'

- name: sync-references
run: mantra sync --branch-name=$BRANCH_NAME --branch-link=https://github.com/mhatzl/evident/tree/$BRANCH_NAME ./wiki/5-Requirements ./proj_folder

- name: job-date
id: job-date
# '-u' for UTC
run: |
echo "date=$(date -u +'%Y-%m-%d_%H:%M UTC')" >> $GITHUB_OUTPUT

- name: update-sidebar
run: |
sed -i -r "s/\*\*Last update:\*\*.+/\*\*Last update:\*\* ${{ steps.job-date.outputs.date }} /" ./wiki/_Sidebar.md
repo=$(echo "${{ github.repository }}")
repo=${repo//\//\\/}
sed -i -r "s/\*\*Repository:\*\*.+/\*\*Repository:\*\* $repo /" ./wiki/_Sidebar.md
sed -i -r "s/\*\*Branch:\*\*.+/\*\*Branch:\*\* $BRANCH_NAME /" ./wiki/_Sidebar.md
short_sha=$(echo "${{ github.sha }}")
short_sha=${short_sha:0:7}
commit_link=$(echo "${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}")
commit_link=${commit_link//\//\\/}
sed -i -r "s/\*\*Commit:\*\*.+/\*\*Commit:\*\* \[$short_sha\]\($commit_link\) /" ./wiki/_Sidebar.md

- name: push-changes
working-directory: ./wiki
# In case nothing changed
continue-on-error: true
run: |
git config user.name github-actions
git config user.email [email protected]
git status
git add .
git commit -m "chore: sync references between wiki and project"
git push
Loading
Loading