plonex 0.0.1a0__py3-none-any.whl

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 (85) hide show
  1. plonex/__init__.py +1 -0
  2. plonex/_logger.py +49 -0
  3. plonex/base.py +969 -0
  4. plonex/cli/__init__.py +231 -0
  5. plonex/cli/__main__.py +4 -0
  6. plonex/cli/aliases.py +96 -0
  7. plonex/cli/commands.py +134 -0
  8. plonex/cli/cron.py +122 -0
  9. plonex/cli/db.py +87 -0
  10. plonex/cli/dependencies.py +106 -0
  11. plonex/cli/describe.py +52 -0
  12. plonex/cli/job_view.py +39 -0
  13. plonex/cli/jobs.py +355 -0
  14. plonex/cli/options.py +28 -0
  15. plonex/cli/parser.py +203 -0
  16. plonex/cli/runtime.py +269 -0
  17. plonex/cli/setup_info.py +529 -0
  18. plonex/cli/shell.py +340 -0
  19. plonex/cli/testing.py +129 -0
  20. plonex/config.py +165 -0
  21. plonex/configuration.py +164 -0
  22. plonex/environment.py +47 -0
  23. plonex/files.py +73 -0
  24. plonex/inspection.py +211 -0
  25. plonex/preparation/__init__.py +1 -0
  26. plonex/preparation/dependencies.py +348 -0
  27. plonex/preparation/engine.py +263 -0
  28. plonex/preparation/supervisor.py +375 -0
  29. plonex/presentation.py +52 -0
  30. plonex/services/__init__.py +41 -0
  31. plonex/services/adduser/__init__.py +48 -0
  32. plonex/services/compile/__init__.py +24 -0
  33. plonex/services/cron/__init__.py +357 -0
  34. plonex/services/cron/browser.py +114 -0
  35. plonex/services/cron/configure.zcml +15 -0
  36. plonex/services/cron/installation.py +56 -0
  37. plonex/services/cron/model.py +226 -0
  38. plonex/services/cron/plone_runner.py +48 -0
  39. plonex/services/cron/profiles/default/controlpanel.xml +8 -0
  40. plonex/services/cron/runner.py +303 -0
  41. plonex/services/cron/runtime.py +449 -0
  42. plonex/services/describe/__init__.py +452 -0
  43. plonex/services/describe/formatting.py +180 -0
  44. plonex/services/describe/report.py +819 -0
  45. plonex/services/describe/templates/plonex_description.md.j2 +124 -0
  46. plonex/services/describe/templates/report.html.j2 +47 -0
  47. plonex/services/directory/__init__.py +21 -0
  48. plonex/services/doctor/__init__.py +751 -0
  49. plonex/services/edit/__init__.py +184 -0
  50. plonex/services/edit/tui.py +85 -0
  51. plonex/services/init/__init__.py +119 -0
  52. plonex/services/init/templates/plonex.yml.j2 +87 -0
  53. plonex/services/install/__init__.py +994 -0
  54. plonex/services/install/preview.py +160 -0
  55. plonex/services/install/report.py +120 -0
  56. plonex/services/invocation.py +119 -0
  57. plonex/services/legacy/__init__.py +146 -0
  58. plonex/services/profile/__init__.py +74 -0
  59. plonex/services/pytest/__init__.py +28 -0
  60. plonex/services/registry.py +88 -0
  61. plonex/services/robotserver/__init__.py +32 -0
  62. plonex/services/robottest/__init__.py +38 -0
  63. plonex/services/runwsgi/__init__.py +102 -0
  64. plonex/services/runwsgi/templates/wsgi.ini.j2 +80 -0
  65. plonex/services/snapshot/__init__.py +532 -0
  66. plonex/services/sources/__init__.py +789 -0
  67. plonex/services/sources/installation.py +204 -0
  68. plonex/services/sources/testing.py +71 -0
  69. plonex/services/supervisor/__init__.py +250 -0
  70. plonex/services/supervisor/templates/program.conf.j2 +7 -0
  71. plonex/services/supervisor/templates/supervisord.conf.j2 +25 -0
  72. plonex/services/template/__init__.py +94 -0
  73. plonex/services/upgrade/__init__.py +197 -0
  74. plonex/services/zconsole/__init__.py +40 -0
  75. plonex/services/zeoserver/__init__.py +105 -0
  76. plonex/services/zeoserver/backup.py +198 -0
  77. plonex/services/zeoserver/templates/zeo.conf.j2 +21 -0
  78. plonex/services/zope_configuration/templates/__init__.py +0 -0
  79. plonex/services/zope_configuration/templates/site.zcml.j2 +27 -0
  80. plonex/services/zope_configuration/templates/zope.conf.j2 +34 -0
  81. plonex/services/zopetest/__init__.py +42 -0
  82. plonex-0.0.1a0.dist-info/METADATA +1558 -0
  83. plonex-0.0.1a0.dist-info/RECORD +85 -0
  84. plonex-0.0.1a0.dist-info/WHEEL +4 -0
  85. plonex-0.0.1a0.dist-info/entry_points.txt +3 -0
plonex/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from ._logger import logger # noqa: F401
plonex/_logger.py ADDED
@@ -0,0 +1,49 @@
1
+ from rich.console import Console
2
+ from rich.logging import RichHandler
3
+
4
+ import logging
5
+
6
+ FORMAT: str = "%(message)s"
7
+ logging.basicConfig(
8
+ level=logging.INFO,
9
+ format=FORMAT,
10
+ datefmt="[%X]",
11
+ handlers=[
12
+ RichHandler(
13
+ console=Console(stderr=True),
14
+ markup=True,
15
+ show_path=False,
16
+ show_time=False,
17
+ ),
18
+ ],
19
+ )
20
+
21
+ logger: logging.Logger = logging.getLogger("plonex")
22
+ logger.setLevel(logging.INFO)
23
+
24
+ _warning_once_keys: set[str] = set()
25
+
26
+
27
+ def warning_once(
28
+ logger_instance: logging.Logger,
29
+ key: str,
30
+ message: str,
31
+ *args,
32
+ ) -> bool:
33
+ """Log a warning once for the provided key.
34
+
35
+ Returns True when the warning is emitted, False when skipped.
36
+ """
37
+ if key in _warning_once_keys:
38
+ return False
39
+ _warning_once_keys.add(key)
40
+ logger_instance.warning(message, *args)
41
+ return True
42
+
43
+
44
+ def reset_warning_once() -> None:
45
+ """Clear all previously seen warning-once keys.
46
+
47
+ Intended for use in test teardown to prevent state leaking between tests.
48
+ """
49
+ _warning_once_keys.clear()