Skip to content
Snippets Groups Projects
Commit 581842e6 authored by Benedikt's avatar Benedikt
Browse files

changed issueTemplate include

parent 80bacb2d
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,29 @@ from bokeh.events import ValueSubmit ...@@ -16,6 +16,29 @@ from bokeh.events import ValueSubmit
import numpy as np import numpy as np
colors=Category10[10] colors=Category10[10]
VERSION = "0.1.0" VERSION = "0.1.0"
issueTemplate="""There was an issue with the following unit conversion:
| Which unit | User entered input | Parsed input |
| ---------- | ------------------ | ------------ |
| Left unit | {} | {} |
| Right unit | {} | {} |
### Result/Expectation:
| Calculation | Result | Expectation | Did match |
|-------------|--------|-------------|-----------|
| Base unit | {} | | [ ] |
| factor * left = right | {} | | [ ] |
| factor * right = left | {} | | [ ] |
| factor * left = base | {} | | [ ] |
| factor * base = left | {} | | [ ] |
| factor * right = base | {} | | [ ] |
| factor * base = right | {} | | [ ] |
If there was an error with the calculation, please fill out the table above. Feel free to also add additional info here:
*Free text comment*"""
class dsiparserInput(): class dsiparserInput():
def __init__(self,defaultInput=""): def __init__(self,defaultInput=""):
...@@ -222,8 +245,8 @@ class page(): ...@@ -222,8 +245,8 @@ class page():
def createIssueUrl(self): def createIssueUrl(self):
quantitiesToAdd=[self.dsiInput1.dsiInput.value,str(self.dsiInput1.dsiTree),self.dsiInput2.dsiInput.value,str(self.dsiInput2.dsiTree),str(self.dsiCompGraphGen.baseUnit),self.dsiCompGraphGen.scalfactorAB,self.dsiCompGraphGen.scalfactorBA,self.dsiCompGraphGen.scalfactorABase,self.dsiCompGraphGen.scalfactorBaseA,self.dsiCompGraphGen.scalfactorBBase,self.dsiCompGraphGen.scalfactorBaseB] quantitiesToAdd=[self.dsiInput1.dsiInput.value,str(self.dsiInput1.dsiTree),self.dsiInput2.dsiInput.value,str(self.dsiInput2.dsiTree),str(self.dsiCompGraphGen.baseUnit),self.dsiCompGraphGen.scalfactorAB,self.dsiCompGraphGen.scalfactorBA,self.dsiCompGraphGen.scalfactorABase,self.dsiCompGraphGen.scalfactorBaseA,self.dsiCompGraphGen.scalfactorBBase,self.dsiCompGraphGen.scalfactorBaseB]
templateStr=open('./issue.md').read() #issueTemplate=open('./issue.md').read() #TODO add file inculde instead of the str....
filledResult=templateStr.format(*quantitiesToAdd) filledResult=issueTemplate.format(*quantitiesToAdd)
filledTitle = f'Unexpected comparison result: {self.dsiInput1.dsiInput.value} to {self.dsiInput2.dsiInput.value}' filledTitle = f'Unexpected comparison result: {self.dsiInput1.dsiInput.value} to {self.dsiInput2.dsiInput.value}'
issueUrl = r'https://gitlab1.ptb.de/digitaldynamicmeasurement/dsi-parser-frontend/-/issues/new?' issueUrl = r'https://gitlab1.ptb.de/digitaldynamicmeasurement/dsi-parser-frontend/-/issues/new?'
title = quote(filledTitle) title = quote(filledTitle)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment