Skip to content

Commit

Permalink
Merge pull request #35 from Trimatix/dev
Browse files Browse the repository at this point in the history
Beta 0.8.0.1
  • Loading branch information
Trimatix authored Mar 2, 2024
2 parents a193d67 + bf6c5e5 commit 320f2d6
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- Change the ## to your pull request number -->
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Trimatix/2551cac90336c1d1073d8615407cc72d/raw/AEPi__pull_##.json)

**Notes for reviewer:**

*
26 changes: 26 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
branches:
- main
- dev
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -66,3 +67,28 @@ jobs:
echo "::error title=Test failures::Tests had ${{ steps.coverageComment.outputs.failures }} failures, but must have 0 to pass"
exit 1
fi
# Extract branch name
# var REF = 'refs/pull/27/merge.json';
REF=${{ github.ref }}
# console.log('github.ref: ' + REF);
echo "github.ref: $REF"
# var PATHS = REF.split('/');
IFS='/' read -ra PATHS <<< "$REF"
# var BRANCH_NAME = PATHS[1] + PATHS[2];
BRANCH_NAME="${PATHS[1]}_${PATHS[2]}"
# console.log(BRANCH_NAME); // 'pull_27'
echo $BRANCH_NAME
# process.env.BRANCH = 'pull_27';
echo "BRANCH=$(echo ${BRANCH_NAME})" >> $GITHUB_ENV
- name: Create readme test coverage Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 8a5430ecc0f87b003367174b1521f3bb
filename: AEPi__${{ env.BRANCH }}.json
label: test coverage
message: ${{ steps.coverageComment.outputs.coverage }}
valColorRange: ${{ steps.coverageComment.outputs.coverage }}
maxColorRange: 100
minColorRange: 0
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/></a>
<a href="https://github.com/Trimatix/AEPi/actions"
><img
src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Trimatix/2551cac90336c1d1073d8615407cc72d/raw/AEPi__heads_main.json"
src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Trimatix/8a5430ecc0f87b003367174b1521f3bb/raw/AEPi__heads_main.json"
alt="Test coverage"
/></a>
</p>
Expand Down Expand Up @@ -93,9 +93,11 @@ The engine uses a proprietary file format for grids of images, called Abyss Engi

The AEI format was analysed by the Russian modding group 'CatLabs', who later created a GUI and command-line tool for conversion between PNG and AEI, named AEIEditor.

This tool was closed-source, and relied on a windows DLL for compression. AEPi is a minimal recreation of the image conversion logic provided by AEIEditor, leaning on [K0lb3](https://github.com/K0lb3)'s [etcpak](https://github.com/K0lb3/etcpak) for DirectX and Ericsson image compression internally.
This tool was closed-source, and relied on a windows DLL for compression. AEPi is a minimal recreation of the image conversion logic provided by AEIEditor, leaning on open source image codecs:
- [K0lb3/etcpak](https://github.com/K0lb3/etcpak)
- [K0lb3/tex2img](https://github.com/K0lb3/tex2img)

AEPi was created for the conversion of ship textures for Galaxy on Fire 2, and so currently, only compression is supported, either for Android (ETC) or PC (DXT5) use.
See <a href="#roadmap">the project roadmap</a> for currently supported and upcoming features.


<!-- GETTING STARTED -->
Expand Down Expand Up @@ -175,7 +177,37 @@ with Image.open(image_path) as image, Image.open(image2_path) as image2:
<!-- ROADMAP -->
## Roadmap

The project roadmap is now maintained as milestones: https://github.com/Trimatix/AEPi/milestones
The AEPi 1.0 release will mark feature parity with AEIEditor, which theoretically reflects all of the capabilities required to manipulate Galaxy on Fire 2 AEIs on all platforms.

For details of the work that needs to be done, see the issues listed under the 1.0 milestone: https://github.com/Trimatix/AEPi/milestones

Other work is needed (e.g documentation, QOL improvements...), but below is an overview of the *features* implementation progress towards AEIEditor parity:

|Feature |Read support|Write support |
|---------------------------|:----------:|:------------:|
|Raw image content |||
|Basic metadata |||
|Texture regions |||
|Mipmapping |||
|Compression quality (l/m/h)|||

And compression format support progress:

|Format |Read support|Write support |
|-----------------------|:----------:|:------------:|
|Unknown |||
|Uncompressed_UI |||
|Uncompressed_CubeMap_PC|||
|Uncompressed_CubeMap |||
|PVRTC12A |||
|PVRTC14A |||
|ATC |||
|DXT1 |||
|DXT3 |||
|DXT5 |||
|ETC1 |||

Extra feature requests for after the 1.0 release are very welcome.

To report a bug or request a feature, please submit an issue to the [open issues](https://github.com/Trimatix/AEPi/issues) page of this repository.

Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ keywords = game, python, galaxy-on-fire, image-compression, image-conversion, ga
project_urls =
Bug Tracker = https://github.com/Trimatix/AEPi/issues
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent

Expand Down
2 changes: 1 addition & 1 deletion src/AEPi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
from . import lib
from .lib.imageOps import switchRGBA_BGRA

__version__ = "0.8"
__version__ = "0.8.0.1"
__all__ = ["AEI", "Texture", "CompressionFormat", "CompressionQuality", "codecs", "lib", "switchRGBA_BGRA", "codec"]
4 changes: 2 additions & 2 deletions src/AEPi/image/AEI.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def read(cls, fp: Union[str, PathLike[Any], io.BytesIO]) -> "AEI":
decompressed = imageCodec.decompress(compressed, format, width, height, quality)

except Exception as ex:
raise AeiReadException() from ex
raise AeiReadException(None, ex) from ex

finally:
if tempFp:
Expand Down Expand Up @@ -383,7 +383,7 @@ def write(self, fp: Optional[BinaryIO] = None, format: Optional[CompressionForma
self._writeFooterMeta(fp, quality)

except Exception as ex:
raise AeiWriteException() from ex
raise AeiWriteException(None, ex) from ex

finally:
if tempTexture:
Expand Down

1 comment on commit 320f2d6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/AEPi
   codec.py37392%22, 40, 119
   constants.py61297%33, 54
   exceptions.py401172%18–19, 28–29, 39–40, 47, 54, 61, 68–69
src/AEPi/codecs
   EtcPakCodec.py231152%10–11, 21–31
   Tex2ImgCodec.py22386%10–11, 27
   __init__.py8275%11–12
src/AEPi/image
   AEI.py2252091%120, 180, 184, 197, 224, 287, 293–296, 301, 306, 325, 332, 339–340, 371, 385–386, 463–464
   texture.py19289%29, 49
src/AEPi/lib
   binaryio.py24196%64
   imageOps.py9278%13–14
src/tests/image
   test_AEI.py199199%29
TOTAL7905893% 

Tests Skipped Failures Errors Time
43 0 💤 0 ❌ 0 🔥 0.303s ⏱️

Please sign in to comment.