Skip to content

Commit

Permalink
Merge pull request #23 from Decompollaborate/develop
Browse files Browse the repository at this point in the history
2.3.4
  • Loading branch information
AngheloAlf authored Jan 28, 2024
2 parents 9ecfecf + 36dc894 commit dc3fc49
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.3.4] - 2024-01-26

### Changed

- Frontend scripts now give a better error if the mapfile does not exist.

## [2.3.2] - 2024-01-17

### Added
Expand Down Expand Up @@ -301,6 +307,7 @@ Full changes: <https://github.com/Decompollaborate/mapfile_parser/compare/702a73
- Initial release

[unreleased]: https://github.com/Decompollaborate/mapfile_parser/compare/master...develop
[2.3.4]: https://github.com/Decompollaborate/mapfile_parser/compare/2.3.2...2.3.4
[2.3.2]: https://github.com/Decompollaborate/mapfile_parser/compare/2.3.1...2.3.2
[2.3.1]: https://github.com/Decompollaborate/mapfile_parser/compare/2.3.0...2.3.1
[2.3.0]: https://github.com/Decompollaborate/mapfile_parser/compare/2.2.1...2.3.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[package]
name = "mapfile_parser"
version = "2.3.2"
version = "2.3.4"
edition = "2021"
authors = ["Anghelo Carvajal <[email protected]>"]
description = "Map file parser library focusing decompilation projects"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you use a `requirements.txt` file in your repository, then you can add
this library with the following line:

```txt
mapfile_parser>=2.3.2,<3.0.0
mapfile_parser>=2.3.4,<3.0.0
```

#### Development version
Expand Down Expand Up @@ -74,7 +74,7 @@ cargo add mapfile_parser
Or add the following line manually to your `Cargo.toml` file:

```toml
mapfile_parser = "2.3.2"
mapfile_parser = "2.3.4"
```

## Versioning and changelog
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[project]
name = "mapfile_parser"
version = "2.3.2"
version = "2.3.4"
description = "Map file parser library focusing decompilation projects"
readme = "README.md"
requires-python = ">=3.7"
Expand Down
2 changes: 1 addition & 1 deletion src/mapfile_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from __future__ import annotations

__version_info__ = (2, 3, 2)
__version_info__ = (2, 3, 3)
__version__ = ".".join(map(str, __version_info__))
__author__ = "Decompollaborate"

Expand Down
4 changes: 4 additions & 0 deletions src/mapfile_parser/frontends/jsonify.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@


def doJsonify(mapPath: Path, outputPath: Path|None, humanReadable: bool=True) -> int:
if not mapPath.exists():
print(f"Could not find mapfile at '{mapPath}'")
return 1

mapFile = mapfile.MapFile()
mapFile.readMapFile(mapPath)

Expand Down
4 changes: 4 additions & 0 deletions src/mapfile_parser/frontends/pj64_syms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def writePj64SymsToFile(mapFile: mapfile.MapFile, outFile: TextIO):
outFile.write(f"{sym.vram:08X},{symType},{sym.name}\n")

def doPj64Syms(mapPath: Path, outputPath: Path|None) -> int:
if not mapPath.exists():
print(f"Could not find mapfile at '{mapPath}'")
return 1

mapFile = mapfile.MapFile()
mapFile.readMapFile(mapPath)

Expand Down
4 changes: 4 additions & 0 deletions src/mapfile_parser/frontends/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def getProgress(mapPath: Path, asmPath: Path, nonmatchingsPath: Path, pathIndex:
return mapFile.filterBySectionType(".text").getProgress(asmPath, nonmatchingsPath, pathIndex=pathIndex)

def doProgress(mapPath: Path, asmPath: Path, nonmatchingsPath: Path, pathIndex: int=2, debugging: bool=False) -> int:
if not mapPath.exists():
print(f"Could not find mapfile at '{mapPath}'")
return 1

totalStats, progressPerFolder = getProgress(mapPath, asmPath, nonmatchingsPath, pathIndex=pathIndex, debugging=debugging)

progress_stats.printStats(totalStats, progressPerFolder)
Expand Down
4 changes: 4 additions & 0 deletions src/mapfile_parser/frontends/sym_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@


def doSymInfo(mapPath: Path, symName: str) -> int:
if not mapPath.exists():
print(f"Could not find mapfile at '{mapPath}'")
return 1

mapFile = mapfile.MapFile()
mapFile.readMapFile(mapPath)

Expand Down
4 changes: 4 additions & 0 deletions src/mapfile_parser/frontends/symbol_sizes_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@


def doSymbolSizesCsv(mapPath: Path, outputPath: Path|None, filterSection: str|None=None, sameFolder: bool=False, symbolsSummary: bool=False, allFiles: bool=False) -> int:
if not mapPath.exists():
print(f"Could not find mapfile at '{mapPath}'")
return 1

mapFile = mapfile.MapFile()
mapFile.readMapFile(mapPath)

Expand Down
4 changes: 4 additions & 0 deletions src/mapfile_parser/frontends/upload_frogress.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def uploadEntriesToFrogress(entries: dict[str, int], category: str, url: str, ap


def doUploadFrogress(mapPath: Path, asmPath: Path, nonmatchingsPath: Path, project: str, version: str, category: str, baseurl: str, apikey: str|None=None, verbose: bool=False) -> int:
if not mapPath.exists():
print(f"Could not find mapfile at '{mapPath}'")
return 1

totalStats, progressPerFolder = progress.getProgress(mapPath, asmPath, nonmatchingsPath)

entries: dict[str, int] = getFrogressEntriesFromStats(totalStats, progressPerFolder, verbose)
Expand Down

0 comments on commit dc3fc49

Please sign in to comment.