doql 0.0.1__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.
- doql-0.0.1/LICENSE +26 -0
- doql-0.0.1/PKG-INFO +252 -0
- doql-0.0.1/README.md +204 -0
- doql-0.0.1/doql/__init__.py +7 -0
- doql-0.0.1/doql/cli/__init__.py +19 -0
- doql-0.0.1/doql/cli/build.py +159 -0
- doql-0.0.1/doql/cli/commands/__init__.py +38 -0
- doql-0.0.1/doql/cli/commands/deploy.py +25 -0
- doql-0.0.1/doql/cli/commands/docs.py +21 -0
- doql-0.0.1/doql/cli/commands/export.py +36 -0
- doql-0.0.1/doql/cli/commands/generate.py +34 -0
- doql-0.0.1/doql/cli/commands/init.py +43 -0
- doql-0.0.1/doql/cli/commands/kiosk.py +20 -0
- doql-0.0.1/doql/cli/commands/plan.py +115 -0
- doql-0.0.1/doql/cli/commands/quadlet.py +22 -0
- doql-0.0.1/doql/cli/commands/query.py +31 -0
- doql-0.0.1/doql/cli/commands/render.py +26 -0
- doql-0.0.1/doql/cli/commands/run.py +25 -0
- doql-0.0.1/doql/cli/commands/validate.py +43 -0
- doql-0.0.1/doql/cli/context.py +60 -0
- doql-0.0.1/doql/cli/lockfile.py +88 -0
- doql-0.0.1/doql/cli/main.py +117 -0
- doql-0.0.1/doql/cli/sync.py +210 -0
- doql-0.0.1/doql/cli.py +62 -0
- doql-0.0.1/doql/generators/__init__.py +5 -0
- doql-0.0.1/doql/generators/api_gen/__init__.py +167 -0
- doql-0.0.1/doql/generators/api_gen/alembic.py +154 -0
- doql-0.0.1/doql/generators/api_gen/auth.py +141 -0
- doql-0.0.1/doql/generators/api_gen/common.py +79 -0
- doql-0.0.1/doql/generators/api_gen/database.py +35 -0
- doql-0.0.1/doql/generators/api_gen/main.py +74 -0
- doql-0.0.1/doql/generators/api_gen/models.py +82 -0
- doql-0.0.1/doql/generators/api_gen/routes.py +115 -0
- doql-0.0.1/doql/generators/api_gen/schemas.py +83 -0
- doql-0.0.1/doql/generators/api_gen.py +25 -0
- doql-0.0.1/doql/generators/ci_gen.py +112 -0
- doql-0.0.1/doql/generators/deploy.py +20 -0
- doql-0.0.1/doql/generators/desktop_gen.py +209 -0
- doql-0.0.1/doql/generators/docs_gen.py +24 -0
- doql-0.0.1/doql/generators/document_gen.py +182 -0
- doql-0.0.1/doql/generators/export_postman.py +25 -0
- doql-0.0.1/doql/generators/export_ts_sdk.py +26 -0
- doql-0.0.1/doql/generators/i18n_gen.py +168 -0
- doql-0.0.1/doql/generators/infra_gen.py +321 -0
- doql-0.0.1/doql/generators/integrations_gen.py +320 -0
- doql-0.0.1/doql/generators/mobile_gen.py +462 -0
- doql-0.0.1/doql/generators/report_gen.py +142 -0
- doql-0.0.1/doql/generators/web_gen/__init__.py +176 -0
- doql-0.0.1/doql/generators/web_gen/common.py +9 -0
- doql-0.0.1/doql/generators/web_gen/components.py +76 -0
- doql-0.0.1/doql/generators/web_gen/config.py +122 -0
- doql-0.0.1/doql/generators/web_gen/core.py +57 -0
- doql-0.0.1/doql/generators/web_gen/pages.py +163 -0
- doql-0.0.1/doql/generators/web_gen/pwa.py +109 -0
- doql-0.0.1/doql/generators/web_gen/router.py +43 -0
- doql-0.0.1/doql/generators/web_gen.py +34 -0
- doql-0.0.1/doql/generators/workflow_gen.py +304 -0
- doql-0.0.1/doql/lsp_server.py +364 -0
- doql-0.0.1/doql/parser.py +70 -0
- doql-0.0.1/doql/parsers/__init__.py +117 -0
- doql-0.0.1/doql/parsers/blocks.py +50 -0
- doql-0.0.1/doql/parsers/extractors.py +191 -0
- doql-0.0.1/doql/parsers/models.py +207 -0
- doql-0.0.1/doql/parsers/registry.py +267 -0
- doql-0.0.1/doql/parsers/validators.py +138 -0
- doql-0.0.1/doql/plugins.py +101 -0
- doql-0.0.1/doql/scaffolds/calibration-lab/.env.example +19 -0
- doql-0.0.1/doql/scaffolds/calibration-lab/app.doql +135 -0
- doql-0.0.1/doql/scaffolds/iot-fleet/.env.example +21 -0
- doql-0.0.1/doql/scaffolds/iot-fleet/app.doql +99 -0
- doql-0.0.1/doql/scaffolds/minimal/.env.example +8 -0
- doql-0.0.1/doql/scaffolds/minimal/app.doql +35 -0
- doql-0.0.1/doql/scaffolds/saas-multi-tenant/.env.example +22 -0
- doql-0.0.1/doql/scaffolds/saas-multi-tenant/app.doql +97 -0
- doql-0.0.1/doql/utils/__init__.py +6 -0
- doql-0.0.1/doql/utils/naming.py +37 -0
- doql-0.0.1/doql.egg-info/PKG-INFO +252 -0
- doql-0.0.1/doql.egg-info/SOURCES.txt +86 -0
- doql-0.0.1/doql.egg-info/dependency_links.txt +1 -0
- doql-0.0.1/doql.egg-info/entry_points.txt +3 -0
- doql-0.0.1/doql.egg-info/requires.txt +27 -0
- doql-0.0.1/doql.egg-info/top_level.txt +1 -0
- doql-0.0.1/pyproject.toml +123 -0
- doql-0.0.1/setup.cfg +4 -0
- doql-0.0.1/tests/test_generators.py +116 -0
- doql-0.0.1/tests/test_lsp.py +59 -0
- doql-0.0.1/tests/test_parser.py +173 -0
- doql-0.0.1/tests/test_plugins.py +118 -0
doql-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 Softreck
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
|
|
19
|
+
Full license text: https://www.apache.org/licenses/LICENSE-2.0.txt
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
Note: This Apache 2.0 license covers the `doql` open-core components.
|
|
24
|
+
Premium plugins (doql-plugin-gxp, doql-plugin-iso17025, doql-plugin-fleet)
|
|
25
|
+
and enterprise/SaaS hosting are distributed under separate commercial
|
|
26
|
+
terms ā see https://doql.dev/pricing for details.
|
doql-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: doql
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Declarative OQL ā build complete applications from a single .doql file
|
|
5
|
+
Author-email: Softreck <hello@softreck.dev>, Tom Sapletta <tom@sapletta.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/softreck/doql
|
|
8
|
+
Project-URL: Documentation, https://doql.dev
|
|
9
|
+
Project-URL: Repository, https://github.com/softreck/doql
|
|
10
|
+
Project-URL: Issues, https://github.com/softreck/doql/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/softreck/doql/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: dsl,code-generation,oqlos,low-code,saas,asset-management
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: click>=8.1
|
|
24
|
+
Requires-Dist: pydantic>=2.0
|
|
25
|
+
Requires-Dist: pyyaml>=6.0
|
|
26
|
+
Requires-Dist: jinja2>=3.1
|
|
27
|
+
Requires-Dist: rich>=13.0
|
|
28
|
+
Requires-Dist: httpx>=0.25
|
|
29
|
+
Requires-Dist: goal>=2.1.0
|
|
30
|
+
Requires-Dist: costs>=0.1.20
|
|
31
|
+
Requires-Dist: pfix>=0.1.60
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
35
|
+
Requires-Dist: ruff; extra == "dev"
|
|
36
|
+
Requires-Dist: mypy; extra == "dev"
|
|
37
|
+
Requires-Dist: goal>=2.1.0; extra == "dev"
|
|
38
|
+
Requires-Dist: costs>=0.1.20; extra == "dev"
|
|
39
|
+
Requires-Dist: pfix>=0.1.60; extra == "dev"
|
|
40
|
+
Provides-Extra: api
|
|
41
|
+
Requires-Dist: fastapi>=0.104; extra == "api"
|
|
42
|
+
Requires-Dist: sqlalchemy>=2.0; extra == "api"
|
|
43
|
+
Requires-Dist: alembic>=1.13; extra == "api"
|
|
44
|
+
Provides-Extra: lsp
|
|
45
|
+
Requires-Dist: pygls>=1.3; extra == "lsp"
|
|
46
|
+
Requires-Dist: lsprotocol>=2023.0.1; extra == "lsp"
|
|
47
|
+
Dynamic: license-file
|
|
48
|
+
|
|
49
|
+
# Rodzina OQL ā paczka kompletna
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## AI Cost Tracking
|
|
53
|
+
|
|
54
|
+
   
|
|
55
|
+
  
|
|
56
|
+
|
|
57
|
+
- š¤ **LLM usage:** $0.7500 (5 commits)
|
|
58
|
+
- š¤ **Human dev:** ~$871 (8.7h @ $100/h, 30min dedup)
|
|
59
|
+
|
|
60
|
+
Generated on 2026-04-17 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
**Data wydania:** 2026-04-16
|
|
65
|
+
**ZawartoÅÄ:** repo `doql/` + repo `articles/` + ten README
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Co jest w tej paczce
|
|
70
|
+
|
|
71
|
+
### `doql/` ā nowy projekt: generator deklaratywny
|
|
72
|
+
Kompletny projekt **doql** ā warstwa deklaratywna nad `oqlos`, która z jednego pliku `.doql` generuje aplikacje, dokumenty, kioski, integracje API. Licencja Apache 2.0 (open core).
|
|
73
|
+
|
|
74
|
+
**Kluczowe dokumenty:**
|
|
75
|
+
- `README.md` ā wprowadzenie, quick start, link do wszystkich sekcji
|
|
76
|
+
- `SPEC.md` ā peÅna specyfikacja jÄzyka v0.2 (16 sekcji, wszystkie typy artefaktów)
|
|
77
|
+
- `GLOSSARY.md` ā **jednoznaczna semantyka OQL / DOQL / IQL** (niezbÄdne, jeÅli komunikujesz projekt publicznie)
|
|
78
|
+
- `OQLOS-REQUIREMENTS.md` ā lista zmian w oqlos (8 wymagaÅ: 5 krytycznych, 3 dodane przy v0.2)
|
|
79
|
+
- `ROADMAP.md` ā fazy 0-3 rozwoju, ~8 tygodni do produkcji
|
|
80
|
+
- `CHANGELOG.md` ā historia wersji v0.1 i v0.2
|
|
81
|
+
|
|
82
|
+
**PiÄÄ przykÅadów (gotowych `.doql`):**
|
|
83
|
+
- `examples/asset-management/` ā klon DrƤgerware, peÅen SaaS dla BHP
|
|
84
|
+
- `examples/calibration-lab/` ā laboratorium ISO 17025 z 4-eyes i WORM
|
|
85
|
+
- `examples/iot-fleet/` ā flota RPi z OTA canary i Prometheus
|
|
86
|
+
- `examples/document-generator/` ā **nowy w v0.2** ā tylko generator PDF bez backendu
|
|
87
|
+
- `examples/kiosk-station/` ā **nowy w v0.2** ā stanowisko operatora na tablecie
|
|
88
|
+
|
|
89
|
+
**Infrastruktura projektu:**
|
|
90
|
+
- `pyproject.toml` ā pakowanie Python
|
|
91
|
+
- `doql/cli.py` ā szkielet CLI z komendami init/validate/plan/build/run/deploy/sync/export/generate/render/query/kiosk/quadlet/docs
|
|
92
|
+
- `doql/scaffolds/minimal/` ā szablon dla `doql init`
|
|
93
|
+
- `LICENSE` (Apache 2.0)
|
|
94
|
+
- `.gitignore`
|
|
95
|
+
|
|
96
|
+
### `articles/` ā artykuÅy WordPress
|
|
97
|
+
SzeÅÄ artykuÅów markdown z YAML front-matter gotowych do publikacji (kompatybilne z `wp-cli` i WordPress REST API). Każdy artykuÅ to jeden projekt / jedna nowoÅÄ.
|
|
98
|
+
|
|
99
|
+
**Lista:**
|
|
100
|
+
1. `01-oqlos-status-2026-q2.md` ā status oqlos po refaktorze (CCĢ 3,7ā3,2)
|
|
101
|
+
2. `02-testql-status-2026-q2.md` ā TestQL, porównanie z Playwright
|
|
102
|
+
3. `03-saas-www-status-2026-q2.md` ā SaaS oqlos.com, 5 bugów P0, diagnoza landingu
|
|
103
|
+
4. `04-doql-ogloszenie.md` ā ogÅoszenie doql v0.1 (SaaS generator)
|
|
104
|
+
5. `05-wizja-ekosystemu-oqlos.md` ā wizja caÅej rodziny (4 warstwy, strategia open-core)
|
|
105
|
+
6. `06-doql-v02-dokumenty-kiosk.md` ā doql v0.2 (dokumenty, kiosk, semantyka)
|
|
106
|
+
|
|
107
|
+
Każdy 800-1800 sÅów, po polsku, gotowy do kopiuj-wklej do WordPressa.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Jak to odpaliÄ
|
|
112
|
+
|
|
113
|
+
### Instalacja doql (po sklonowaniu do repo)
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
cd doql/
|
|
117
|
+
pip install -e .
|
|
118
|
+
doql --version
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Szybki test ā generator PDF
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
doql init --template document-generator my-lab
|
|
125
|
+
cd my-lab
|
|
126
|
+
cp .env.example .env
|
|
127
|
+
doql validate
|
|
128
|
+
doql plan
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Szybki start z CLI shell
|
|
132
|
+
|
|
133
|
+
Użyj skryptu `doql.sh` do generowania i uruchamiania aplikacji jednÄ
komendÄ
:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Generuj i uruchom desktop app
|
|
137
|
+
./doql.sh examples/notes-app/app.doql desktop
|
|
138
|
+
|
|
139
|
+
# Generuj i uruchom web
|
|
140
|
+
./doql.sh examples/notes-app/app.doql web
|
|
141
|
+
|
|
142
|
+
# Generuj i uruchom API
|
|
143
|
+
./doql.sh examples/notes-app/app.doql api
|
|
144
|
+
|
|
145
|
+
# Generuj wszystko
|
|
146
|
+
./doql.sh examples/notes-app/app.doql all
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
CLI shell automatycznie:
|
|
150
|
+
- Waliduje specyfikacjÄ
|
|
151
|
+
- Planuje generacjÄ
|
|
152
|
+
- Generuje wszystkie artefakty
|
|
153
|
+
- Uruchamia aplikacjÄ (desktop/web/api)
|
|
154
|
+
|
|
155
|
+
### Publikacja artykuÅów
|
|
156
|
+
|
|
157
|
+
Opcja A ā rÄcznie do WP (najprostsze):
|
|
158
|
+
1. Skopiuj treÅÄ pliku `.md` bez front-matter
|
|
159
|
+
2. Wklej w edytorze WordPress (tryb Markdown jeÅli masz plugin)
|
|
160
|
+
3. TytuÅ, slug, kategorie, tagi z YAML front-matter
|
|
161
|
+
|
|
162
|
+
Opcja B ā `wp-cli`:
|
|
163
|
+
```bash
|
|
164
|
+
for file in articles/*.md; do
|
|
165
|
+
# yq wyciÄ
ga pola z front-matter, sed wycina YAML z body
|
|
166
|
+
title=$(yq -r '.title' "$file")
|
|
167
|
+
slug=$(yq -r '.slug' "$file")
|
|
168
|
+
body=$(sed '/^---$/,/^---$/d' "$file")
|
|
169
|
+
wp post create --post_title="$title" --post_name="$slug" \
|
|
170
|
+
--post_content="$body" --post_status=publish
|
|
171
|
+
done
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Opcja C ā GitHub Action z WP REST API (plik `.github/workflows/publish.yml` ā nie doÅÄ
czony, Åatwo dopisaÄ).
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Architektura ā jak siÄ to wszystko ÅÄ
czy
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
182
|
+
ā doql file (.doql) ā
|
|
183
|
+
ā deklaracja CO ma powstaÄ ā
|
|
184
|
+
āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
185
|
+
ā doql build
|
|
186
|
+
ā¼
|
|
187
|
+
āāāāāāāāāāāāā“āāāāāāāāāāāā¬āāāāāāāāāāāāāāā¬āāāāāāāāāāāāāā
|
|
188
|
+
ā¼ ā¼ ā¼ ā¼
|
|
189
|
+
āāāāāā āāāāāā āāāāāāāāāāāā āāāāāāāāāā āāāāāāāāāāāā
|
|
190
|
+
āAPI ā āWeb ā ā Mobile/ ā āKiosk ā āDocuments ā
|
|
191
|
+
ā ā ā ā ā Desktop ā ā ā āPDF/HTML ā
|
|
192
|
+
āāā¬āāā āāāāāā āāāāāāāāāāāā āāāāāāāāāā āāāāāāāāāāāā
|
|
193
|
+
ā
|
|
194
|
+
ā wywoÅuje scenariusze .oql
|
|
195
|
+
ā¼
|
|
196
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
197
|
+
ā oqlos runtime (interpretuje .oql) ā
|
|
198
|
+
āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāā
|
|
199
|
+
ā Modbus / MQTT / USB / GPIO
|
|
200
|
+
ā¼
|
|
201
|
+
āāāāāāāāāāāāāā
|
|
202
|
+
ā Hardware ā
|
|
203
|
+
āāāāāāāāāāāāāā
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Testy aplikacji (`.iql`) ā testql ā Playwright-alternative z integracjÄ
hardware.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Co dalej
|
|
211
|
+
|
|
212
|
+
**TydzieÅ 1 (najpilniejsze):**
|
|
213
|
+
- NaprawiÄ 5 bugów P0 w www (szczegóÅy w artykule 03)
|
|
214
|
+
- UzupeÅniÄ `en.json` i dodaÄ `de.json` (targi w Niemczech)
|
|
215
|
+
- DokoÅczyÄ parser `.doql` v0.2
|
|
216
|
+
|
|
217
|
+
**TydzieÅ 2-4:**
|
|
218
|
+
- PublikowaÄ artykuÅy 01-06 w sekwencji
|
|
219
|
+
- ZaimplementowaÄ 3 krytyczne wymagania oqlos dla doql
|
|
220
|
+
- Pierwszy pilot klient dla doql (rozmowy wstÄpne toczÄ
siÄ)
|
|
221
|
+
|
|
222
|
+
**MiesiÄ
c 2-3:**
|
|
223
|
+
- Faza 1 doql MVP ā peÅny generator
|
|
224
|
+
- Wdrożenie pilotażowe (lab kalibracyjny w GdaÅsku)
|
|
225
|
+
- Przygotowanie prezentacji na targi w Niemczech
|
|
226
|
+
|
|
227
|
+
**Q3-Q4:**
|
|
228
|
+
- Marketplace szablonów `.doql`
|
|
229
|
+
- Premium plugins (GxP, ISO 17025, Fleet)
|
|
230
|
+
- Walidacja drugiego segmentu ICP (pharma / medtech)
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Licencja
|
|
235
|
+
|
|
236
|
+
- **doql** i wszystkie jego przykÅady ā Apache 2.0
|
|
237
|
+
- **articles** ā CC BY 4.0 (można cytowaÄ i tÅumaczyÄ z atrybucjÄ
)
|
|
238
|
+
|
|
239
|
+
Premium plugins doql (komercyjne) ā osobne warunki, patrz `doql/LICENSE`.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Kontakt
|
|
244
|
+
|
|
245
|
+
- Repo gÅówne: github.com/softreck/oqlos
|
|
246
|
+
- Repo doql: github.com/softreck/doql
|
|
247
|
+
- Email: hello@softreck.dev
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## License
|
|
251
|
+
|
|
252
|
+
Licensed under Apache-2.0.
|
doql-0.0.1/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Rodzina OQL ā paczka kompletna
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## AI Cost Tracking
|
|
5
|
+
|
|
6
|
+
   
|
|
7
|
+
  
|
|
8
|
+
|
|
9
|
+
- š¤ **LLM usage:** $0.7500 (5 commits)
|
|
10
|
+
- š¤ **Human dev:** ~$871 (8.7h @ $100/h, 30min dedup)
|
|
11
|
+
|
|
12
|
+
Generated on 2026-04-17 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**Data wydania:** 2026-04-16
|
|
17
|
+
**ZawartoÅÄ:** repo `doql/` + repo `articles/` + ten README
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Co jest w tej paczce
|
|
22
|
+
|
|
23
|
+
### `doql/` ā nowy projekt: generator deklaratywny
|
|
24
|
+
Kompletny projekt **doql** ā warstwa deklaratywna nad `oqlos`, która z jednego pliku `.doql` generuje aplikacje, dokumenty, kioski, integracje API. Licencja Apache 2.0 (open core).
|
|
25
|
+
|
|
26
|
+
**Kluczowe dokumenty:**
|
|
27
|
+
- `README.md` ā wprowadzenie, quick start, link do wszystkich sekcji
|
|
28
|
+
- `SPEC.md` ā peÅna specyfikacja jÄzyka v0.2 (16 sekcji, wszystkie typy artefaktów)
|
|
29
|
+
- `GLOSSARY.md` ā **jednoznaczna semantyka OQL / DOQL / IQL** (niezbÄdne, jeÅli komunikujesz projekt publicznie)
|
|
30
|
+
- `OQLOS-REQUIREMENTS.md` ā lista zmian w oqlos (8 wymagaÅ: 5 krytycznych, 3 dodane przy v0.2)
|
|
31
|
+
- `ROADMAP.md` ā fazy 0-3 rozwoju, ~8 tygodni do produkcji
|
|
32
|
+
- `CHANGELOG.md` ā historia wersji v0.1 i v0.2
|
|
33
|
+
|
|
34
|
+
**PiÄÄ przykÅadów (gotowych `.doql`):**
|
|
35
|
+
- `examples/asset-management/` ā klon DrƤgerware, peÅen SaaS dla BHP
|
|
36
|
+
- `examples/calibration-lab/` ā laboratorium ISO 17025 z 4-eyes i WORM
|
|
37
|
+
- `examples/iot-fleet/` ā flota RPi z OTA canary i Prometheus
|
|
38
|
+
- `examples/document-generator/` ā **nowy w v0.2** ā tylko generator PDF bez backendu
|
|
39
|
+
- `examples/kiosk-station/` ā **nowy w v0.2** ā stanowisko operatora na tablecie
|
|
40
|
+
|
|
41
|
+
**Infrastruktura projektu:**
|
|
42
|
+
- `pyproject.toml` ā pakowanie Python
|
|
43
|
+
- `doql/cli.py` ā szkielet CLI z komendami init/validate/plan/build/run/deploy/sync/export/generate/render/query/kiosk/quadlet/docs
|
|
44
|
+
- `doql/scaffolds/minimal/` ā szablon dla `doql init`
|
|
45
|
+
- `LICENSE` (Apache 2.0)
|
|
46
|
+
- `.gitignore`
|
|
47
|
+
|
|
48
|
+
### `articles/` ā artykuÅy WordPress
|
|
49
|
+
SzeÅÄ artykuÅów markdown z YAML front-matter gotowych do publikacji (kompatybilne z `wp-cli` i WordPress REST API). Każdy artykuÅ to jeden projekt / jedna nowoÅÄ.
|
|
50
|
+
|
|
51
|
+
**Lista:**
|
|
52
|
+
1. `01-oqlos-status-2026-q2.md` ā status oqlos po refaktorze (CCĢ 3,7ā3,2)
|
|
53
|
+
2. `02-testql-status-2026-q2.md` ā TestQL, porównanie z Playwright
|
|
54
|
+
3. `03-saas-www-status-2026-q2.md` ā SaaS oqlos.com, 5 bugów P0, diagnoza landingu
|
|
55
|
+
4. `04-doql-ogloszenie.md` ā ogÅoszenie doql v0.1 (SaaS generator)
|
|
56
|
+
5. `05-wizja-ekosystemu-oqlos.md` ā wizja caÅej rodziny (4 warstwy, strategia open-core)
|
|
57
|
+
6. `06-doql-v02-dokumenty-kiosk.md` ā doql v0.2 (dokumenty, kiosk, semantyka)
|
|
58
|
+
|
|
59
|
+
Każdy 800-1800 sÅów, po polsku, gotowy do kopiuj-wklej do WordPressa.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Jak to odpaliÄ
|
|
64
|
+
|
|
65
|
+
### Instalacja doql (po sklonowaniu do repo)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cd doql/
|
|
69
|
+
pip install -e .
|
|
70
|
+
doql --version
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Szybki test ā generator PDF
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
doql init --template document-generator my-lab
|
|
77
|
+
cd my-lab
|
|
78
|
+
cp .env.example .env
|
|
79
|
+
doql validate
|
|
80
|
+
doql plan
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Szybki start z CLI shell
|
|
84
|
+
|
|
85
|
+
Użyj skryptu `doql.sh` do generowania i uruchamiania aplikacji jednÄ
komendÄ
:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Generuj i uruchom desktop app
|
|
89
|
+
./doql.sh examples/notes-app/app.doql desktop
|
|
90
|
+
|
|
91
|
+
# Generuj i uruchom web
|
|
92
|
+
./doql.sh examples/notes-app/app.doql web
|
|
93
|
+
|
|
94
|
+
# Generuj i uruchom API
|
|
95
|
+
./doql.sh examples/notes-app/app.doql api
|
|
96
|
+
|
|
97
|
+
# Generuj wszystko
|
|
98
|
+
./doql.sh examples/notes-app/app.doql all
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
CLI shell automatycznie:
|
|
102
|
+
- Waliduje specyfikacjÄ
|
|
103
|
+
- Planuje generacjÄ
|
|
104
|
+
- Generuje wszystkie artefakty
|
|
105
|
+
- Uruchamia aplikacjÄ (desktop/web/api)
|
|
106
|
+
|
|
107
|
+
### Publikacja artykuÅów
|
|
108
|
+
|
|
109
|
+
Opcja A ā rÄcznie do WP (najprostsze):
|
|
110
|
+
1. Skopiuj treÅÄ pliku `.md` bez front-matter
|
|
111
|
+
2. Wklej w edytorze WordPress (tryb Markdown jeÅli masz plugin)
|
|
112
|
+
3. TytuÅ, slug, kategorie, tagi z YAML front-matter
|
|
113
|
+
|
|
114
|
+
Opcja B ā `wp-cli`:
|
|
115
|
+
```bash
|
|
116
|
+
for file in articles/*.md; do
|
|
117
|
+
# yq wyciÄ
ga pola z front-matter, sed wycina YAML z body
|
|
118
|
+
title=$(yq -r '.title' "$file")
|
|
119
|
+
slug=$(yq -r '.slug' "$file")
|
|
120
|
+
body=$(sed '/^---$/,/^---$/d' "$file")
|
|
121
|
+
wp post create --post_title="$title" --post_name="$slug" \
|
|
122
|
+
--post_content="$body" --post_status=publish
|
|
123
|
+
done
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Opcja C ā GitHub Action z WP REST API (plik `.github/workflows/publish.yml` ā nie doÅÄ
czony, Åatwo dopisaÄ).
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Architektura ā jak siÄ to wszystko ÅÄ
czy
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
134
|
+
ā doql file (.doql) ā
|
|
135
|
+
ā deklaracja CO ma powstaÄ ā
|
|
136
|
+
āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
137
|
+
ā doql build
|
|
138
|
+
ā¼
|
|
139
|
+
āāāāāāāāāāāāā“āāāāāāāāāāāā¬āāāāāāāāāāāāāāā¬āāāāāāāāāāāāāā
|
|
140
|
+
ā¼ ā¼ ā¼ ā¼
|
|
141
|
+
āāāāāā āāāāāā āāāāāāāāāāāā āāāāāāāāāā āāāāāāāāāāāā
|
|
142
|
+
āAPI ā āWeb ā ā Mobile/ ā āKiosk ā āDocuments ā
|
|
143
|
+
ā ā ā ā ā Desktop ā ā ā āPDF/HTML ā
|
|
144
|
+
āāā¬āāā āāāāāā āāāāāāāāāāāā āāāāāāāāāā āāāāāāāāāāāā
|
|
145
|
+
ā
|
|
146
|
+
ā wywoÅuje scenariusze .oql
|
|
147
|
+
ā¼
|
|
148
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
149
|
+
ā oqlos runtime (interpretuje .oql) ā
|
|
150
|
+
āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāā
|
|
151
|
+
ā Modbus / MQTT / USB / GPIO
|
|
152
|
+
ā¼
|
|
153
|
+
āāāāāāāāāāāāāā
|
|
154
|
+
ā Hardware ā
|
|
155
|
+
āāāāāāāāāāāāāā
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Testy aplikacji (`.iql`) ā testql ā Playwright-alternative z integracjÄ
hardware.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Co dalej
|
|
163
|
+
|
|
164
|
+
**TydzieÅ 1 (najpilniejsze):**
|
|
165
|
+
- NaprawiÄ 5 bugów P0 w www (szczegóÅy w artykule 03)
|
|
166
|
+
- UzupeÅniÄ `en.json` i dodaÄ `de.json` (targi w Niemczech)
|
|
167
|
+
- DokoÅczyÄ parser `.doql` v0.2
|
|
168
|
+
|
|
169
|
+
**TydzieÅ 2-4:**
|
|
170
|
+
- PublikowaÄ artykuÅy 01-06 w sekwencji
|
|
171
|
+
- ZaimplementowaÄ 3 krytyczne wymagania oqlos dla doql
|
|
172
|
+
- Pierwszy pilot klient dla doql (rozmowy wstÄpne toczÄ
siÄ)
|
|
173
|
+
|
|
174
|
+
**MiesiÄ
c 2-3:**
|
|
175
|
+
- Faza 1 doql MVP ā peÅny generator
|
|
176
|
+
- Wdrożenie pilotażowe (lab kalibracyjny w GdaÅsku)
|
|
177
|
+
- Przygotowanie prezentacji na targi w Niemczech
|
|
178
|
+
|
|
179
|
+
**Q3-Q4:**
|
|
180
|
+
- Marketplace szablonów `.doql`
|
|
181
|
+
- Premium plugins (GxP, ISO 17025, Fleet)
|
|
182
|
+
- Walidacja drugiego segmentu ICP (pharma / medtech)
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Licencja
|
|
187
|
+
|
|
188
|
+
- **doql** i wszystkie jego przykÅady ā Apache 2.0
|
|
189
|
+
- **articles** ā CC BY 4.0 (można cytowaÄ i tÅumaczyÄ z atrybucjÄ
)
|
|
190
|
+
|
|
191
|
+
Premium plugins doql (komercyjne) ā osobne warunki, patrz `doql/LICENSE`.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Kontakt
|
|
196
|
+
|
|
197
|
+
- Repo gÅówne: github.com/softreck/oqlos
|
|
198
|
+
- Repo doql: github.com/softreck/doql
|
|
199
|
+
- Email: hello@softreck.dev
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## License
|
|
203
|
+
|
|
204
|
+
Licensed under Apache-2.0.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""doql CLI package ā modularized command-line interface."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from .context import BuildContext, build_context, load_spec, scaffold_from_template, estimate_file_count
|
|
5
|
+
from .lockfile import read_lockfile, write_lockfile, diff_sections, spec_section_hashes
|
|
6
|
+
from .main import main
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"BuildContext",
|
|
10
|
+
"build_context",
|
|
11
|
+
"load_spec",
|
|
12
|
+
"scaffold_from_template",
|
|
13
|
+
"estimate_file_count",
|
|
14
|
+
"read_lockfile",
|
|
15
|
+
"write_lockfile",
|
|
16
|
+
"diff_sections",
|
|
17
|
+
"spec_section_hashes",
|
|
18
|
+
"main",
|
|
19
|
+
]
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"""Full build logic for the build command.
|
|
2
|
+
|
|
3
|
+
This module handles complete rebuilds by running all applicable generators.
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
import argparse
|
|
9
|
+
|
|
10
|
+
from .. import parser as doql_parser
|
|
11
|
+
from ..generators import api_gen, web_gen, mobile_gen, desktop_gen, infra_gen, document_gen, report_gen, i18n_gen, integrations_gen, workflow_gen, ci_gen
|
|
12
|
+
from .. import plugins as _plugins
|
|
13
|
+
from .context import BuildContext, load_spec
|
|
14
|
+
from .lockfile import write_lockfile
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def should_generate_interface(name: str, spec) -> bool:
|
|
18
|
+
"""Check if interface should be generated.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
name: Interface name (api, web, mobile, desktop, infra)
|
|
22
|
+
spec: Parsed DoqlSpec
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
True if interface should be generated
|
|
26
|
+
"""
|
|
27
|
+
if name == "infra":
|
|
28
|
+
return True
|
|
29
|
+
return any(i.name == name for i in spec.interfaces)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def run_core_generators(spec, env_vars, ctx: BuildContext) -> None:
|
|
33
|
+
"""Run core interface generators (api, web, mobile, desktop, infra)."""
|
|
34
|
+
generators = {
|
|
35
|
+
"api": api_gen.generate,
|
|
36
|
+
"web": web_gen.generate,
|
|
37
|
+
"mobile": mobile_gen.generate,
|
|
38
|
+
"desktop": desktop_gen.generate,
|
|
39
|
+
"infra": infra_gen.generate,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
for name, fn in generators.items():
|
|
43
|
+
if not should_generate_interface(name, spec):
|
|
44
|
+
continue
|
|
45
|
+
|
|
46
|
+
print(f"š Generating {name}...")
|
|
47
|
+
if name == "infra":
|
|
48
|
+
target_dir = ctx.build_dir / name
|
|
49
|
+
else:
|
|
50
|
+
target_dir = ctx.build_dir / name
|
|
51
|
+
target_dir.mkdir(parents=True, exist_ok=True)
|
|
52
|
+
fn(spec, env_vars, target_dir)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def run_document_generators(spec, env_vars, ctx: BuildContext) -> None:
|
|
56
|
+
"""Run document generators if documents are defined."""
|
|
57
|
+
if not spec.documents:
|
|
58
|
+
return
|
|
59
|
+
|
|
60
|
+
print("š Generating documents...")
|
|
61
|
+
doc_dir = ctx.build_dir / "documents"
|
|
62
|
+
doc_dir.mkdir(parents=True, exist_ok=True)
|
|
63
|
+
document_gen.generate(spec, env_vars, doc_dir, project_root=ctx.root)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def run_report_generators(spec, env_vars, ctx: BuildContext) -> None:
|
|
67
|
+
"""Run report generators if reports are defined."""
|
|
68
|
+
if not spec.reports:
|
|
69
|
+
return
|
|
70
|
+
|
|
71
|
+
print("š Generating reports...")
|
|
72
|
+
rpt_dir = ctx.build_dir / "reports"
|
|
73
|
+
rpt_dir.mkdir(parents=True, exist_ok=True)
|
|
74
|
+
report_gen.generate(spec, env_vars, rpt_dir)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def run_i18n_generators(spec, env_vars, ctx: BuildContext) -> None:
|
|
78
|
+
"""Run i18n generators if languages are defined."""
|
|
79
|
+
if not spec.languages:
|
|
80
|
+
return
|
|
81
|
+
|
|
82
|
+
print("š Generating i18n...")
|
|
83
|
+
i18n_dir = ctx.build_dir / "i18n"
|
|
84
|
+
i18n_dir.mkdir(parents=True, exist_ok=True)
|
|
85
|
+
i18n_gen.generate(spec, env_vars, i18n_dir)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def run_integration_generators(spec, env_vars, ctx: BuildContext) -> None:
|
|
89
|
+
"""Run integration generators if integrations are defined."""
|
|
90
|
+
if not (spec.integrations or spec.api_clients or spec.webhooks):
|
|
91
|
+
return
|
|
92
|
+
|
|
93
|
+
print("š Generating integrations...")
|
|
94
|
+
svc_dir = ctx.build_dir / "api" / "services"
|
|
95
|
+
svc_dir.mkdir(parents=True, exist_ok=True)
|
|
96
|
+
integrations_gen.generate(spec, env_vars, svc_dir)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def run_workflow_generators(spec, env_vars, ctx: BuildContext) -> None:
|
|
100
|
+
"""Run workflow generators if workflows are defined."""
|
|
101
|
+
if not spec.workflows:
|
|
102
|
+
return
|
|
103
|
+
|
|
104
|
+
print("š Generating workflows...")
|
|
105
|
+
wf_dir = ctx.build_dir / "api" / "workflows"
|
|
106
|
+
wf_dir.mkdir(parents=True, exist_ok=True)
|
|
107
|
+
workflow_gen.generate(spec, env_vars, wf_dir)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def run_ci_generator(spec, env_vars, ctx: BuildContext) -> None:
|
|
111
|
+
"""Run CI/CD generator (always into project root)."""
|
|
112
|
+
print("š Generating CI...")
|
|
113
|
+
ci_gen.generate(spec, env_vars, ctx.root)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def run_plugins(spec, env_vars, ctx: BuildContext) -> None:
|
|
117
|
+
"""Run plugin generators."""
|
|
118
|
+
_plugins.run_plugins(spec, env_vars, ctx.build_dir, ctx.root)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def cmd_build(args: argparse.Namespace) -> int:
|
|
122
|
+
"""Generate all code for the project.
|
|
123
|
+
|
|
124
|
+
This command runs all applicable generators to create a complete build.
|
|
125
|
+
Validation is performed first unless --force is specified.
|
|
126
|
+
"""
|
|
127
|
+
ctx = BuildContext(
|
|
128
|
+
root=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve(),
|
|
129
|
+
doql_file=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve() / (getattr(args, "file", None) or "app.doql"),
|
|
130
|
+
env_file=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve() / ".env",
|
|
131
|
+
build_dir=__import__('pathlib').Path(getattr(args, "dir", None) or ".").resolve() / "build",
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
spec, env_vars = load_spec(ctx)
|
|
135
|
+
|
|
136
|
+
# Validate unless --force
|
|
137
|
+
issues = doql_parser.validate(spec, env_vars)
|
|
138
|
+
errors = [i for i in issues if i.severity == "error"]
|
|
139
|
+
if errors and not getattr(args, "force", False):
|
|
140
|
+
print("ā Validation errors (use --force to ignore):", file=sys.stderr)
|
|
141
|
+
for e in errors:
|
|
142
|
+
print(f" {e.path}: {e.message}", file=sys.stderr)
|
|
143
|
+
return 1
|
|
144
|
+
|
|
145
|
+
ctx.build_dir.mkdir(parents=True, exist_ok=True)
|
|
146
|
+
|
|
147
|
+
# Run all generators in order
|
|
148
|
+
run_core_generators(spec, env_vars, ctx)
|
|
149
|
+
run_document_generators(spec, env_vars, ctx)
|
|
150
|
+
run_report_generators(spec, env_vars, ctx)
|
|
151
|
+
run_i18n_generators(spec, env_vars, ctx)
|
|
152
|
+
run_integration_generators(spec, env_vars, ctx)
|
|
153
|
+
run_workflow_generators(spec, env_vars, ctx)
|
|
154
|
+
run_ci_generator(spec, env_vars, ctx)
|
|
155
|
+
run_plugins(spec, env_vars, ctx)
|
|
156
|
+
|
|
157
|
+
write_lockfile(spec, ctx)
|
|
158
|
+
print(f"\nā
Build complete ā see {ctx.build_dir}/")
|
|
159
|
+
return 0
|