simple-module-core 0.0.6__tar.gz → 0.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/PKG-INFO +1 -1
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/pyproject.toml +1 -1
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_js_workspace.py +9 -2
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_module_diagnostics.py +11 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/.gitignore +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/LICENSE +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/README.md +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/__init__.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/__main__.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/__init__.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_coupling.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_i18n.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_inertia_api.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_migration.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_module.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_pages.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_runner.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_types.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/discovery.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/dotenv.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/environments.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/events.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/exceptions.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/feature_flags.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/health.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/i18n.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/menu.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/module.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/permissions.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/py.typed +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/services.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/versioning.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_diagnostics.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_discovery.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_events.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_feature_flags.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_feature_flags_decorator.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_health_registry.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_i18n.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_i18n_diagnostics.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_menu.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_module_base.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_permissions.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_services.py +0 -0
- {simple_module_core-0.0.6 → simple_module_core-0.0.8}/tests/test_versioning.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simple_module_core
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: Module-system primitives for the simple_module framework — ModuleBase, discovery, diagnostics, events
|
|
5
5
|
Project-URL: Homepage, https://github.com/antosubash/simple_module_python
|
|
6
6
|
Project-URL: Repository, https://github.com/antosubash/simple_module_python
|
|
@@ -12,11 +12,18 @@ if TYPE_CHECKING:
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def check_js_workspace_files(mod: ModuleBase, src_dir: Path) -> list[Diagnostic]:
|
|
15
|
-
"""Warn when a module ships .tsx pages but is missing npm workspace files.
|
|
15
|
+
"""Warn when a module ships .tsx pages but is missing npm workspace files.
|
|
16
|
+
|
|
17
|
+
Wheel-installed modules under ``site-packages/`` are skipped — the
|
|
18
|
+
install location is package-manager-owned, so any file we'd ask the
|
|
19
|
+
user to create there gets obliterated on the next reinstall.
|
|
20
|
+
"""
|
|
21
|
+
module_dir = src_dir.parent
|
|
22
|
+
if "site-packages" in module_dir.parts:
|
|
23
|
+
return []
|
|
16
24
|
pages_dir = src_dir / "pages"
|
|
17
25
|
if not pages_dir.exists() or not any(pages_dir.rglob("*.tsx")):
|
|
18
26
|
return []
|
|
19
|
-
module_dir = src_dir.parent
|
|
20
27
|
return [
|
|
21
28
|
Diagnostic(
|
|
22
29
|
level=DiagnosticLevel.WARNING,
|
|
@@ -112,6 +112,17 @@ class TestSm017JsWorkspaceFiles:
|
|
|
112
112
|
assert results[0].code == "SM017"
|
|
113
113
|
assert "tsconfig.json" in (results[0].file or "")
|
|
114
114
|
|
|
115
|
+
async def test_silent_when_module_lives_in_site_packages(self, tmp_path: Path):
|
|
116
|
+
site_packages = tmp_path / ".venv" / "lib" / "python3.12" / "site-packages"
|
|
117
|
+
src_dir = site_packages / "orders"
|
|
118
|
+
(src_dir / "pages").mkdir(parents=True)
|
|
119
|
+
(src_dir / "pages" / "Browse.tsx").write_text("export default function Browse() {}")
|
|
120
|
+
mod = _FakeModule(meta=_FakeMeta(name="Orders"))
|
|
121
|
+
|
|
122
|
+
results = check_js_workspace_files(mod, src_dir) # pyright: ignore[reportArgumentType]
|
|
123
|
+
|
|
124
|
+
assert results == []
|
|
125
|
+
|
|
115
126
|
|
|
116
127
|
def _mk_page(src_dir: Path, filename: str, body: str) -> Path:
|
|
117
128
|
pages = src_dir / "pages"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/__init__.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_coupling.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_i18n.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_inertia_api.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_migration.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_module.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_pages.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_runner.py
RENAMED
|
File without changes
|
{simple_module_core-0.0.6 → simple_module_core-0.0.8}/simple_module_core/diagnostics/_types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|