simple-module-core 0.0.5__tar.gz → 0.0.7__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.
Files changed (45) hide show
  1. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/PKG-INFO +1 -1
  2. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/pyproject.toml +1 -1
  3. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_js_workspace.py +9 -2
  4. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_module_diagnostics.py +11 -0
  5. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/.gitignore +0 -0
  6. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/LICENSE +0 -0
  7. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/README.md +0 -0
  8. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/__init__.py +0 -0
  9. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/__main__.py +0 -0
  10. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/__init__.py +0 -0
  11. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_coupling.py +0 -0
  12. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_i18n.py +0 -0
  13. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_inertia_api.py +0 -0
  14. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_migration.py +0 -0
  15. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_module.py +0 -0
  16. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_pages.py +0 -0
  17. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_runner.py +0 -0
  18. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/diagnostics/_types.py +0 -0
  19. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/discovery.py +0 -0
  20. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/dotenv.py +0 -0
  21. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/environments.py +0 -0
  22. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/events.py +0 -0
  23. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/exceptions.py +0 -0
  24. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/feature_flags.py +0 -0
  25. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/health.py +0 -0
  26. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/i18n.py +0 -0
  27. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/menu.py +0 -0
  28. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/module.py +0 -0
  29. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/permissions.py +0 -0
  30. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/py.typed +0 -0
  31. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/services.py +0 -0
  32. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/simple_module_core/versioning.py +0 -0
  33. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_diagnostics.py +0 -0
  34. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_discovery.py +0 -0
  35. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_events.py +0 -0
  36. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_feature_flags.py +0 -0
  37. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_feature_flags_decorator.py +0 -0
  38. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_health_registry.py +0 -0
  39. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_i18n.py +0 -0
  40. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_i18n_diagnostics.py +0 -0
  41. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_menu.py +0 -0
  42. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_module_base.py +0 -0
  43. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_permissions.py +0 -0
  44. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/tests/test_services.py +0 -0
  45. {simple_module_core-0.0.5 → simple_module_core-0.0.7}/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.5
3
+ Version: 0.0.7
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simple_module_core"
3
- version = "0.0.5"
3
+ version = "0.0.7"
4
4
  description = "Module-system primitives for the simple_module framework — ModuleBase, discovery, diagnostics, events"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -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"