Skip to content

Commit

Permalink
fix ram-type
Browse files Browse the repository at this point in the history
  • Loading branch information
parmigggiana committed Oct 18, 2024
1 parent f157dd1 commit be4db62
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/peracotta/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"source_code": "https://github.com/WEEE-Open/peracotta",
}

VERSION = "2.5.7"
VERSION = "2.5.8"

PATH = {
"UI": "assets/interface.ui",
Expand Down
2 changes: 1 addition & 1 deletion src/peracotta/parsers/read_decode_dimms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def parse_decode_dimms(dimms: str, interactive: bool = False) -> List[dict]:
fallback_manufacturer_data_type = None
for line in dimm.splitlines():
if line.startswith("Fundamental Memory type"):
dimms[i]["ram-type"] = line.split(" ")[-2].upper()
dimms[i]["ram-type"] = line.split(" ")[-2].lower()
if dimms[i]["ram-type"] == "UNKNOWN":
del dimms[i]["ram-type"]

Expand Down
2 changes: 1 addition & 1 deletion src/peracotta/parsers/read_udevadm.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def parse_udevadm(file_content: str) -> List[dict]:
dimm = {
"type": "ram",
"working": "yes",
"ram-type": device["TYPE"].upper(),
"ram-type": device["TYPE"].lower(),
"frequency-hertz": int(device["SPEED_MTS"]) * 1000 * 1000,
"capacity-byte": int(device["SIZE"]),
"brand": device["MANUFACTURER"],
Expand Down
20 changes: 10 additions & 10 deletions tests/parsers/test_dimms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_ecc_ram1():
"sn": "3375612524",
"frequency-hertz": 667000000,
"capacity-byte": 2147483648,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand All @@ -28,7 +28,7 @@ def test_ecc_ram1():
"sn": "3392385900",
"frequency-hertz": 667000000,
"capacity-byte": 2147483648,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand All @@ -49,7 +49,7 @@ def test_ecc_ram1_not_an_hex():
"sn": "0F00xb4r",
"frequency-hertz": 667000000,
"capacity-byte": 2147483648,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand All @@ -61,7 +61,7 @@ def test_ecc_ram1_not_an_hex():
"sn": "0xCA33B3RC",
"frequency-hertz": 667000000,
"capacity-byte": 2147483648,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand All @@ -80,7 +80,7 @@ def test_ecc_ram2():
"sn": "2853609420",
"frequency-hertz": 667000000,
"capacity-byte": 1073741824,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand All @@ -91,7 +91,7 @@ def test_ecc_ram2():
"sn": "2836829644",
"frequency-hertz": 667000000,
"capacity-byte": 1073741824,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand All @@ -111,7 +111,7 @@ def test_ram1():
"sn": "16416",
"frequency-hertz": 800000000,
"capacity-byte": 1073741824,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "no",
"ram-timings": "6-6-6-18",
},
Expand All @@ -123,7 +123,7 @@ def test_ram1():
"sn": "8224",
"frequency-hertz": 800000000,
"capacity-byte": 1073741824,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "no",
"ram-timings": "6-6-6-18",
},
Expand All @@ -135,7 +135,7 @@ def test_ram1():
"sn": "12320",
"frequency-hertz": 800000000,
"capacity-byte": 1073741824,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "no",
"ram-timings": "6-6-6-18",
},
Expand All @@ -147,7 +147,7 @@ def test_ram1():
"sn": "8225",
"frequency-hertz": 800000000,
"capacity-byte": 1073741824,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "no",
"ram-timings": "6-6-6-18",
},
Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/test_rottame.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_ram():
"sn": "2972574626",
"frequency-hertz": 533000000,
"capacity-byte": 536870912,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "no",
"ram-timings": "5-4-4-12",
}
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/test_travasato.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_ram():
"sn": "3375612238",
"frequency-hertz": 667000000,
"capacity-byte": 2147483648,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand All @@ -62,7 +62,7 @@ def test_ram():
"sn": "3392385358",
"frequency-hertz": 667000000,
"capacity-byte": 2147483648,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
},
Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/test_viavai.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_ram():
"sn": "3072778780",
"frequency-hertz": 667000000,
"capacity-byte": 1073741824,
"ram-type": "DDR2",
"ram-type": "ddr2",
"ram-ecc": "yes",
"ram-timings": "5-5-5-15",
}
Expand Down

0 comments on commit be4db62

Please sign in to comment.