Skip to content

Commit

Permalink
- fixin stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lucie-farrell committed Oct 27, 2023
1 parent 5a1527b commit 31cd6e0
Show file tree
Hide file tree
Showing 8 changed files with 173 additions and 66 deletions.
Binary file modified DataTools/__pycache__/propertyValidator.cpython-310.pyc
Binary file not shown.
77 changes: 11 additions & 66 deletions DataTools/propertyValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def adjustLen(strArray: List[str]) -> List[str]:
prop_names.append(data['property']['name'])
prop_values.append(data['property']['value'])

pprint(prop_names)

raw_formulas = adjustLen(raw_formulas)
percentile_formulas = adjustLen(percentile_formulas)

Expand All @@ -53,6 +55,9 @@ def adjustLen(strArray: List[str]) -> List[str]:
maxWarningList.append(propDict['maxWarning'])
minWarningList.append(propDict['minWarning'])

pprint(nameList)
pprint(abbrevList)

propValidationList = [nameList, abbrevList, maxErrorList, minErrorList,
maxWarningList, minWarningList]

Expand All @@ -66,11 +71,13 @@ def adjustLen(strArray: List[str]) -> List[str]:
else:
for name in nameList:
nameIndex = nameList.index(name)
if ((abbrevList[nameIndex] is not None) and ((prop == abbrevList[nameIndex][0])
or (prop == abbrevList[nameIndex][1]))):
propIndex = nameIndex
elif (prop == nameList[nameIndex]):
if (prop == name):
propIndex = nameIndex
break
elif (abbrevList[nameIndex] is not None):
if ((prop == abbrevList[nameIndex][0]) or (prop == abbrevList[nameIndex][1])):
propIndex = nameIndex
break
else:
propIndex = None
# validations.append('Uncommon property!')
Expand Down Expand Up @@ -119,65 +126,3 @@ def adjustLen(strArray: List[str]) -> List[str]:
in zip(markers, raw_formulas, percentile_formulas, prop_names, validations)
]



# for propDict in conditionList:
# # test = f"Testing: {propDict} "
# # print(test)
# if propDict['abbrevs'] is None:
# abbrevList = [' ', ' ']
# else:
# abbrevList = propDict['abbrevs']

# print(abbrevList)
# print(abbrevList[0])
# print(abbrevList[1])

# if prop == abbrevList[0] or prop == abbrevList[1] or prop == propDict['name']:
# if propDict['maxError'] is not None and value > propDict['maxError']:
# validations.append(f"Unreasonably high {prop} value of {value}")
# markers.append('🔴')
# elif propDict['minError'] is not None and value < propDict['minError']:
# validations.append(f"Unreasonably low {prop} value of {value}")
# markers.append('🔴')
# elif propDict['maxWarning'] is not None and value > propDict['maxWarning']:
# validations.append(f"High {prop} value of {value}")
# markers.append('🟠')
# elif propDict['minWarning'] is not None and value < propDict['minWarning']:
# validations.append(f"Low {prop} value of {value}")
# markers.append('🟠')
# else:
# validations.append('')
# markers.append('🟢')
# else:
# validations.append('Uncommon property!')
# # use green or orange ?
# markers.append('🟠')

# create yaml file for properties, abbrevs, and upper lower bounds
# ^ similar to adam example sent in email
# ^ error different from warning
# ^ ex: can't have compressive ducility > 100%, so error
# compressive ductility warning would be around > 85%
# ^^^ so need to consider physical limitations like this for each property
# create at least 3-4 property distributions in mongodb
# ^ use these for bounds in yaml file
# if no abbrev or bound, use null or none in place



# if propDict['maxError'] is not None and value > propDict['maxError']:
# validations.append(f"Unreasonably high {prop} value of {value}")
# markers.append('🔴')
# elif propDict['minError'] is not None and value < propDict['minError']:
# validations.append(f"Unreasonably low {prop} value of {value}")
# markers.append('🔴')
# elif propDict['maxWarning'] is not None and value > propDict['maxWarning']:
# validations.append(f"High {prop} value of {value}")
# markers.append('🟠')
# elif propDict['minWarning'] is not None and value < propDict['minWarning']:
# validations.append(f"Low {prop} value of {value}")
# markers.append('🟠')
# else:
# validations.append('')
# markers.append('🟢')
31 changes: 31 additions & 0 deletions PyQAlloyReport2023-27-Oct-20-56.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# PyQAlloyReport 2023-27-Oct-20-56

**Legend:** &nbsp; 🟢 Successful Upload / 🟠 Abnormal Upload / 🔴 Failed Upload

| | Raw Formula | Percentile Formula | Property | Comment |
|:--- |:--- |:--- |:--- |:--- |
| 🟠 | Fe60 Ni20 Cr10 Zr10 | Zr10 Cr10 Fe60 Ni20 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr20 Zr10 | Zr10 Cr20 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr10 Zr20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe25 Ni25 Cr25 Zr25 | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | Ti0.1 (ZrHfNb)0.3 | Hf30 Zr30 Ti10 Nb30 | | No property data! |
| 🟠 | Fe0.60 Ni0.10 Cr0.10 Zr0.20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | CreepRate | Uncommon property! |
| 🟠 | W90 Mo5 Ti5 | Ti5 W90 Mo5 | | No property data! |
| 🟠 | HfMoNbZrTiCrAlW | Hf12.5 Zr12.5 Ti12.5 Nb12.5 W12.5 Mo12.5 Cr12.5 Al12.5 | | No property data! |
| 🟠 | CoCrFeNi | Cr25 Fe25 Co25 Ni25 | tensile ductility | Uncommon property! |
| 🟠 | CoCrFeNiMo0.2 | Mo4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | CoNiFe | Fe33.3 Co33.3 Ni33.3 | tensile ductility | Uncommon property! |
| 🟠 | FeCrCoMnNi | Cr20 Mn20 Fe20 Co20 Ni20 | tensile ductility | Uncommon property! |
| 🟠 | Co20.6Cr19.9Fe19.5Ni20.9Mn19.1 | Cr19.9 Mn19.1 Fe19.5 Co20.6 Ni20.9 | tensile ductility | Uncommon property! |
| 🟠 | FeCoNiCrTi0.2 | Ti4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🔴 | Un40 O60 | | | Can't parse composition!: Un40 O60 --> Can't parse Element or Species from str: Un. |

31 changes: 31 additions & 0 deletions PyQAlloyReport2023-27-Oct-21-04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# PyQAlloyReport 2023-27-Oct-21-04

**Legend:** &nbsp; 🟢 Successful Upload / 🟠 Abnormal Upload / 🔴 Failed Upload

| | Raw Formula | Percentile Formula | Property | Comment |
|:--- |:--- |:--- |:--- |:--- |
| 🟠 | Fe60 Ni20 Cr10 Zr10 | Zr10 Cr10 Fe60 Ni20 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr20 Zr10 | Zr10 Cr20 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr10 Zr20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe25 Ni25 Cr25 Zr25 | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | Ti0.1 (ZrHfNb)0.3 | Hf30 Zr30 Ti10 Nb30 | | No property data! |
| 🟠 | Fe0.60 Ni0.10 Cr0.10 Zr0.20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | CreepRate | Uncommon property! |
| 🟠 | W90 Mo5 Ti5 | Ti5 W90 Mo5 | | No property data! |
| 🟠 | HfMoNbZrTiCrAlW | Hf12.5 Zr12.5 Ti12.5 Nb12.5 W12.5 Mo12.5 Cr12.5 Al12.5 | | No property data! |
| 🟠 | CoCrFeNi | Cr25 Fe25 Co25 Ni25 | tensile ductility | Uncommon property! |
| 🟠 | CoCrFeNiMo0.2 | Mo4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | CoNiFe | Fe33.3 Co33.3 Ni33.3 | tensile ductility | Uncommon property! |
| 🟠 | FeCrCoMnNi | Cr20 Mn20 Fe20 Co20 Ni20 | tensile ductility | Uncommon property! |
| 🟠 | Co20.6Cr19.9Fe19.5Ni20.9Mn19.1 | Cr19.9 Mn19.1 Fe19.5 Co20.6 Ni20.9 | tensile ductility | Uncommon property! |
| 🟠 | FeCoNiCrTi0.2 | Ti4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🔴 | Un40 O60 | | | Can't parse composition!: Un40 O60 --> Can't parse Element or Species from str: Un. |

31 changes: 31 additions & 0 deletions PyQAlloyReport2023-27-Oct-21-10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# PyQAlloyReport 2023-27-Oct-21-10

**Legend:** &nbsp; 🟢 Successful Upload / 🟠 Abnormal Upload / 🔴 Failed Upload

| | Raw Formula | Percentile Formula | Property | Comment |
|:--- |:--- |:--- |:--- |:--- |
| 🟠 | Fe60 Ni20 Cr10 Zr10 | Zr10 Cr10 Fe60 Ni20 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr20 Zr10 | Zr10 Cr20 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr10 Zr20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe25 Ni25 Cr25 Zr25 | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | Ti0.1 (ZrHfNb)0.3 | Hf30 Zr30 Ti10 Nb30 | | No property data! |
| 🟠 | Fe0.60 Ni0.10 Cr0.10 Zr0.20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | CreepRate | Uncommon property! |
| 🟠 | W90 Mo5 Ti5 | Ti5 W90 Mo5 | | No property data! |
| 🟠 | HfMoNbZrTiCrAlW | Hf12.5 Zr12.5 Ti12.5 Nb12.5 W12.5 Mo12.5 Cr12.5 Al12.5 | | No property data! |
| 🟠 | CoCrFeNi | Cr25 Fe25 Co25 Ni25 | tensile ductility | Uncommon property! |
| 🟠 | CoCrFeNiMo0.2 | Mo4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | CoNiFe | Fe33.3 Co33.3 Ni33.3 | tensile ductility | Uncommon property! |
| 🟠 | FeCrCoMnNi | Cr20 Mn20 Fe20 Co20 Ni20 | tensile ductility | Uncommon property! |
| 🟠 | Co20.6Cr19.9Fe19.5Ni20.9Mn19.1 | Cr19.9 Mn19.1 Fe19.5 Co20.6 Ni20.9 | tensile ductility | Uncommon property! |
| 🟠 | FeCoNiCrTi0.2 | Ti4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🔴 | Un40 O60 | | | Can't parse composition!: Un40 O60 --> Can't parse Element or Species from str: Un. |

7 changes: 7 additions & 0 deletions PyQAlloyReport2023-27-Oct-21-20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# PyQAlloyReport 2023-27-Oct-21-20

**Legend:** &nbsp; 🟢 Successful Upload / 🟠 Abnormal Upload / 🔴 Failed Upload

| | Raw Formula | Percentile Formula | Property | Comment |
|:--- |:--- |:--- |:--- |:--- |
31 changes: 31 additions & 0 deletions PyQAlloyReport2023-27-Oct-21-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# PyQAlloyReport 2023-27-Oct-21-24

**Legend:** &nbsp; 🟢 Successful Upload / 🟠 Abnormal Upload / 🔴 Failed Upload

| | Raw Formula | Percentile Formula | Property | Comment |
|:--- |:--- |:--- |:--- |:--- |
| 🟠 | Fe60 Ni20 Cr10 Zr10 | Zr10 Cr10 Fe60 Ni20 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr20 Zr10 | Zr10 Cr20 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe60 Ni10 Cr10 Zr20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | Fe25 Ni25 Cr25 Zr25 | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | UTS | Uncommon property! |
| 🟠 | Ti0.1 (ZrHfNb)0.3 | Hf30 Zr30 Ti10 Nb30 | | No property data! |
| 🟠 | Fe0.60 Ni0.10 Cr0.10 Zr0.20 | Zr20 Cr10 Fe60 Ni10 | UTS | Uncommon property! |
| 🟠 | FeNiCrZr | Zr25 Cr25 Fe25 Ni25 | CreepRate | Uncommon property! |
| 🟠 | W90 Mo5 Ti5 | Ti5 W90 Mo5 | | No property data! |
| 🟠 | HfMoNbZrTiCrAlW | Hf12.5 Zr12.5 Ti12.5 Nb12.5 W12.5 Mo12.5 Cr12.5 Al12.5 | | No property data! |
| 🟠 | CoCrFeNi | Cr25 Fe25 Co25 Ni25 | tensile ductility | Uncommon property! |
| 🟠 | CoCrFeNiMo0.2 | Mo4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | CoNiFe | Fe33.3 Co33.3 Ni33.3 | tensile ductility | Uncommon property! |
| 🟠 | FeCrCoMnNi | Cr20 Mn20 Fe20 Co20 Ni20 | tensile ductility | Uncommon property! |
| 🟠 | Co20.6Cr19.9Fe19.5Ni20.9Mn19.1 | Cr19.9 Mn19.1 Fe19.5 Co20.6 Ni20.9 | tensile ductility | Uncommon property! |
| 🟠 | FeCoNiCrTi0.2 | Ti4.8 Cr23.8 Fe23.8 Co23.8 Ni23.8 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile yield strength | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🟠 | Ti30 Zr30 Hf16 Nb24 | Hf16 Zr30 Ti30 Nb24 | tensile ductility | Uncommon property! |
| 🔴 | Un40 O60 | | | Can't parse composition!: Un40 O60 --> Can't parse Element or Species from str: Un. |

Loading

0 comments on commit 31cd6e0

Please sign in to comment.