mapfile-parser 2.9.1__cp312-cp312-win_amd64.whl → 2.9.3__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mapfile_parser/__init__.py +1 -1
- mapfile_parser/frontends/objdiff_report.py +30 -8
- mapfile_parser/mapfile_parser.cp312-win_amd64.pyd +0 -0
- {mapfile_parser-2.9.1.dist-info → mapfile_parser-2.9.3.dist-info}/METADATA +3 -3
- {mapfile_parser-2.9.1.dist-info → mapfile_parser-2.9.3.dist-info}/RECORD +7 -7
- {mapfile_parser-2.9.1.dist-info → mapfile_parser-2.9.3.dist-info}/WHEEL +0 -0
- {mapfile_parser-2.9.1.dist-info → mapfile_parser-2.9.3.dist-info}/licenses/LICENSE +0 -0
mapfile_parser/__init__.py
CHANGED
@@ -16,6 +16,12 @@ from .. import utils
|
|
16
16
|
from ..internals import objdiff_report as report_internal
|
17
17
|
|
18
18
|
|
19
|
+
@dataclasses.dataclass
|
20
|
+
class SummaryTableConfig:
|
21
|
+
doUnits: bool = False
|
22
|
+
sort: bool = True
|
23
|
+
remaining: bool = False
|
24
|
+
|
19
25
|
def doObjdiffReport(
|
20
26
|
mapPath: Path,
|
21
27
|
outputPath: Path,
|
@@ -27,6 +33,7 @@ def doObjdiffReport(
|
|
27
33
|
nonmatchingsPath: Path|None=None,
|
28
34
|
emitCategories: bool=False,
|
29
35
|
quiet: bool=False,
|
36
|
+
summaryTableConfig: SummaryTableConfig|None=SummaryTableConfig(),
|
30
37
|
) -> int:
|
31
38
|
if not mapPath.exists():
|
32
39
|
print(f"Could not find mapfile at '{mapPath}'")
|
@@ -47,12 +54,16 @@ def doObjdiffReport(
|
|
47
54
|
nonmatchingsPath=nonmatchingsPath,
|
48
55
|
)
|
49
56
|
|
50
|
-
if not quiet:
|
57
|
+
if not quiet and summaryTableConfig is not None and not emitCategories:
|
51
58
|
report = report_internal.Report.readFile(outputPath)
|
52
59
|
if report is None:
|
53
60
|
utils.eprint(f"Unable to read back the generated report at {outputPath}")
|
54
61
|
return 1
|
55
|
-
table = report.asTableStr(
|
62
|
+
table = report.asTableStr(
|
63
|
+
do_units=summaryTableConfig.doUnits,
|
64
|
+
sort=summaryTableConfig.sort,
|
65
|
+
remaining=summaryTableConfig.remaining,
|
66
|
+
)
|
56
67
|
print(table, end="")
|
57
68
|
|
58
69
|
# Output to GitHub Actions job summary, if available
|
@@ -241,18 +252,26 @@ tools:
|
|
241
252
|
prefixes_to_trim:
|
242
253
|
""", end="")
|
243
254
|
for trim in prefixesToTrim:
|
244
|
-
print(f" -
|
255
|
+
print(f" - {trim}")
|
245
256
|
|
246
257
|
def printCategories(categories: list[Category]):
|
247
258
|
for cat in categories:
|
259
|
+
ide = cat.ide
|
260
|
+
name = cat.name
|
261
|
+
if ide[0] in "0123456789":
|
262
|
+
ide = f'"{ide}"'
|
263
|
+
if name[0] in "0123456789":
|
264
|
+
name = f'"{name}"'
|
248
265
|
print(f"""\
|
249
|
-
- id:
|
250
|
-
name:
|
266
|
+
- id: {ide}
|
267
|
+
name: {name}
|
251
268
|
paths:
|
252
269
|
""", end="")
|
253
270
|
for p in cat.paths:
|
271
|
+
if p[0] in "0123456789":
|
272
|
+
p = f'"{p}"'
|
254
273
|
print(f"""\
|
255
|
-
-
|
274
|
+
- {p}
|
256
275
|
""", end="")
|
257
276
|
|
258
277
|
print(" categories:")
|
@@ -323,7 +342,10 @@ def processArguments(args: argparse.Namespace, decompConfig: decomp_settings.Con
|
|
323
342
|
nonmatchingsPath = args.nonmatchingspath
|
324
343
|
|
325
344
|
emitCategories: bool = args.emit_categories
|
326
|
-
|
345
|
+
if not args.quiet:
|
346
|
+
summaryTableConfig = SummaryTableConfig()
|
347
|
+
else:
|
348
|
+
summaryTableConfig = None
|
327
349
|
|
328
350
|
exit(doObjdiffReport(
|
329
351
|
mapPath,
|
@@ -334,7 +356,7 @@ def processArguments(args: argparse.Namespace, decompConfig: decomp_settings.Con
|
|
334
356
|
pathIndex=pathIndex,
|
335
357
|
nonmatchingsPath=nonmatchingsPath,
|
336
358
|
emitCategories=emitCategories,
|
337
|
-
|
359
|
+
summaryTableConfig=summaryTableConfig,
|
338
360
|
))
|
339
361
|
|
340
362
|
def addSubparser(subparser: argparse._SubParsersAction[argparse.ArgumentParser], decompConfig: decomp_settings.Config|None=None):
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mapfile_parser
|
3
|
-
Version: 2.9.
|
3
|
+
Version: 2.9.3
|
4
4
|
Classifier: Programming Language :: Rust
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
@@ -55,7 +55,7 @@ If you use a `requirements.txt` file in your repository, then you can add
|
|
55
55
|
this library with the following line:
|
56
56
|
|
57
57
|
```txt
|
58
|
-
mapfile_parser>=2.9.
|
58
|
+
mapfile_parser>=2.9.3,<3.0.0
|
59
59
|
```
|
60
60
|
|
61
61
|
#### Development version
|
@@ -94,7 +94,7 @@ cargo add mapfile_parser
|
|
94
94
|
Or add the following line manually to your `Cargo.toml` file:
|
95
95
|
|
96
96
|
```toml
|
97
|
-
mapfile_parser = "2.9.
|
97
|
+
mapfile_parser = "2.9.3"
|
98
98
|
```
|
99
99
|
|
100
100
|
## Versioning and changelog
|
@@ -1,13 +1,13 @@
|
|
1
|
-
mapfile_parser-2.9.
|
2
|
-
mapfile_parser-2.9.
|
3
|
-
mapfile_parser-2.9.
|
4
|
-
mapfile_parser/__init__.py,sha256=
|
1
|
+
mapfile_parser-2.9.3.dist-info/METADATA,sha256=7l0uKfaA_6N-35AlYs76_7udGasvJPuNfMMQzjBmLyg,5935
|
2
|
+
mapfile_parser-2.9.3.dist-info/WHEEL,sha256=YpU2aDuTyBIvwRZn8idqScP-vkQ8DUGkCILtYmMfnFY,96
|
3
|
+
mapfile_parser-2.9.3.dist-info/licenses/LICENSE,sha256=8N8dS9WOtgJ0rkqNNOcazXKVkD2umzsKSHI0bd2HhG0,1094
|
4
|
+
mapfile_parser/__init__.py,sha256=WmvRxaLyN1ALFnMNH8QrmWmskDlo-wOEqzRdfu7btiU,883
|
5
5
|
mapfile_parser/__main__.py,sha256=BxL4C_wPsFHjvdYkqmL7O3AmvVs9DG34S6Quu843tgs,2235
|
6
6
|
mapfile_parser/frontends/__init__.py,sha256=42Wut4H28j9TjPcADXjPtz5oJ-snrfCDcjotOvReo0k,529
|
7
7
|
mapfile_parser/frontends/bss_check.py,sha256=-CiP5UvlKKUGoUHQwuOoEYD9T9UDmkUxL7PpmlONih8,8524
|
8
8
|
mapfile_parser/frontends/first_diff.py,sha256=7aeVSwaJ9WuktU4lxZKJvKCttp0exnOGEMs6Pb1pFo4,9102
|
9
9
|
mapfile_parser/frontends/jsonify.py,sha256=Epb_uZO-sfZ8DjRgKT_whVrYfbtGFm3Lv9ajkRWXlyw,2724
|
10
|
-
mapfile_parser/frontends/objdiff_report.py,sha256=
|
10
|
+
mapfile_parser/frontends/objdiff_report.py,sha256=aLamem6P2LpfaeWA5TbEj4YMtMqKp7EdHXgvYrnzoYc,19458
|
11
11
|
mapfile_parser/frontends/pj64_syms.py,sha256=TeIApSG5MIeQS_f9yVcaL9jAPwu0tvtXrzO1OIKV4bY,2403
|
12
12
|
mapfile_parser/frontends/progress.py,sha256=g5sKRg0Lij0j9td_fefC33dqP4VB-mAy4jZNbODLUIw,4658
|
13
13
|
mapfile_parser/frontends/sym_info.py,sha256=TpyFLCCtzxRZVJoHjz8ObGVl36PVmZQkMM5_kER8vtQ,3630
|
@@ -16,10 +16,10 @@ mapfile_parser/frontends/upload_frogress.py,sha256=UNRw5VfWxHZtzr5zfRbZ6xi_ojTbZ
|
|
16
16
|
mapfile_parser/internals/__init__.py,sha256=lA5cxXEs9jtz1O5I68rtpEnz3LozDqNAOxV7GmyW2tg,340
|
17
17
|
mapfile_parser/internals/objdiff_report.py,sha256=KBNuqjMxXMXZllqLJd4V-wUFFynLK4qT2UIJgjXKysI,6401
|
18
18
|
mapfile_parser/mapfile.py,sha256=IgztKA_yORsCCvcjrMzX7NRWdExBj93m-2E3a60azzE,39913
|
19
|
-
mapfile_parser/mapfile_parser.cp312-win_amd64.pyd,sha256=
|
19
|
+
mapfile_parser/mapfile_parser.cp312-win_amd64.pyd,sha256=JLbCBdmx7N-XZq-Bjm-V-p3ICl6zCLvRlBMMyZKgTM0,2601984
|
20
20
|
mapfile_parser/mapfile_parser.pyi,sha256=K8bf1H1DXoa9cSIzjhJQTedNM-HtJnPRX1eVBu_26RM,11533
|
21
21
|
mapfile_parser/mapfile_rs.py,sha256=7xLjYmXZ-o6FKy5I40U-9mc6wRY413zgW8fGSFvz278,4199
|
22
22
|
mapfile_parser/progress_stats.py,sha256=yHA0u1-5-RPEl5bBMM1kxUdp0hlJWsp8S97J8LfOaNc,2604
|
23
23
|
mapfile_parser/progress_stats_rs.py,sha256=5b7uw84OQZUchPlNgosfosifOu9aa5tEz_sUdJGuywo,499
|
24
24
|
mapfile_parser/utils.py,sha256=TY1Xibb88dL8-2PwLVkmahhIYdBJk_6MLPQ3BUzrh70,1572
|
25
|
-
mapfile_parser-2.9.
|
25
|
+
mapfile_parser-2.9.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|