hugesitemap 1.0.0__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 (112) hide show
  1. hugesitemap-1.0.0/.devcontainer/devcontainer.json +22 -0
  2. hugesitemap-1.0.0/.devcontainer/settings.json +6 -0
  3. hugesitemap-1.0.0/.env.example +389 -0
  4. hugesitemap-1.0.0/.github/actions/extract-metadata/action.yml +92 -0
  5. hugesitemap-1.0.0/.github/dependabot.yml +22 -0
  6. hugesitemap-1.0.0/.github/workflows/codeql.yml +39 -0
  7. hugesitemap-1.0.0/.github/workflows/default_cicd_public.yml +386 -0
  8. hugesitemap-1.0.0/.github/workflows/default_release_public.yml +85 -0
  9. hugesitemap-1.0.0/.gitignore +188 -0
  10. hugesitemap-1.0.0/.qlty/qlty.toml +2 -0
  11. hugesitemap-1.0.0/.snyk +5 -0
  12. hugesitemap-1.0.0/CHANGELOG.md +33 -0
  13. hugesitemap-1.0.0/CONFIG.md +667 -0
  14. hugesitemap-1.0.0/CONTRIBUTING.md +48 -0
  15. hugesitemap-1.0.0/DEVELOPMENT.md +208 -0
  16. hugesitemap-1.0.0/INSTALL.md +141 -0
  17. hugesitemap-1.0.0/LICENSE +22 -0
  18. hugesitemap-1.0.0/Makefile +266 -0
  19. hugesitemap-1.0.0/PKG-INFO +421 -0
  20. hugesitemap-1.0.0/README.md +369 -0
  21. hugesitemap-1.0.0/SECURITY.md +37 -0
  22. hugesitemap-1.0.0/ai-disclosure.md +70 -0
  23. hugesitemap-1.0.0/ai-stance.md +90 -0
  24. hugesitemap-1.0.0/codecov.yml +27 -0
  25. hugesitemap-1.0.0/docs/adr/0001-memory-adapters-in-src.md +29 -0
  26. hugesitemap-1.0.0/docs/plans/2026-06-25-hugesitemap-design.md +140 -0
  27. hugesitemap-1.0.0/docs/systemdesign/module_reference.md +525 -0
  28. hugesitemap-1.0.0/examples/sites.toml +55 -0
  29. hugesitemap-1.0.0/notebooks/Quickstart.ipynb +136 -0
  30. hugesitemap-1.0.0/pyproject.toml +267 -0
  31. hugesitemap-1.0.0/src/hugesitemap/__init__.py +33 -0
  32. hugesitemap-1.0.0/src/hugesitemap/__init__conf__.py +90 -0
  33. hugesitemap-1.0.0/src/hugesitemap/__main__.py +9 -0
  34. hugesitemap-1.0.0/src/hugesitemap/adapters/__init__.py +16 -0
  35. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/__init__.py +62 -0
  36. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/commands/__init__.py +28 -0
  37. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/commands/config.py +335 -0
  38. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/commands/generate.py +153 -0
  39. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/commands/info.py +56 -0
  40. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/commands/logging.py +33 -0
  41. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/constants.py +28 -0
  42. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/context.py +155 -0
  43. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/exit_codes.py +52 -0
  44. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/main.py +120 -0
  45. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/py.typed +0 -0
  46. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/root.py +158 -0
  47. hugesitemap-1.0.0/src/hugesitemap/adapters/cli/typed_click.py +37 -0
  48. hugesitemap-1.0.0/src/hugesitemap/adapters/config/__init__.py +25 -0
  49. hugesitemap-1.0.0/src/hugesitemap/adapters/config/defaultconfig.d/30-sites.toml +43 -0
  50. hugesitemap-1.0.0/src/hugesitemap/adapters/config/defaultconfig.d/40-layered-config.toml +71 -0
  51. hugesitemap-1.0.0/src/hugesitemap/adapters/config/defaultconfig.d/90-logging.toml +432 -0
  52. hugesitemap-1.0.0/src/hugesitemap/adapters/config/defaultconfig.toml +46 -0
  53. hugesitemap-1.0.0/src/hugesitemap/adapters/config/deploy.py +118 -0
  54. hugesitemap-1.0.0/src/hugesitemap/adapters/config/display.py +56 -0
  55. hugesitemap-1.0.0/src/hugesitemap/adapters/config/loader.py +188 -0
  56. hugesitemap-1.0.0/src/hugesitemap/adapters/config/overrides.py +189 -0
  57. hugesitemap-1.0.0/src/hugesitemap/adapters/config/permissions.py +185 -0
  58. hugesitemap-1.0.0/src/hugesitemap/adapters/config/py.typed +0 -0
  59. hugesitemap-1.0.0/src/hugesitemap/adapters/config/site_loader.py +210 -0
  60. hugesitemap-1.0.0/src/hugesitemap/adapters/filesystem.py +91 -0
  61. hugesitemap-1.0.0/src/hugesitemap/adapters/logging/__init__.py +13 -0
  62. hugesitemap-1.0.0/src/hugesitemap/adapters/logging/py.typed +0 -0
  63. hugesitemap-1.0.0/src/hugesitemap/adapters/logging/setup.py +132 -0
  64. hugesitemap-1.0.0/src/hugesitemap/adapters/memory/__init__.py +58 -0
  65. hugesitemap-1.0.0/src/hugesitemap/adapters/memory/config.py +62 -0
  66. hugesitemap-1.0.0/src/hugesitemap/adapters/memory/logging.py +15 -0
  67. hugesitemap-1.0.0/src/hugesitemap/adapters/memory/sitemap.py +104 -0
  68. hugesitemap-1.0.0/src/hugesitemap/adapters/py.typed +0 -0
  69. hugesitemap-1.0.0/src/hugesitemap/adapters/sitemap_lxml.py +158 -0
  70. hugesitemap-1.0.0/src/hugesitemap/adapters/typed_deflate.py +48 -0
  71. hugesitemap-1.0.0/src/hugesitemap/adapters/typed_lxml.py +72 -0
  72. hugesitemap-1.0.0/src/hugesitemap/application/__init__.py +43 -0
  73. hugesitemap-1.0.0/src/hugesitemap/application/generate.py +181 -0
  74. hugesitemap-1.0.0/src/hugesitemap/application/ports.py +125 -0
  75. hugesitemap-1.0.0/src/hugesitemap/application/py.typed +0 -0
  76. hugesitemap-1.0.0/src/hugesitemap/composition/__init__.py +123 -0
  77. hugesitemap-1.0.0/src/hugesitemap/composition/py.typed +0 -0
  78. hugesitemap-1.0.0/src/hugesitemap/domain/__init__.py +49 -0
  79. hugesitemap-1.0.0/src/hugesitemap/domain/enums.py +77 -0
  80. hugesitemap-1.0.0/src/hugesitemap/domain/errors.py +39 -0
  81. hugesitemap-1.0.0/src/hugesitemap/domain/filters.py +118 -0
  82. hugesitemap-1.0.0/src/hugesitemap/domain/formatting.py +107 -0
  83. hugesitemap-1.0.0/src/hugesitemap/domain/limits.py +24 -0
  84. hugesitemap-1.0.0/src/hugesitemap/domain/model.py +82 -0
  85. hugesitemap-1.0.0/src/hugesitemap/domain/py.typed +0 -0
  86. hugesitemap-1.0.0/src/hugesitemap/entry.py +26 -0
  87. hugesitemap-1.0.0/src/hugesitemap/py.typed +0 -0
  88. hugesitemap-1.0.0/tests/conftest.py +538 -0
  89. hugesitemap-1.0.0/tests/test_cache_effectiveness.py +155 -0
  90. hugesitemap-1.0.0/tests/test_cli_config.py +802 -0
  91. hugesitemap-1.0.0/tests/test_cli_core.py +210 -0
  92. hugesitemap-1.0.0/tests/test_cli_env_file.py +177 -0
  93. hugesitemap-1.0.0/tests/test_cli_exit_codes.py +78 -0
  94. hugesitemap-1.0.0/tests/test_cli_generate.py +188 -0
  95. hugesitemap-1.0.0/tests/test_cli_overrides.py +164 -0
  96. hugesitemap-1.0.0/tests/test_cli_validation.py +132 -0
  97. hugesitemap-1.0.0/tests/test_config_overrides.py +327 -0
  98. hugesitemap-1.0.0/tests/test_deploy_permissions.py +520 -0
  99. hugesitemap-1.0.0/tests/test_display.py +121 -0
  100. hugesitemap-1.0.0/tests/test_domain_sitemap.py +137 -0
  101. hugesitemap-1.0.0/tests/test_enums.py +78 -0
  102. hugesitemap-1.0.0/tests/test_errors.py +28 -0
  103. hugesitemap-1.0.0/tests/test_filesystem.py +83 -0
  104. hugesitemap-1.0.0/tests/test_generate_use_case.py +93 -0
  105. hugesitemap-1.0.0/tests/test_logging.py +31 -0
  106. hugesitemap-1.0.0/tests/test_metadata.py +84 -0
  107. hugesitemap-1.0.0/tests/test_metadata_sync.py +80 -0
  108. hugesitemap-1.0.0/tests/test_module_entry.py +177 -0
  109. hugesitemap-1.0.0/tests/test_ports.py +185 -0
  110. hugesitemap-1.0.0/tests/test_property_overrides.py +165 -0
  111. hugesitemap-1.0.0/tests/test_site_loader.py +122 -0
  112. hugesitemap-1.0.0/tests/test_sitemap_lxml.py +91 -0
@@ -0,0 +1,22 @@
1
+ {
2
+ "image": "mcr.microsoft.com/devcontainers/python:3.13",
3
+
4
+ "postCreateCommand": "bash -lc '\nPY=/usr/local/bin/python;\n$PY -m pip install -U pip && \\\n$PY -m pip install ipykernel && \\\n$PY -m pip install -e . && \\\n# register kernel using this exact interpreter\n$PY -m ipykernel install --name=python3 --display-name=\"Python 3 (3.13)\" --user && \\\n# patch the notebook to point to the python3 kernelspec (VS Code will bind to /usr/local/bin/python)\n$PY - <<\"PY\"\nimport json, pathlib\np = pathlib.Path(\"notebooks/Quickstart.ipynb\")\nif p.exists():\n nb = json.loads(p.read_text(encoding=\"utf-8\"))\n md = nb.setdefault(\"metadata\", {})\n md[\"kernelspec\"] = {\n \"name\": \"python3\",\n \"display_name\": \"Python 3 (3.13)\",\n \"language\": \"python\"\n }\n md[\"language_info\"] = {\"name\": \"python\"}\n p.write_text(json.dumps(nb, ensure_ascii=False, indent=1), encoding=\"utf-8\")\n print(\"Pinned kernelspec to python3 in\", p)\nelse:\n print(\"Notebook not found:\", p)\nPY'\n",
5
+
6
+ "customizations": {
7
+ "vscode": {
8
+ "extensions": ["ms-toolsai.jupyter", "ms-python.python"],
9
+ "settings": {
10
+ "workbench.startupEditor": "none",
11
+ "jupyter.alwaysTrustNotebooks": true,
12
+ "jupyter.kernelPickerType": "OnlyRecommended",
13
+ "python.defaultInterpreterPath": "/usr/local/bin/python"
14
+ }
15
+ },
16
+ "codespaces": {
17
+ "openFiles": ["README.md"]
18
+ }
19
+ },
20
+
21
+ "postAttachCommand": "bash -lc 'if [ -f notebooks/Quickstart.ipynb ]; then code -r notebooks/Quickstart.ipynb; fi'"
22
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "python.defaultInterpreterPath": "/usr/local/bin/python3.13",
3
+ "jupyter.alwaysTrustNotebooks": true,
4
+ "jupyter.kernelPickerType": "OnlyRecommended",
5
+ "jupyter.askForKernelRestart": false
6
+ }
@@ -0,0 +1,389 @@
1
+ # Copy to .env and fill values as needed.
2
+
3
+ # Codecov upload token (required for private repos; optional for public repos)
4
+ CODECOV_TOKEN=
5
+
6
+ # PyPI API token for release workflow (.github/workflows/release.yml)
7
+ # Format: pypi-AgENdGVzdC5weXBpLm9yZwIk...
8
+ PYPI_API_TOKEN=
9
+
10
+ # Optional: GitHub token for API-limited tasks
11
+ GITHUB_TOKEN=
12
+
13
+
14
+ # ==============================================================================
15
+ # Email Configuration (SMTP)
16
+ # ==============================================================================
17
+ #
18
+ # Naming Convention
19
+ # -----------------
20
+ # Format: <SECTION>__<KEY>=value (double underscore separates section from key)
21
+ # Lists use comma-separated values, booleans use true/false, floats use decimal notation.
22
+ #
23
+ # Full environment variable (outside .env):
24
+ # HUGESITEMAP___EMAIL__<KEY>=value
25
+ # (triple underscore separates the application slug from the section)
26
+
27
+ # Purpose: SMTP servers for email delivery, tried in order (host:port, comma-separated)
28
+ # Type: comma-separated strings in "host[:port]" format
29
+ # Default: (empty, must be configured to send email)
30
+ # Environment Variable: HUGESITEMAP___EMAIL__SMTP_HOSTS=smtp.example.com:587
31
+ # .env: EMAIL__SMTP_HOSTS=smtp.example.com:587
32
+ # EMAIL__SMTP_HOSTS=smtp.example.com:587
33
+
34
+ # Purpose: Default sender address for outgoing emails
35
+ # Type: string (valid email address)
36
+ # Default: (empty, must be configured or passed via --from)
37
+ # Environment Variable: HUGESITEMAP___EMAIL__FROM_ADDRESS=noreply@example.com
38
+ # .env: EMAIL__FROM_ADDRESS=noreply@example.com
39
+ # EMAIL__FROM_ADDRESS=noreply@example.com
40
+
41
+ # Purpose: Default recipient addresses (comma-separated)
42
+ # Type: comma-separated strings (valid email addresses)
43
+ # Default: (empty, must be configured or passed via --to)
44
+ # Environment Variable: HUGESITEMAP___EMAIL__RECIPIENTS=admin@example.com,ops@example.com
45
+ # .env: EMAIL__RECIPIENTS=admin@example.com,ops@example.com
46
+ # EMAIL__RECIPIENTS=admin@example.com,ops@example.com
47
+
48
+ # Purpose: SMTP authentication username
49
+ # Type: string
50
+ # Default: (empty, no authentication)
51
+ # Environment Variable: HUGESITEMAP___EMAIL__SMTP_USERNAME=noreply@example.com
52
+ # .env: EMAIL__SMTP_USERNAME=noreply@example.com
53
+ # EMAIL__SMTP_USERNAME=noreply@example.com
54
+
55
+ # Purpose: SMTP authentication password
56
+ # Type: string
57
+ # Default: (empty, no authentication)
58
+ # Environment Variable: HUGESITEMAP___EMAIL__SMTP_PASSWORD=your-app-password
59
+ # .env: EMAIL__SMTP_PASSWORD=your-app-password
60
+ # EMAIL__SMTP_PASSWORD=your-app-password
61
+
62
+ # Purpose: Enable STARTTLS negotiation before authentication
63
+ # Type: boolean (true/false)
64
+ # Default: true
65
+ # Environment Variable: HUGESITEMAP___EMAIL__USE_STARTTLS=true
66
+ # .env: EMAIL__USE_STARTTLS=true
67
+ # EMAIL__USE_STARTTLS=true
68
+
69
+ # Purpose: Socket timeout in seconds for SMTP operations
70
+ # Type: float
71
+ # Default: 30.0
72
+ # Environment Variable: HUGESITEMAP___EMAIL__TIMEOUT=30.0
73
+ # .env: EMAIL__TIMEOUT=30.0
74
+ # EMAIL__TIMEOUT=30.0
75
+
76
+ # Purpose: Raise FileNotFoundError when attachment files are missing
77
+ # Type: boolean (true/false)
78
+ # Default: true
79
+ # Environment Variable: HUGESITEMAP___EMAIL__RAISE_ON_MISSING_ATTACHMENTS=true
80
+ # .env: EMAIL__RAISE_ON_MISSING_ATTACHMENTS=true
81
+ # EMAIL__RAISE_ON_MISSING_ATTACHMENTS=true
82
+
83
+ # Purpose: Raise ValueError when recipient addresses are invalid
84
+ # Type: boolean (true/false)
85
+ # Default: true
86
+ # Environment Variable: HUGESITEMAP___EMAIL__RAISE_ON_INVALID_RECIPIENT=true
87
+ # .env: EMAIL__RAISE_ON_INVALID_RECIPIENT=true
88
+ # EMAIL__RAISE_ON_INVALID_RECIPIENT=true
89
+
90
+
91
+ # ==============================================================================
92
+ # Logging Configuration (lib_log_rich)
93
+ # ==============================================================================
94
+ #
95
+ # Naming Convention
96
+ # -----------------
97
+ # Format: <SECTION>__<KEY>=value (double underscore separates section from key)
98
+ # Strings need no quotes. Booleans: true/false. Floats: 1.0. Lists: comma-separated.
99
+ #
100
+ # Full environment variable (outside .env):
101
+ # HUGESITEMAP___LIB_LOG_RICH__<KEY>=value
102
+ #
103
+ # For nested subsections (e.g. payload_limits):
104
+ # HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__<KEY>=value
105
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__<KEY>=value
106
+
107
+ # --- Core Identity ---
108
+
109
+ # Purpose: Logical service name recorded in each log event
110
+ # Type: string (non-empty)
111
+ # Default: "hugesitemap"
112
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__SERVICE=my-application
113
+ # .env: LIB_LOG_RICH__SERVICE=my-application
114
+ # LIB_LOG_RICH__SERVICE=my-application
115
+
116
+ # Purpose: Deployment environment label
117
+ # Type: string (non-empty)
118
+ # Default: "prod"
119
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__ENVIRONMENT=dev
120
+ # .env: LIB_LOG_RICH__ENVIRONMENT=dev
121
+ # LIB_LOG_RICH__ENVIRONMENT=dev
122
+
123
+ # --- Console Output ---
124
+
125
+ # Purpose: Minimum severity level emitted to Rich console
126
+ # Type: string (case-insensitive): "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
127
+ # Default: "INFO"
128
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__CONSOLE_LEVEL=DEBUG
129
+ # .env: LIB_LOG_RICH__CONSOLE_LEVEL=DEBUG
130
+ # LIB_LOG_RICH__CONSOLE_LEVEL=DEBUG
131
+
132
+ # Purpose: Where to send console output
133
+ # Type: string: "stdout", "stderr", "both", "custom", "none"
134
+ # Default: "stderr"
135
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__CONSOLE_STREAM=stderr
136
+ # .env: LIB_LOG_RICH__CONSOLE_STREAM=stderr
137
+ # LIB_LOG_RICH__CONSOLE_STREAM=stderr
138
+
139
+ # Purpose: Console line layout preset
140
+ # Type: string (case-insensitive): "full", "short", "full_loc", "short_loc"
141
+ # Default: "short_loc"
142
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__CONSOLE_FORMAT_PRESET=short_loc
143
+ # .env: LIB_LOG_RICH__CONSOLE_FORMAT_PRESET=short_loc
144
+ # LIB_LOG_RICH__CONSOLE_FORMAT_PRESET=short_loc
145
+
146
+ # Purpose: Custom console output template (overrides preset)
147
+ # Type: string (Python str.format template); empty = uses preset
148
+ # Default: (empty, uses preset)
149
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__CONSOLE_FORMAT_TEMPLATE={timestamp_trimmed_naive_loc} {level_code} {message}
150
+ # .env: LIB_LOG_RICH__CONSOLE_FORMAT_TEMPLATE={timestamp_trimmed_naive_loc} {level_code} {message}
151
+ # LIB_LOG_RICH__CONSOLE_FORMAT_TEMPLATE={timestamp_trimmed_naive_loc} {level_code} {message}
152
+
153
+ # Purpose: Rich color palette for console output
154
+ # Type: string: "classic", "dark", "neon", "pastel"
155
+ # Default: "dark"
156
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__CONSOLE_THEME=dark
157
+ # .env: LIB_LOG_RICH__CONSOLE_THEME=dark
158
+ # LIB_LOG_RICH__CONSOLE_THEME=dark
159
+
160
+ # Purpose: Override Rich styles per severity level (comma-separated LEVEL=style pairs)
161
+ # Type: comma-separated LEVEL=style pairs
162
+ # Default: (empty, uses theme defaults)
163
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__CONSOLE_STYLES=DEBUG=dim,ERROR=bold red
164
+ # .env: LIB_LOG_RICH__CONSOLE_STYLES=DEBUG=dim,ERROR=bold red
165
+ # LIB_LOG_RICH__CONSOLE_STYLES=DEBUG=dim,ERROR=bold red
166
+
167
+ # Purpose: Force ANSI color output even when stderr is not a TTY
168
+ # Type: boolean (true/false)
169
+ # Default: false
170
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__FORCE_COLOR=true
171
+ # .env: LIB_LOG_RICH__FORCE_COLOR=true
172
+ # LIB_LOG_RICH__FORCE_COLOR=true
173
+
174
+ # Purpose: Disable color output entirely (overrides force_color)
175
+ # Type: boolean (true/false)
176
+ # Default: false
177
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__NO_COLOR=false
178
+ # .env: LIB_LOG_RICH__NO_COLOR=false
179
+ # LIB_LOG_RICH__NO_COLOR=false
180
+
181
+ # --- Backend Adapters ---
182
+
183
+ # Purpose: Minimum severity threshold for journald and Windows Event Log
184
+ # Type: string (case-insensitive): "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
185
+ # Default: "WARNING"
186
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__BACKEND_LEVEL=WARNING
187
+ # .env: LIB_LOG_RICH__BACKEND_LEVEL=WARNING
188
+ # LIB_LOG_RICH__BACKEND_LEVEL=WARNING
189
+
190
+ # Purpose: Enable systemd journald adapter (Linux only; requires python3-systemd)
191
+ # Type: boolean (true/false)
192
+ # Default: false
193
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__ENABLE_JOURNALD=true
194
+ # .env: LIB_LOG_RICH__ENABLE_JOURNALD=true
195
+ # LIB_LOG_RICH__ENABLE_JOURNALD=true
196
+
197
+ # Purpose: Enable Windows Event Log adapter (Windows only)
198
+ # Type: boolean (true/false)
199
+ # Default: false
200
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__ENABLE_EVENTLOG=false
201
+ # .env: LIB_LOG_RICH__ENABLE_EVENTLOG=false
202
+ # LIB_LOG_RICH__ENABLE_EVENTLOG=false
203
+
204
+ # --- Graylog / GELF ---
205
+
206
+ # Purpose: Enable Graylog adapter for centralized logging
207
+ # Type: boolean (true/false)
208
+ # Default: false
209
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__ENABLE_GRAYLOG=true
210
+ # .env: LIB_LOG_RICH__ENABLE_GRAYLOG=true
211
+ # LIB_LOG_RICH__ENABLE_GRAYLOG=true
212
+
213
+ # Purpose: Graylog server address (host:port)
214
+ # Type: string "host:port"
215
+ # Default: (none, must be configured to enable Graylog)
216
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__GRAYLOG_ENDPOINT=graylog.example.com:12201
217
+ # .env: LIB_LOG_RICH__GRAYLOG_ENDPOINT=graylog.example.com:12201
218
+ # LIB_LOG_RICH__GRAYLOG_ENDPOINT=graylog.example.com:12201
219
+
220
+ # Purpose: Transport protocol for Graylog (tcp, udp); TLS only supported with tcp
221
+ # Type: string: "tcp", "udp"
222
+ # Default: "tcp"
223
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__GRAYLOG_PROTOCOL=tcp
224
+ # .env: LIB_LOG_RICH__GRAYLOG_PROTOCOL=tcp
225
+ # LIB_LOG_RICH__GRAYLOG_PROTOCOL=tcp
226
+
227
+ # Purpose: Wrap Graylog TCP connection in TLS
228
+ # Type: boolean (true/false)
229
+ # Default: false
230
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__GRAYLOG_TLS=true
231
+ # .env: LIB_LOG_RICH__GRAYLOG_TLS=true
232
+ # LIB_LOG_RICH__GRAYLOG_TLS=true
233
+
234
+ # Purpose: Minimum severity level sent to Graylog
235
+ # Type: string (case-insensitive): "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
236
+ # Default: "WARNING"
237
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__GRAYLOG_LEVEL=WARNING
238
+ # .env: LIB_LOG_RICH__GRAYLOG_LEVEL=WARNING
239
+ # LIB_LOG_RICH__GRAYLOG_LEVEL=WARNING
240
+
241
+ # --- Queue Settings ---
242
+
243
+ # Purpose: Route log events through background queue worker (false = synchronous, blocks on I/O)
244
+ # Type: boolean (true/false)
245
+ # Default: true
246
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__QUEUE_ENABLED=true
247
+ # .env: LIB_LOG_RICH__QUEUE_ENABLED=true
248
+ # LIB_LOG_RICH__QUEUE_ENABLED=true
249
+
250
+ # Purpose: Maximum pending events before queue full policy applies
251
+ # Type: integer (> 0)
252
+ # Default: 2048
253
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__QUEUE_MAXSIZE=2048
254
+ # .env: LIB_LOG_RICH__QUEUE_MAXSIZE=2048
255
+ # LIB_LOG_RICH__QUEUE_MAXSIZE=2048
256
+
257
+ # Purpose: Behavior when queue is full
258
+ # Type: string: "block" (wait for space), "drop" (discard events)
259
+ # Default: "block"
260
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__QUEUE_FULL_POLICY=block
261
+ # .env: LIB_LOG_RICH__QUEUE_FULL_POLICY=block
262
+ # LIB_LOG_RICH__QUEUE_FULL_POLICY=block
263
+
264
+ # Purpose: Timeout in seconds for blocking queue puts (0 = infinite wait)
265
+ # Type: float (>= 0)
266
+ # Default: 1.0
267
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__QUEUE_PUT_TIMEOUT=1.0
268
+ # .env: LIB_LOG_RICH__QUEUE_PUT_TIMEOUT=1.0
269
+ # LIB_LOG_RICH__QUEUE_PUT_TIMEOUT=1.0
270
+
271
+ # Purpose: Maximum wait in seconds for queue drain during shutdown
272
+ # Type: float (> 0)
273
+ # Default: 5.0
274
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__QUEUE_STOP_TIMEOUT=5.0
275
+ # .env: LIB_LOG_RICH__QUEUE_STOP_TIMEOUT=5.0
276
+ # LIB_LOG_RICH__QUEUE_STOP_TIMEOUT=5.0
277
+
278
+ # --- Ring Buffer ---
279
+
280
+ # Purpose: Enable in-memory circular buffer for log history (enables log.dump())
281
+ # Type: boolean (true/false)
282
+ # Default: true
283
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__ENABLE_RING_BUFFER=true
284
+ # .env: LIB_LOG_RICH__ENABLE_RING_BUFFER=true
285
+ # LIB_LOG_RICH__ENABLE_RING_BUFFER=true
286
+
287
+ # Purpose: Maximum events retained in ring buffer
288
+ # Type: integer (> 0)
289
+ # Default: 25000
290
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__RING_BUFFER_SIZE=25000
291
+ # .env: LIB_LOG_RICH__RING_BUFFER_SIZE=25000
292
+ # LIB_LOG_RICH__RING_BUFFER_SIZE=25000
293
+
294
+ # --- Dump Format ---
295
+
296
+ # Purpose: Default layout for text dumps
297
+ # Type: string (case-insensitive): "full", "short", "full_loc", "short_loc"
298
+ # Default: "full"
299
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__DUMP_FORMAT_PRESET=full
300
+ # .env: LIB_LOG_RICH__DUMP_FORMAT_PRESET=full
301
+ # LIB_LOG_RICH__DUMP_FORMAT_PRESET=full
302
+
303
+ # Purpose: Custom template for text dumps (overrides preset)
304
+ # Type: string (Python str.format template); empty = uses preset
305
+ # Default: (empty, uses preset)
306
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__DUMP_FORMAT_TEMPLATE={timestamp_trimmed_naive_loc} {level_code} {message}
307
+ # .env: LIB_LOG_RICH__DUMP_FORMAT_TEMPLATE={timestamp_trimmed_naive_loc} {level_code} {message}
308
+ # LIB_LOG_RICH__DUMP_FORMAT_TEMPLATE={timestamp_trimmed_naive_loc} {level_code} {message}
309
+
310
+ # --- Security & Payload ---
311
+
312
+ # Purpose: Regex patterns to redact sensitive data (comma-separated field=regex pairs)
313
+ # Type: comma-separated field=regex pairs
314
+ # Default: password=.+,secret=.+,token=.+
315
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__SCRUB_PATTERNS=password=.+,secret=.+,token=.+,api_key=.+
316
+ # .env: LIB_LOG_RICH__SCRUB_PATTERNS=password=.+,secret=.+,token=.+,api_key=.+
317
+ # LIB_LOG_RICH__SCRUB_PATTERNS=password=.+,secret=.+,token=.+,api_key=.+
318
+
319
+ # Purpose: Throttle log emissions (MAX_EVENTS:WINDOW_SECONDS)
320
+ # Type: string "max_events:window_seconds"
321
+ # Default: (none, no rate limiting)
322
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__RATE_LIMIT=100:60
323
+ # .env: LIB_LOG_RICH__RATE_LIMIT=100:60
324
+ # LIB_LOG_RICH__RATE_LIMIT=100:60
325
+
326
+ # --- Payload Limits ---
327
+
328
+ # Purpose: Truncate vs reject oversized messages
329
+ # Type: boolean (true/false)
330
+ # Default: true
331
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__TRUNCATE_MESSAGE=true
332
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__TRUNCATE_MESSAGE=true
333
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__TRUNCATE_MESSAGE=true
334
+
335
+ # Purpose: Maximum characters in primary log message
336
+ # Type: integer
337
+ # Default: 4096
338
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__MESSAGE_MAX_CHARS=4096
339
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__MESSAGE_MAX_CHARS=4096
340
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__MESSAGE_MAX_CHARS=4096
341
+
342
+ # Purpose: Maximum keys in extra metadata dict
343
+ # Type: integer
344
+ # Default: 25
345
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_KEYS=25
346
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_KEYS=25
347
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_KEYS=25
348
+
349
+ # Purpose: Maximum characters per extra value (after stringify)
350
+ # Type: integer
351
+ # Default: 512
352
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_VALUE_CHARS=512
353
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_VALUE_CHARS=512
354
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_VALUE_CHARS=512
355
+
356
+ # Purpose: Maximum nesting depth for extra structures
357
+ # Type: integer
358
+ # Default: 3
359
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_DEPTH=3
360
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_DEPTH=3
361
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_DEPTH=3
362
+
363
+ # Purpose: Total UTF-8 byte limit for sanitized extra payload
364
+ # Type: integer
365
+ # Default: 8192
366
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_TOTAL_BYTES=8192
367
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_TOTAL_BYTES=8192
368
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__EXTRA_MAX_TOTAL_BYTES=8192
369
+
370
+ # Purpose: Maximum keys in LogContext.extra
371
+ # Type: integer
372
+ # Default: 20
373
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__CONTEXT_MAX_KEYS=20
374
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__CONTEXT_MAX_KEYS=20
375
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__CONTEXT_MAX_KEYS=20
376
+
377
+ # Purpose: Maximum characters per context value
378
+ # Type: integer
379
+ # Default: 256
380
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__CONTEXT_MAX_VALUE_CHARS=256
381
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__CONTEXT_MAX_VALUE_CHARS=256
382
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__CONTEXT_MAX_VALUE_CHARS=256
383
+
384
+ # Purpose: Number of frames preserved in exception tracebacks
385
+ # Type: integer
386
+ # Default: 10
387
+ # Environment Variable: HUGESITEMAP___LIB_LOG_RICH__PAYLOAD_LIMITS__STACKTRACE_MAX_FRAMES=10
388
+ # .env: LIB_LOG_RICH__PAYLOAD_LIMITS__STACKTRACE_MAX_FRAMES=10
389
+ # LIB_LOG_RICH__PAYLOAD_LIMITS__STACKTRACE_MAX_FRAMES=10
@@ -0,0 +1,92 @@
1
+ name: Extract project metadata
2
+ description: >-
3
+ Parse pyproject.toml and expose project metadata as step outputs.
4
+ Requires Python to be available in the runner environment.
5
+ Auto-installs rtoml if not already present.
6
+
7
+ outputs:
8
+ PACKAGE_MODULE:
9
+ description: Python-importable module name (underscored)
10
+ value: ${{ steps.meta.outputs.PACKAGE_MODULE }}
11
+ PROJECT_NAME:
12
+ description: Project name from pyproject.toml
13
+ value: ${{ steps.meta.outputs.PROJECT_NAME }}
14
+ CLI_BIN:
15
+ description: CLI entry-point binary name
16
+ value: ${{ steps.meta.outputs.CLI_BIN }}
17
+ SRC_PATH:
18
+ description: Source directory path (e.g. "src")
19
+ value: ${{ steps.meta.outputs.SRC_PATH }}
20
+ COV_FAIL_UNDER:
21
+ description: Minimum coverage percentage from tool.coverage.report.fail_under
22
+ value: ${{ steps.meta.outputs.COV_FAIL_UNDER }}
23
+ COV_REPORT_FILE:
24
+ description: Coverage report filename (e.g. "coverage.xml")
25
+ value: ${{ steps.meta.outputs.COV_REPORT_FILE }}
26
+ PYTEST_VERBOSITY:
27
+ description: Pytest verbosity flag (e.g. "-vv")
28
+ value: ${{ steps.meta.outputs.PYTEST_VERBOSITY }}
29
+ BANDIT_SKIP_FLAG:
30
+ description: Bandit skip flag string (e.g. "-s B101,B601") or empty
31
+ value: ${{ steps.meta.outputs.BANDIT_SKIP_FLAG }}
32
+
33
+ runs:
34
+ using: composite
35
+ steps:
36
+ - name: Extract project metadata from pyproject.toml
37
+ id: meta
38
+ shell: python
39
+ run: |
40
+ import os, subprocess, sys
41
+ try:
42
+ import rtoml
43
+ except ModuleNotFoundError:
44
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "rtoml", "-q"])
45
+ import rtoml
46
+
47
+ from pathlib import Path
48
+ data = rtoml.load(Path('pyproject.toml'))
49
+
50
+ # --- [project] section ---
51
+ project = data['project']['name']
52
+ module = project.replace('-', '_')
53
+ dash = project.replace('_', '-')
54
+ scripts = list(data['project'].get('scripts', {}).keys())
55
+ cli_bin = scripts[0] if scripts else dash
56
+
57
+ # --- [tool.scripts.test] section ---
58
+ scripts_test = data.get('tool', {}).get('scripts', {}).get('test', {})
59
+ src_path = scripts_test.get('src-path', 'src')
60
+ pytest_verbosity = scripts_test.get('pytest-verbosity', '-vv')
61
+ cov_report_file = scripts_test.get('coverage-report-file', 'coverage.xml')
62
+
63
+ # --- [tool.coverage.report] section ---
64
+ cov_fail_under = (
65
+ data.get('tool', {}).get('coverage', {}).get('report', {}).get('fail_under', 90)
66
+ )
67
+
68
+ # --- [tool.bandit] section ---
69
+ bandit_skips = data.get('tool', {}).get('bandit', {}).get('skips', [])
70
+ bandit_skip_flag = f"-s {','.join(bandit_skips)}" if bandit_skips else ""
71
+
72
+ # Write to GITHUB_OUTPUT for composite action outputs
73
+ with open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as out:
74
+ out.write(f"PROJECT_NAME={project}\n")
75
+ out.write(f"PACKAGE_MODULE={module}\n")
76
+ out.write(f"CLI_BIN={cli_bin}\n")
77
+ out.write(f"SRC_PATH={src_path}\n")
78
+ out.write(f"PYTEST_VERBOSITY={pytest_verbosity}\n")
79
+ out.write(f"COV_REPORT_FILE={cov_report_file}\n")
80
+ out.write(f"COV_FAIL_UNDER={cov_fail_under}\n")
81
+ out.write(f"BANDIT_SKIP_FLAG={bandit_skip_flag}\n")
82
+
83
+ # Also write to GITHUB_ENV so subsequent steps can use ${{ env.VAR }}
84
+ with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env:
85
+ env.write(f"PROJECT_NAME={project}\n")
86
+ env.write(f"PACKAGE_MODULE={module}\n")
87
+ env.write(f"CLI_BIN={cli_bin}\n")
88
+ env.write(f"SRC_PATH={src_path}\n")
89
+ env.write(f"PYTEST_VERBOSITY={pytest_verbosity}\n")
90
+ env.write(f"COV_REPORT_FILE={cov_report_file}\n")
91
+ env.write(f"COV_FAIL_UNDER={cov_fail_under}\n")
92
+ env.write(f"BANDIT_SKIP_FLAG={bandit_skip_flag}\n")
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ allow:
8
+ - dependency-type: "direct"
9
+ labels:
10
+ - "dependencies"
11
+ commit-message:
12
+ prefix: "deps"
13
+ include: "scope"
14
+ - package-ecosystem: "github-actions"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
18
+ labels:
19
+ - "dependencies"
20
+ commit-message:
21
+ prefix: "deps"
22
+ include: "scope"
@@ -0,0 +1,39 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+ schedule:
9
+ - cron: '0 8 * * 1'
10
+
11
+ jobs:
12
+ analyze:
13
+ name: CodeQL Analyze
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ actions: read
17
+ contents: read
18
+ security-events: write
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ language: [ 'python' ]
23
+
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v7
27
+
28
+ - name: Initialize CodeQL
29
+ uses: github/codeql-action/init@v4
30
+ with:
31
+ languages: ${{ matrix.language }}
32
+
33
+ - name: Autobuild
34
+ uses: github/codeql-action/autobuild@v4
35
+
36
+ - name: Perform CodeQL Analysis
37
+ uses: github/codeql-action/analyze@v4
38
+ with:
39
+ category: "/language:${{ matrix.language }}"