Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

New SGA API #18

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ dist/*
# Ignore debug-dev dumped Binary files (Files saved to cwd for fast examination)
src/scripts/*.bin
ignore/texconv.exe
tests/relic/sga/sources.json
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mypy]
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers =
include_package_data = True
package_dir =
= src
packages = find:
packages = find_namespace:
python_requires = >=3.9


Expand Down
1 change: 0 additions & 1 deletion src/relic/chunky/chunk/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from serialization_tools.vstruct import VStruct

from ..chunky.header import ChunkyVersion
from ...common import VersionLike, VersionError


class ChunkType(Enum):
Expand Down
12 changes: 6 additions & 6 deletions src/relic/chunky/chunky/header.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
from __future__ import annotations

from dataclasses import dataclass
from enum import Enum
from typing import BinaryIO, Dict, Type

from serialization_tools.magic import MagicWordIO, MagicWord
from serialization_tools.structx import Struct

from relic.common import VersionEnum, Version, VersionLike, VersionError

VersionEnum = Version = VersionLike = None
ChunkyVersionLayout = Struct("< 2L")


class ChunkyVersion(VersionEnum):
class ChunkyVersion(Enum):
Unsupported = None
v0101 = Version(1, 1)
v0101 = None # Version(1, 1)
Dow = v0101 # ALIAS for Prettiness
v0301 = Version(3, 1)
v0301 = None # Version(3, 1)
Dow2 = v0301 # ALIAS for Prettiness
v4010 = Version(4, 1)
v4010 = None # Version(4, 1)

@classmethod
def unpack_version(cls, stream: BinaryIO) -> Version:
Expand Down
88 changes: 0 additions & 88 deletions src/relic/common.py

This file was deleted.

115 changes: 0 additions & 115 deletions src/relic/config.py

This file was deleted.

23 changes: 7 additions & 16 deletions src/relic/sga/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
from .archive import *
from .file import *
from .folder import *
from .toc import *
from .vdrive import *
from . import common, hierarchy, writer
from . import archive, file, folder, toc, vdrive
from relic.sga._apis import apis as APIs
from relic.sga._core import Version, MagicWord, StorageType, VerificationType

__all__ = [
"common",
"hierarchy",
"writer",
"APIs",
"Version",
"MagicWord",
"StorageType",
"VerificationType"
]

__all__.extend(archive.__all__)
__all__.extend(file.__all__)
__all__.extend(folder.__all__)
__all__.extend(toc.__all__)
__all__.extend(vdrive.__all__)
Loading