querycraft 1.7.5__tar.gz → 2.2.2__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.
- {querycraft-1.7.5 → querycraft-2.2.2}/MANIFEST.in +1 -2
- {querycraft-1.7.5/querycraft.egg-info → querycraft-2.2.2}/PKG-INFO +60 -6
- {querycraft-1.7.5 → querycraft-2.2.2}/README.md +54 -4
- querycraft-2.2.2/querycraft/LLM.py +422 -0
- querycraft-2.2.2/querycraft/LLM_providers.py +1278 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/LRS.py +0 -1
- querycraft-2.2.2/querycraft/PlantUML.py +213 -0
- querycraft-2.2.2/querycraft/SQLException.py +79 -0
- querycraft-2.2.2/querycraft/__init__.py +2 -0
- querycraft-2.2.2/querycraft/cachemanager.py +132 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/config/codemata.json +2 -2
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/config/config-sbs-std.cfg +6 -2
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/config/config-sbs.cfg +5 -5
- querycraft-2.2.2/querycraft/configmanager.py +589 -0
- querycraft-2.2.2/querycraft/database/MYSQL.py +104 -0
- querycraft-2.2.2/querycraft/database/PGSQL.py +104 -0
- querycraft-2.2.2/querycraft/database/SQLITE.py +130 -0
- querycraft-2.2.2/querycraft/database/__init__.py +87 -0
- querycraft-2.2.2/querycraft/database/base.py +309 -0
- querycraft-2.2.2/querycraft/exceptions/OperationNotSupportedException.py +12 -0
- querycraft-2.2.2/querycraft/exceptions/__init__.py +5 -0
- querycraft-2.2.2/querycraft/exercicemanager.py +346 -0
- querycraft-2.2.2/querycraft/exos/Didapro11.json +71 -0
- querycraft-2.2.2/querycraft/exos/OENU2026.json +22 -0
- querycraft-2.2.2/querycraft/exos/ex1.json +22 -0
- querycraft-2.2.2/querycraft/exos/exos1.json +29 -0
- querycraft-2.2.2/querycraft/output/__init__.py +38 -0
- querycraft-2.2.2/querycraft/output/cli/CliOutputFactory.py +191 -0
- querycraft-2.2.2/querycraft/output/cli/__init__.py +11 -0
- querycraft-2.2.2/querycraft/output/cli/outputBuilder/CliCodeBuilder.py +75 -0
- querycraft-2.2.2/querycraft/output/cli/outputBuilder/CliListBuilder.py +19 -0
- querycraft-2.2.2/querycraft/output/cli/outputBuilder/CliParagraphBuilder.py +103 -0
- querycraft-2.2.2/querycraft/output/cli/outputBuilder/CliTableBuilder.py +225 -0
- querycraft-2.2.2/querycraft/output/cli/outputBuilder/CliTextBuilder.py +39 -0
- querycraft-2.2.2/querycraft/output/cli/outputBuilder/CliTitleBuilder.py +71 -0
- querycraft-2.2.2/querycraft/output/cli/outputBuilder/__init__.py +22 -0
- querycraft-2.2.2/querycraft/output/commons/OutputBuilder.py +65 -0
- querycraft-2.2.2/querycraft/output/commons/OutputCodeFactory.py +85 -0
- querycraft-2.2.2/querycraft/output/commons/OutputFactory.py +120 -0
- querycraft-2.2.2/querycraft/output/commons/OutputListBuilder.py +45 -0
- querycraft-2.2.2/querycraft/output/commons/OutputParagraphFactory.py +40 -0
- querycraft-2.2.2/querycraft/output/commons/OutputTableBuilder.py +205 -0
- querycraft-2.2.2/querycraft/output/commons/SimpleOutputBuilder.py +25 -0
- querycraft-2.2.2/querycraft/output/commons/__init__.py +22 -0
- querycraft-2.2.2/querycraft/output/commons/utils.py +12 -0
- querycraft-2.2.2/querycraft/output/html/HtmlOutputFactory.py +113 -0
- querycraft-2.2.2/querycraft/output/html/__init__.py +11 -0
- querycraft-2.2.2/querycraft/output/html/outputBuilder/HTMLCodeBuilder.py +67 -0
- querycraft-2.2.2/querycraft/output/html/outputBuilder/HTMLListBuilder.py +18 -0
- querycraft-2.2.2/querycraft/output/html/outputBuilder/HTMLParagraphBuilder.py +68 -0
- querycraft-2.2.2/querycraft/output/html/outputBuilder/HTMLTableBuilder.py +153 -0
- querycraft-2.2.2/querycraft/output/html/outputBuilder/HTMLTextBuilder.py +19 -0
- querycraft-2.2.2/querycraft/output/html/outputBuilder/HTMLTitleBuilder.py +25 -0
- querycraft-2.2.2/querycraft/output/html/outputBuilder/__init__.py +22 -0
- querycraft-2.2.2/querycraft/output/markdown/MarkdownOutputFactory.py +186 -0
- querycraft-2.2.2/querycraft/output/markdown/__init__.py +11 -0
- querycraft-2.2.2/querycraft/output/markdown/outputBuilder/MarkdownCodeBuilder.py +62 -0
- querycraft-2.2.2/querycraft/output/markdown/outputBuilder/MarkdownListBuilder.py +19 -0
- querycraft-2.2.2/querycraft/output/markdown/outputBuilder/MarkdownParagraphBuilder.py +102 -0
- querycraft-2.2.2/querycraft/output/markdown/outputBuilder/MarkdownTableBuilder.py +129 -0
- querycraft-2.2.2/querycraft/output/markdown/outputBuilder/MarkdownTextBuilder.py +37 -0
- querycraft-2.2.2/querycraft/output/markdown/outputBuilder/MarkdownTitleBuilder.py +56 -0
- querycraft-2.2.2/querycraft/output/markdown/outputBuilder/__init__.py +22 -0
- querycraft-2.2.2/querycraft/paths.py +139 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/security.py +1 -1
- querycraft-2.2.2/querycraft/sql/SQLContext.py +61 -0
- querycraft-2.2.2/querycraft/sql/SQLExecutionService.py +341 -0
- querycraft-2.2.2/querycraft/sql/SQLNormalizationService.py +176 -0
- querycraft-2.2.2/querycraft/sql/SQLQueryService.py +429 -0
- querycraft-2.2.2/querycraft/sql/SQLStepByStepService.py +667 -0
- querycraft-2.2.2/querycraft/sql/__init__.py +15 -0
- querycraft-2.2.2/querycraft/sqlsbs.py +596 -0
- querycraft-2.2.2/querycraft/static/qc-0973b307dafc25e2b7a5f12be0f68d1786cedbf5ad0371c3f3d5f051fc00b626.puml +45 -0
- querycraft-2.2.2/querycraft/static/qc-18be2287f8920a2975f21fe98022750b27c222b85ac8d6de95a686835f147e9e.puml +49 -0
- querycraft-2.2.2/querycraft/static/qc-3d819e30e542ba328af562eb160d23140f2193d92354b0897289767e1c041e96.puml +40 -0
- querycraft-2.2.2/querycraft/static/qc-54c49d1ad35ea5cf736dfd64c3ed9c42ea90d7b82a5f3783f73f46de99bf0987.puml +29 -0
- querycraft-2.2.2/querycraft/static/qc-5b552498722250bebfe20f44257243a9f9e08d2f3865955c60f4469ff1c12fea.puml +39 -0
- querycraft-2.2.2/querycraft/static/qc-a70191192c2a1640bfec39afd281537d4ede20bb5c9e87ccb32b883e1e58bcab.puml +62 -0
- querycraft-2.2.2/querycraft/static/qc-d1881606867eea2d5f0cf600fa342f8e04e8d5cc388946a09cffb855052b22ad.puml +47 -0
- querycraft-2.2.2/querycraft/static/qc-eb48d0ac9258e52c7715e6313b6da064ed9ab2efab6ba7b3225b9568a3c2545e.puml +41 -0
- querycraft-2.2.2/querycraft/templates/admin_login.html +32 -0
- querycraft-2.2.2/querycraft/templates/base.html +58 -0
- querycraft-2.2.2/querycraft/templates/config.html +445 -0
- querycraft-2.2.2/querycraft/templates/correction_prompt.md +36 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/templates/credits.html +51 -267
- querycraft-2.2.2/querycraft/templates/database_prompt.md +73 -0
- querycraft-1.7.5/querycraft/templates/correction_prompt.md → querycraft-2.2.2/querycraft/templates/didactique.md +1 -33
- querycraft-2.2.2/querycraft/templates/didapro11.html +333 -0
- querycraft-2.2.2/querycraft/templates/erreur_prompt.md +27 -0
- querycraft-2.2.2/querycraft/templates/exercices.html +107 -0
- querycraft-2.2.2/querycraft/templates/index.html +131 -0
- querycraft-2.2.2/querycraft/templates/instance_error.html +61 -0
- querycraft-2.2.2/querycraft/templates/requete_prompt.md +14 -0
- querycraft-2.2.2/querycraft/templates/systeme_prompt.md +36 -0
- querycraft-2.2.2/querycraft/templates/systeme_prompt_factuel.md +32 -0
- querycraft-2.2.2/querycraft/templates/systeme_prompt_valideur.md +28 -0
- querycraft-2.2.2/querycraft/templates/valideur_prompt.md +126 -0
- querycraft-2.2.2/querycraft/tenantadmin.py +395 -0
- querycraft-2.2.2/querycraft/tenantlogging.py +58 -0
- querycraft-2.2.2/querycraft/tenantregistry.py +126 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/tools.py +329 -928
- querycraft-2.2.2/querycraft/web_sbs.py +1320 -0
- {querycraft-1.7.5 → querycraft-2.2.2/querycraft.egg-info}/PKG-INFO +60 -6
- querycraft-2.2.2/querycraft.egg-info/SOURCES.txt +128 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft.egg-info/entry_points.txt +1 -1
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft.egg-info/requires.txt +5 -1
- querycraft-2.2.2/setup.py +105 -0
- querycraft-2.2.2/test/testAnthropic.py +298 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/test/testLRS.py +0 -1
- {querycraft-1.7.5 → querycraft-2.2.2}/test/testParse.py +2 -2
- querycraft-2.2.2/test/test_exercicemanager.py +166 -0
- querycraft-2.2.2/test/test_litellm_provider.py +212 -0
- querycraft-1.7.5/querycraft/Database.py +0 -546
- querycraft-1.7.5/querycraft/LLM.py +0 -1469
- querycraft-1.7.5/querycraft/PlantUML.py +0 -88
- querycraft-1.7.5/querycraft/SQL.py +0 -1266
- querycraft-1.7.5/querycraft/SQLException.py +0 -77
- querycraft-1.7.5/querycraft/__init__.py +0 -2
- querycraft-1.7.5/querycraft/cookies/readme.txt +0 -1
- querycraft-1.7.5/querycraft/exos/Didapro11.json +0 -65
- querycraft-1.7.5/querycraft/exos/OENU2026.json +0 -16
- querycraft-1.7.5/querycraft/exos/ex1.json +0 -16
- querycraft-1.7.5/querycraft/exos/exos1.json +0 -23
- querycraft-1.7.5/querycraft/models/readme.txt +0 -1
- querycraft-1.7.5/querycraft/sqlsbs.py +0 -1013
- querycraft-1.7.5/querycraft/templates/config.html +0 -938
- querycraft-1.7.5/querycraft/templates/correction_prompt-old.md +0 -21
- querycraft-1.7.5/querycraft/templates/database_prompt.md +0 -4
- querycraft-1.7.5/querycraft/templates/didapro11.html +0 -627
- querycraft-1.7.5/querycraft/templates/erreur_prompt.md +0 -22
- querycraft-1.7.5/querycraft/templates/exercices.html +0 -753
- querycraft-1.7.5/querycraft/templates/index.html +0 -987
- querycraft-1.7.5/querycraft/templates/requete_prompt.md +0 -9
- querycraft-1.7.5/querycraft/templates/systeme_prompt.md +0 -34
- querycraft-1.7.5/querycraft/web_sbs.py +0 -1113
- querycraft-1.7.5/querycraft.egg-info/SOURCES.txt +0 -58
- querycraft-1.7.5/setup.py +0 -64
- querycraft-1.7.5/test/test_SQL.py +0 -37
- {querycraft-1.7.5 → querycraft-2.2.2}/AUTHORS +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/LICENSE +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/cache/readme.txt +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/cinema.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/cours.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/em.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/entreprise.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/librairie.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/lutins.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/robots.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/data/vols.db +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/exos/readme.txt +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/logger.py +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft/logs/readme.txt +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft.egg-info/dependency_links.txt +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/querycraft.egg-info/top_level.txt +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/setup.cfg +0 -0
- {querycraft-1.7.5 → querycraft-2.2.2}/test/testOllama.py +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
include querycraft/config
|
|
2
2
|
include querycraft/config/config-sbs.cfg
|
|
3
3
|
include querycraft/data
|
|
4
|
-
include querycraft/cookies
|
|
5
|
-
exclude querycraft/cookies/*.json
|
|
6
4
|
include querycraft/static
|
|
7
5
|
include querycraft/templates
|
|
8
6
|
exclude querycraft/logs/*.log
|
|
9
7
|
include querycraft/logs
|
|
10
8
|
include querycraft/cache
|
|
11
9
|
exclude querycraft/cache/*.json
|
|
10
|
+
recursive-exclude querycraft/lib *
|
|
12
11
|
exclude .DS_Store
|
|
13
12
|
exclude __pycache__
|
|
14
13
|
exclude *.pyc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: querycraft
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: Provide usefully SQL classes and functions to execute SQL queries step by step
|
|
5
5
|
Home-page: https://gitlab.univ-nantes.fr/ls2n-didactique/querycraft
|
|
6
6
|
Author: Emmanuel Desmontils
|
|
@@ -19,6 +19,8 @@ License-File: LICENSE
|
|
|
19
19
|
License-File: AUTHORS
|
|
20
20
|
Requires-Dist: argparse>=1.4.0
|
|
21
21
|
Requires-Dist: openai>=2.9.0
|
|
22
|
+
Requires-Dist: anthropic>=0.84.0
|
|
23
|
+
Requires-Dist: litellm>=1.0.0
|
|
22
24
|
Requires-Dist: tincan>=1.0.0
|
|
23
25
|
Requires-Dist: SQLAlchemy>=2.0.40
|
|
24
26
|
Requires-Dist: jinja2>=3.1.6
|
|
@@ -27,13 +29,15 @@ Requires-Dist: lmstudio>=1.5.0
|
|
|
27
29
|
Requires-Dist: psycopg2-binary==2.9.10
|
|
28
30
|
Requires-Dist: plantuml>=0.3.0
|
|
29
31
|
Requires-Dist: ollama>=0.4.7
|
|
30
|
-
Requires-Dist: keyboard>=0.13.5
|
|
31
32
|
Requires-Dist: google-genai>=1.61.0
|
|
32
33
|
Requires-Dist: markdown>=3.5.0
|
|
34
|
+
Requires-Dist: pyopenssl>=26.0.0
|
|
33
35
|
Requires-Dist: sqlglot==25.33.0
|
|
34
36
|
Requires-Dist: colorama>=0.4.6
|
|
35
37
|
Requires-Dist: flask>=3.0.0
|
|
36
38
|
Requires-Dist: gunicorn>=21.2.0
|
|
39
|
+
Requires-Dist: six>=1.17.0
|
|
40
|
+
Requires-Dist: typing_extensions>=4.5.0
|
|
37
41
|
Dynamic: author
|
|
38
42
|
Dynamic: author-email
|
|
39
43
|
Dynamic: classifier
|
|
@@ -52,7 +56,7 @@ Dynamic: summary
|
|
|
52
56
|
|
|
53
57
|
# QueryCraft
|
|
54
58
|
|
|
55
|
-
**Version actuelle :
|
|
59
|
+
**Version actuelle : 2.1.0** (juillet 2026) — [Voir le CHANGELOG](CHANGELOG.md)
|
|
56
60
|
|
|
57
61
|
[TOC]
|
|
58
62
|
|
|
@@ -74,6 +78,7 @@ Elle propose aussi des applications pour décomposer l'exécution d'une requête
|
|
|
74
78
|
- **Interface en ligne de commande** : Utilisez l'application en ligne de commande pour analyser et décomposer vos requêtes SQL.
|
|
75
79
|
- **Aide de l'IA** : Comprenez vos erreurs SQL grâce à l'aide de l'IA.
|
|
76
80
|
- **Formats d'affichage multiples** : Exportez les résultats en format texte, HTML ou Markdown (nouveau en v0.2.1).
|
|
81
|
+
- **Mode multi-tenant** : Sur l'interface web, chaque enseignant dispose d'une instance isolée accessible via `/<code>/` (configuration, bases, exercices, cache et logs propres). Voir [docs/INSTALLATION.md](docs/INSTALLATION.md) et [docs/ARCHITECTURE-multi-tenant.md](docs/ARCHITECTURE-multi-tenant.md).
|
|
77
82
|
|
|
78
83
|
## Limitations
|
|
79
84
|
|
|
@@ -93,12 +98,20 @@ L'outil a été testé sur Apple Mac Book Pro / MacOS Tahoe 26.2 (python 3.11.4,
|
|
|
93
98
|
|
|
94
99
|
## Installation
|
|
95
100
|
|
|
101
|
+
> Pour une installation détaillée (environnement virtuel, clés IA, déploiement,
|
|
102
|
+
> mode multi-tenant), voir **[docs/INSTALLATION.md](docs/INSTALLATION.md)**.
|
|
103
|
+
|
|
104
|
+
**Python 3.11 requis** (`psycopg2-binary==2.9.10` est incompatible avec Python 3.12+).
|
|
105
|
+
|
|
96
106
|
### Après téléchargement depuis Gitlab :
|
|
97
107
|
|
|
98
108
|
```shell
|
|
99
109
|
git clone https://gitlab.univ-nantes.fr/ls2n-didactique/querycraft.git
|
|
100
110
|
cd querycraft
|
|
111
|
+
python3.11 -m venv .venv
|
|
112
|
+
source .venv/bin/activate
|
|
101
113
|
pip install -e .
|
|
114
|
+
pip install -r requirements.txt
|
|
102
115
|
```
|
|
103
116
|
|
|
104
117
|
|
|
@@ -116,7 +129,7 @@ pip install --upgrade querycraft
|
|
|
116
129
|
|
|
117
130
|
## Usage
|
|
118
131
|
|
|
119
|
-
**Pour voir les commandes et comprendre l'utilisation avec exemples voir : [HOW_TO_USE](HOW_TO_USE.md)**
|
|
132
|
+
**Pour voir les commandes et comprendre l'utilisation avec exemples voir : [HOW_TO_USE](docs/HOW_TO_USE.md)**
|
|
120
133
|
La requête devra être écrite entre double quotes " ".
|
|
121
134
|
|
|
122
135
|
### Interface Web (Nouveau !)
|
|
@@ -128,10 +141,24 @@ Depuis la version 0.2.1, QueryCraft propose une interface web moderne pour exéc
|
|
|
128
141
|
web-sbs
|
|
129
142
|
|
|
130
143
|
# Accéder via le navigateur
|
|
131
|
-
http://127.0.0.1:
|
|
144
|
+
http://127.0.0.1:8080
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Voir la documentation complète : [WEB_INTERFACE.md](docs/WEB_INTERFACE.md)**
|
|
148
|
+
|
|
149
|
+
#### Mode multi-tenant (une instance par enseignant)
|
|
150
|
+
|
|
151
|
+
L'interface web peut servir une instance isolée par enseignant, via un code à 6
|
|
152
|
+
chiffres dans l'URL (`/<code>/`), la racine `/` restant la démonstration :
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
export QC_INSTANCES_DIR=/srv/querycraft/instances
|
|
156
|
+
tenant-sbs --init-demo # démonstration servie à /
|
|
157
|
+
tenant-sbs --create 123456 # instance enseignant servie à /123456/
|
|
158
|
+
web-sbs
|
|
132
159
|
```
|
|
133
160
|
|
|
134
|
-
**Voir
|
|
161
|
+
**Voir : [docs/INSTALLATION.md](docs/INSTALLATION.md) et [docs/ARCHITECTURE-multi-tenant.md](docs/ARCHITECTURE-multi-tenant.md)**
|
|
135
162
|
|
|
136
163
|
Fonctionnalités :
|
|
137
164
|
- 🌐 Interface web intuitive et responsive
|
|
@@ -373,6 +400,24 @@ Les services IA générative disponibles sont :
|
|
|
373
400
|
- Configuration : `IA.service=generic IA.modele=gpt-3.5-turbo IA.url=https://xxxxx IA.api-key=xxxxxxx`
|
|
374
401
|
- Pour tout service compatible avec l'API d'OpenAI
|
|
375
402
|
|
|
403
|
+
- **anthropic** : Anthropic (Claude)
|
|
404
|
+
- Configuration : `IA.service=anthropic IA.modele=claude-haiku-4-5-20251001 IA.url=None IA.api-key=xxxxxxx`
|
|
405
|
+
- L'API vise https://api.anthropic.com
|
|
406
|
+
- La clé d'environnement se nomme `QCANTHROPIC_API_KEY` (et non `ANTHROPIC_API_KEY`)
|
|
407
|
+
|
|
408
|
+
- **albert** : Albert, service public de la DINUM
|
|
409
|
+
- Configuration : `IA.service=albert IA.modele=openai/gpt-oss-120b IA.url=None IA.api-key=xxxxxxx`
|
|
410
|
+
- L'API vise https://albert.api.etalab.gouv.fr/v1
|
|
411
|
+
|
|
412
|
+
- **ilaas** : ILaaS
|
|
413
|
+
- Configuration : `IA.service=ilaas IA.modele=gemma-4-31b IA.url=https://llm.ilaas.fr/v1 IA.api-key=xxxxxxx`
|
|
414
|
+
- L'API vise https://llm.ilaas.fr/v1 (compatible OpenAI)
|
|
415
|
+
- Clé d'environnement : `ILAAS_API_KEY`
|
|
416
|
+
|
|
417
|
+
- **ragarenn** : Service Ragarenn (Eskemm Numérique)
|
|
418
|
+
- Configuration : `IA.service=ragarenn IA.modele=codestral:latest IA.url=None IA.api-key=xxxxxxx`
|
|
419
|
+
- L'API vise https://ragarenn.eskemm-numerique.fr/sso/ch@t/api
|
|
420
|
+
|
|
376
421
|
Le service d'IA générative est appelé dans trois situations :
|
|
377
422
|
- en cas d'erreur générée par le SGBD pour aider l'élève ou l'étudiant à comprendre son erreur ;
|
|
378
423
|
- lors de la description de la base de données (option "--describe") pour expliquer la base de données ;
|
|
@@ -525,6 +570,15 @@ https://apimu.gitlabpages.inria.fr/site/ateliers/pdf-apimu23/APIMUEIAH_2023_pape
|
|
|
525
570
|
2- Emmanuel Desmontils. Enseigner SQL en NSI : typologie et cas de la jointure. Journée des enseignants de SNT et de NSI 2024, Académie de la Réunion et IREMI de La Réunion, Dec 2024, Saint-Denis (La Réunion), France.
|
|
526
571
|
https://hal.science/hal-05030037v1
|
|
527
572
|
|
|
573
|
+
3- Emmanuel Desmontils. Application d'aide à l'apprentissage d'un langage. 2026.
|
|
574
|
+
https://hal.science/hal-05630648v1
|
|
575
|
+
|
|
576
|
+
4- Emmanuel Desmontils, Laura Monceaux. QueryCraft : exécuter SQL en mode "pas à pas". Didapro 11, Mar 2026, Grenoble, France.
|
|
577
|
+
https://hal.science/hal-05630675v1
|
|
578
|
+
|
|
579
|
+
5- Emmanuel Desmontils, Laura Monceaux. Atelier QueryCraft. Didapro 11, Université Grenoble Alpes, Mar 2026, Grenoble, France.
|
|
580
|
+
https://hal.science/hal-05630699v1
|
|
581
|
+
|
|
528
582
|
## Génération de la documentation
|
|
529
583
|
|
|
530
584
|
```shell
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# QueryCraft
|
|
2
2
|
|
|
3
|
-
**Version actuelle :
|
|
3
|
+
**Version actuelle : 2.1.0** (juillet 2026) — [Voir le CHANGELOG](CHANGELOG.md)
|
|
4
4
|
|
|
5
5
|
[TOC]
|
|
6
6
|
|
|
@@ -22,6 +22,7 @@ Elle propose aussi des applications pour décomposer l'exécution d'une requête
|
|
|
22
22
|
- **Interface en ligne de commande** : Utilisez l'application en ligne de commande pour analyser et décomposer vos requêtes SQL.
|
|
23
23
|
- **Aide de l'IA** : Comprenez vos erreurs SQL grâce à l'aide de l'IA.
|
|
24
24
|
- **Formats d'affichage multiples** : Exportez les résultats en format texte, HTML ou Markdown (nouveau en v0.2.1).
|
|
25
|
+
- **Mode multi-tenant** : Sur l'interface web, chaque enseignant dispose d'une instance isolée accessible via `/<code>/` (configuration, bases, exercices, cache et logs propres). Voir [docs/INSTALLATION.md](docs/INSTALLATION.md) et [docs/ARCHITECTURE-multi-tenant.md](docs/ARCHITECTURE-multi-tenant.md).
|
|
25
26
|
|
|
26
27
|
## Limitations
|
|
27
28
|
|
|
@@ -41,12 +42,20 @@ L'outil a été testé sur Apple Mac Book Pro / MacOS Tahoe 26.2 (python 3.11.4,
|
|
|
41
42
|
|
|
42
43
|
## Installation
|
|
43
44
|
|
|
45
|
+
> Pour une installation détaillée (environnement virtuel, clés IA, déploiement,
|
|
46
|
+
> mode multi-tenant), voir **[docs/INSTALLATION.md](docs/INSTALLATION.md)**.
|
|
47
|
+
|
|
48
|
+
**Python 3.11 requis** (`psycopg2-binary==2.9.10` est incompatible avec Python 3.12+).
|
|
49
|
+
|
|
44
50
|
### Après téléchargement depuis Gitlab :
|
|
45
51
|
|
|
46
52
|
```shell
|
|
47
53
|
git clone https://gitlab.univ-nantes.fr/ls2n-didactique/querycraft.git
|
|
48
54
|
cd querycraft
|
|
55
|
+
python3.11 -m venv .venv
|
|
56
|
+
source .venv/bin/activate
|
|
49
57
|
pip install -e .
|
|
58
|
+
pip install -r requirements.txt
|
|
50
59
|
```
|
|
51
60
|
|
|
52
61
|
|
|
@@ -64,7 +73,7 @@ pip install --upgrade querycraft
|
|
|
64
73
|
|
|
65
74
|
## Usage
|
|
66
75
|
|
|
67
|
-
**Pour voir les commandes et comprendre l'utilisation avec exemples voir : [HOW_TO_USE](HOW_TO_USE.md)**
|
|
76
|
+
**Pour voir les commandes et comprendre l'utilisation avec exemples voir : [HOW_TO_USE](docs/HOW_TO_USE.md)**
|
|
68
77
|
La requête devra être écrite entre double quotes " ".
|
|
69
78
|
|
|
70
79
|
### Interface Web (Nouveau !)
|
|
@@ -76,10 +85,24 @@ Depuis la version 0.2.1, QueryCraft propose une interface web moderne pour exéc
|
|
|
76
85
|
web-sbs
|
|
77
86
|
|
|
78
87
|
# Accéder via le navigateur
|
|
79
|
-
http://127.0.0.1:
|
|
88
|
+
http://127.0.0.1:8080
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Voir la documentation complète : [WEB_INTERFACE.md](docs/WEB_INTERFACE.md)**
|
|
92
|
+
|
|
93
|
+
#### Mode multi-tenant (une instance par enseignant)
|
|
94
|
+
|
|
95
|
+
L'interface web peut servir une instance isolée par enseignant, via un code à 6
|
|
96
|
+
chiffres dans l'URL (`/<code>/`), la racine `/` restant la démonstration :
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
export QC_INSTANCES_DIR=/srv/querycraft/instances
|
|
100
|
+
tenant-sbs --init-demo # démonstration servie à /
|
|
101
|
+
tenant-sbs --create 123456 # instance enseignant servie à /123456/
|
|
102
|
+
web-sbs
|
|
80
103
|
```
|
|
81
104
|
|
|
82
|
-
**Voir
|
|
105
|
+
**Voir : [docs/INSTALLATION.md](docs/INSTALLATION.md) et [docs/ARCHITECTURE-multi-tenant.md](docs/ARCHITECTURE-multi-tenant.md)**
|
|
83
106
|
|
|
84
107
|
Fonctionnalités :
|
|
85
108
|
- 🌐 Interface web intuitive et responsive
|
|
@@ -321,6 +344,24 @@ Les services IA générative disponibles sont :
|
|
|
321
344
|
- Configuration : `IA.service=generic IA.modele=gpt-3.5-turbo IA.url=https://xxxxx IA.api-key=xxxxxxx`
|
|
322
345
|
- Pour tout service compatible avec l'API d'OpenAI
|
|
323
346
|
|
|
347
|
+
- **anthropic** : Anthropic (Claude)
|
|
348
|
+
- Configuration : `IA.service=anthropic IA.modele=claude-haiku-4-5-20251001 IA.url=None IA.api-key=xxxxxxx`
|
|
349
|
+
- L'API vise https://api.anthropic.com
|
|
350
|
+
- La clé d'environnement se nomme `QCANTHROPIC_API_KEY` (et non `ANTHROPIC_API_KEY`)
|
|
351
|
+
|
|
352
|
+
- **albert** : Albert, service public de la DINUM
|
|
353
|
+
- Configuration : `IA.service=albert IA.modele=openai/gpt-oss-120b IA.url=None IA.api-key=xxxxxxx`
|
|
354
|
+
- L'API vise https://albert.api.etalab.gouv.fr/v1
|
|
355
|
+
|
|
356
|
+
- **ilaas** : ILaaS
|
|
357
|
+
- Configuration : `IA.service=ilaas IA.modele=gemma-4-31b IA.url=https://llm.ilaas.fr/v1 IA.api-key=xxxxxxx`
|
|
358
|
+
- L'API vise https://llm.ilaas.fr/v1 (compatible OpenAI)
|
|
359
|
+
- Clé d'environnement : `ILAAS_API_KEY`
|
|
360
|
+
|
|
361
|
+
- **ragarenn** : Service Ragarenn (Eskemm Numérique)
|
|
362
|
+
- Configuration : `IA.service=ragarenn IA.modele=codestral:latest IA.url=None IA.api-key=xxxxxxx`
|
|
363
|
+
- L'API vise https://ragarenn.eskemm-numerique.fr/sso/ch@t/api
|
|
364
|
+
|
|
324
365
|
Le service d'IA générative est appelé dans trois situations :
|
|
325
366
|
- en cas d'erreur générée par le SGBD pour aider l'élève ou l'étudiant à comprendre son erreur ;
|
|
326
367
|
- lors de la description de la base de données (option "--describe") pour expliquer la base de données ;
|
|
@@ -473,6 +514,15 @@ https://apimu.gitlabpages.inria.fr/site/ateliers/pdf-apimu23/APIMUEIAH_2023_pape
|
|
|
473
514
|
2- Emmanuel Desmontils. Enseigner SQL en NSI : typologie et cas de la jointure. Journée des enseignants de SNT et de NSI 2024, Académie de la Réunion et IREMI de La Réunion, Dec 2024, Saint-Denis (La Réunion), France.
|
|
474
515
|
https://hal.science/hal-05030037v1
|
|
475
516
|
|
|
517
|
+
3- Emmanuel Desmontils. Application d'aide à l'apprentissage d'un langage. 2026.
|
|
518
|
+
https://hal.science/hal-05630648v1
|
|
519
|
+
|
|
520
|
+
4- Emmanuel Desmontils, Laura Monceaux. QueryCraft : exécuter SQL en mode "pas à pas". Didapro 11, Mar 2026, Grenoble, France.
|
|
521
|
+
https://hal.science/hal-05630675v1
|
|
522
|
+
|
|
523
|
+
5- Emmanuel Desmontils, Laura Monceaux. Atelier QueryCraft. Didapro 11, Université Grenoble Alpes, Mar 2026, Grenoble, France.
|
|
524
|
+
https://hal.science/hal-05630699v1
|
|
525
|
+
|
|
476
526
|
## Génération de la documentation
|
|
477
527
|
|
|
478
528
|
```shell
|