Skip to content

Commit 35421ca

Browse files
authored
Fix common folder not included in built wheel (#30)
* Add __init__ file to common folder * Add unittest for folder structure * Resolve path sooner
1 parent 4c68d6f commit 35421ca

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/wktplot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .plots.standard import WKTPlot # noqa: F401
22

3-
__version__ = "2.3.0"
3+
__version__ = "2.3.1"

src/wktplot/common/__init__.py

Whitespace-only changes.

tests/unit/test_build.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from pathlib import Path
2+
import os
3+
4+
5+
SOURCE_PATH = (Path(__file__).parent / ".." / ".." / "src" / "wktplot").resolve()
6+
7+
8+
class TestFolderStructure:
9+
def test_source_structure_has_init_files(self):
10+
assert SOURCE_PATH.is_dir()
11+
for directory, _, files in os.walk(SOURCE_PATH):
12+
directory = Path(directory)
13+
if directory.name == "__pycache__":
14+
continue
15+
assert "__init__.py" in files, f"Folder missing __init__.py file, {directory}"

0 commit comments

Comments
 (0)