Skip to content

Commit

Permalink
Fix/package builder (#51)
Browse files Browse the repository at this point in the history
* Remove old Score class

* Update .gitignore

* Fix module filtering in SochaPackageBuilder class
  • Loading branch information
maxblan authored Mar 15, 2024
1 parent 45d1709 commit fe1f17f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 30 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ __pycache__/
*.so

# Distribution / packaging
socha_builds/
.Python
.venv/
env/
bin/
build/
develop-eggs/
# dist/
dist/
eggs/
lib/
lib64/
Expand Down
28 changes: 0 additions & 28 deletions python/socha/api/protocol/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,34 +704,6 @@ class Meta:
)


@dataclass
class Score:
class Meta:
name = "score"

cause: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
}
)
reason: Optional[object] = field(
default=None,
metadata={
"type": "Attribute",
"required": True,
}
)
part: List[int] = field(
default_factory=list,
metadata={
"type": "Element",
"min_occurs": 1,
}
)


@dataclass
class Turn:
class Meta:
Expand Down
2 changes: 1 addition & 1 deletion python/socha/utils/package_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _get_modules():
)
main_modules = {
name for name in main_modules
if hasattr(sys.modules[name], "__file__")
if hasattr(sys.modules[name], "__file__") and sys.modules[name].__file__ is not None
and (os.path.abspath(os.path.dirname(sys.modules[name].__file__)) == main_dir
or os.path.abspath(os.path.dirname(sys.modules[name].__file__)).startswith(main_dir + os.path.sep))
}
Expand Down

0 comments on commit fe1f17f

Please sign in to comment.