ApiLogicServer 14.3.25__py3-none-any.whl → 14.4.0__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.
- api_logic_server_cli/api_logic_server.py +4 -14
- api_logic_server_cli/api_logic_server_info.yaml +3 -3
- api_logic_server_cli/cli.py +16 -7
- api_logic_server_cli/create_from_model/__pycache__/create_db_from_model.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/ont_build.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/ont_create.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/create_db_from_model.py +2 -0
- api_logic_server_cli/create_from_model/ont_build.py +19 -14
- api_logic_server_cli/create_from_model/ont_create.py +5 -5
- api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/.DS_Store +0 -0
- api_logic_server_cli/database/nw-gold-fix.sql +62 -0
- api_logic_server_cli/database/nw-gold.sqlite +0 -0
- api_logic_server_cli/{prototypes/manager/webgenai → fragments}/docker-compose.yml +1 -1
- api_logic_server_cli/genai/genai.py +42 -11
- api_logic_server_cli/genai/genai_graphics.py +252 -38
- api_logic_server_cli/genai/genai_svcs.py +20 -12
- api_logic_server_cli/manager.py +19 -10
- api_logic_server_cli/prototypes/.DS_Store +0 -0
- api_logic_server_cli/prototypes/base/.DS_Store +0 -0
- api_logic_server_cli/prototypes/base/.vscode/launch.json +19 -0
- api_logic_server_cli/prototypes/base/api/expose_api_models.py +3 -1
- api_logic_server_cli/prototypes/base/api_logic_server_run.py +5 -2
- api_logic_server_cli/prototypes/base/config/activate_logicbank.py +1 -0
- api_logic_server_cli/prototypes/base/config/config.py +57 -14
- api_logic_server_cli/prototypes/base/config/logging.yml +1 -0
- api_logic_server_cli/prototypes/base/config/server_setup.py +33 -1
- api_logic_server_cli/prototypes/base/database/test_data/readme.md +3 -1
- api_logic_server_cli/prototypes/base/devops/docker-standard-image/docker-compose-standard-image.yml +7 -2
- api_logic_server_cli/prototypes/base/docs/training/logic_bank_api.prompt +314 -0
- api_logic_server_cli/prototypes/base/docs/training/logic_example.py +41 -0
- api_logic_server_cli/prototypes/base/integration/kafka/kafka_producer.py +7 -3
- api_logic_server_cli/prototypes/base/integration/system/FlaskKafka.py +5 -1
- api_logic_server_cli/prototypes/base/ui/templates/bar_chart.jinja +64 -0
- api_logic_server_cli/prototypes/genai_demo/ui/admin/admin.yaml +1 -1
- api_logic_server_cli/prototypes/manager/README.md +26 -4
- api_logic_server_cli/prototypes/manager/system/genai/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.prompt +0 -10
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.response_example +32 -10
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/002_create_db_models.prompt +4 -4
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/003_create_db_models.response +77 -47
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_informal.prompt +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/dashboard_services.jinja +83 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_dashboard_WIP.py +34 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/{graphics_services.py → graphics_services_api_xxx.py} +0 -9
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db.jinja +46 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db_each_method.jinja +36 -0
- api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/graphics.prompt +7 -3
- api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/response_format.prompt +8 -1
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.ps1 +100 -0
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.sh +116 -0
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/readme.md +7 -0
- api_logic_server_cli/prototypes/manager/system/style-guide.yaml +2 -2
- api_logic_server_cli/prototypes/manager/webgenai/README.md +6 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/count_orders_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/order_count_by_month.prompt +1 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/request copy.json +892 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/request.json +6 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/response.json +17 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/response.yaml +59 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/sales_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw/ui/admin/home.js +5 -4
- api_logic_server_cli/prototypes/nw/ui/app_model_custom.yaml +851 -1082
- api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/count_orders_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/sales_by_employee.prompt +1 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/1_langchain_loader.py +19 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/2_gpt_mcp_prompt.txt +19 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/3_executor_test_agent.py +38 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/README.md +17 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/curl.txt +4 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/nw_swagger_3.yaml +16660 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/run_executor.py +23 -0
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/nginx/nginx.conf +2 -2
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/package.json +6 -6
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/app/app.config.ts +2 -1
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.prod.ts +5 -5
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.ts +5 -5
- api_logic_server_cli/prototypes/ont_app/templates/app_config.jinja +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/detail_template.html +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/new_template.html +16 -16
- apilogicserver-14.4.0.dist-info/METADATA +76 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/RECORD +87 -56
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/WHEEL +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_jsonapi_rpc.jinja +0 -37
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_unused.jinja +0 -38
- apilogicserver-14.3.25.dist-info/METADATA +0 -167
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/entry_points.txt +0 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/top_level.txt +0 -0
|
@@ -29,13 +29,4 @@ app_logger = logging.getLogger("api_logic_server_app")
|
|
|
29
29
|
def add_service(app, api, project_dir, swagger_host: str, PORT: str, method_decorators = []):
|
|
30
30
|
pass
|
|
31
31
|
|
|
32
|
-
api.expose_object(GraphicsServices) # Swagger-visible services
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
"""
|
|
36
|
-
Illustrates #als: apis for graphics
|
|
37
|
-
|
|
38
|
-
* Custom service - visible in swagger
|
|
39
|
-
"""
|
|
40
|
-
class GraphicsServices(safrs.JABase):
|
|
41
|
-
pass
|
api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db.jinja
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from database import models
|
|
2
|
+
import logging
|
|
3
|
+
from safrs import jsonapi_attr
|
|
4
|
+
from sqlalchemy.orm import relationship, remote, foreign
|
|
5
|
+
from functools import wraps # This convenience func preserves name and docstring
|
|
6
|
+
import decimal as decimal
|
|
7
|
+
from sqlalchemy import extract, func
|
|
8
|
+
from flask import request, jsonify
|
|
9
|
+
from safrs import jsonapi_rpc, SAFRSAPI
|
|
10
|
+
import safrs
|
|
11
|
+
|
|
12
|
+
"""
|
|
13
|
+
Graphics methods for database classes, created when:
|
|
14
|
+
* `als genai create` contains prompts like: 'Graph Sales by Category', etc.
|
|
15
|
+
* `als add-graphics` --using the docs/graphics directory
|
|
16
|
+
|
|
17
|
+
Called by api/api_discovery/dashboard_services.py when admin app loaded
|
|
18
|
+
|
|
19
|
+
You typically do not alter this file - rebuilt on als genai--graphics.
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
app_logger = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def add_method(cls):
|
|
27
|
+
"""
|
|
28
|
+
Decorator to add method to class, e.g., db class group by query method
|
|
29
|
+
|
|
30
|
+
Thanks to: https://mgarod.medium.com/dynamically-add-a-method-to-a-class-in-python-c49204b85bd6
|
|
31
|
+
"""
|
|
32
|
+
def decorator(func):
|
|
33
|
+
@wraps(func)
|
|
34
|
+
def wrapper(self, *args, **kwargs):
|
|
35
|
+
return func(*args, **kwargs)
|
|
36
|
+
|
|
37
|
+
setattr(cls, func.__name__, wrapper)
|
|
38
|
+
# Note we are not binding func, but wrapper which accepts self but does exactly the same as func
|
|
39
|
+
return func # returning func means func can still be used normally
|
|
40
|
+
return decorator
|
|
41
|
+
|
|
42
|
+
##############################
|
|
43
|
+
# generated services follow
|
|
44
|
+
##############################
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
@classmethod
|
|
3
|
+
@add_method(models.{{class_x_axis}})
|
|
4
|
+
@jsonapi_rpc(http_methods=['GET', 'OPTIONS'])
|
|
5
|
+
def {{name}}(*args, **kwargs):
|
|
6
|
+
"""
|
|
7
|
+
Complex query with multiple joins, for graphics, from 'Graph Sales by Category', etc.
|
|
8
|
+
Test with Swagger.
|
|
9
|
+
"""
|
|
10
|
+
if request.method == 'OPTIONS':
|
|
11
|
+
return jsonify({ "result": "ok" })
|
|
12
|
+
|
|
13
|
+
from database.models import {{classes_used}}
|
|
14
|
+
db = safrs.DB
|
|
15
|
+
session = db.session # sqlalchemy.orm.scoping.scoped_session
|
|
16
|
+
# Security.set_user_sa() # an endpoint that requires no auth header (see also @bypass_security)
|
|
17
|
+
|
|
18
|
+
# SQLAlchemy query
|
|
19
|
+
query = {{ sqlalchemy_query }}
|
|
20
|
+
# Execute query and fetch results
|
|
21
|
+
results = query.all()
|
|
22
|
+
from decimal import Decimal
|
|
23
|
+
columns = ['{{ xAxis }}' , '{{ yAxis }}']
|
|
24
|
+
results = [{columns[0]: row[0], columns[1]: round(float(row[1]), 2)} for row in results]
|
|
25
|
+
title = '{{ title }}'
|
|
26
|
+
graph_type = '{{ graph_type }}'.lower()
|
|
27
|
+
json_results = {
|
|
28
|
+
"results": results,
|
|
29
|
+
"columns": columns,
|
|
30
|
+
"title": title,
|
|
31
|
+
"chart_type": graph_type,
|
|
32
|
+
"xAxis": columns[0],
|
|
33
|
+
"yAxis": columns[1],
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return json_results
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
Create WGResult Graphics for prompts like 'graph sales by region'.
|
|
3
|
-
*
|
|
2
|
+
Create WGResult Graphics, with graphics elements for each prompts like 'graph sales by region'.
|
|
3
|
+
* do not create graphics elements unless explicitly requested.
|
|
4
|
+
* query results should always return exactly 2 columns.
|
|
5
|
+
* use 'sales by region' to create a WGResult Graphic.sqlalchemy_query for *each* such line
|
|
4
6
|
* Be sure to use class names, not table names
|
|
5
|
-
* for
|
|
7
|
+
* Create joins for only explicitly defined foreign key relationships
|
|
8
|
+
* for example, using Northwind - important! note the 2 right parens closing label("Total Sales"):
|
|
6
9
|
# SQLAlchemy query for Sales by Category
|
|
7
10
|
sales_by_category = (
|
|
8
11
|
session.query(
|
|
@@ -16,3 +19,4 @@ Create WGResult Graphics for prompts like 'graph sales by region'.
|
|
|
16
19
|
.group_by(Category.CategoryName)
|
|
17
20
|
.order_by(func.sum(OrderDetail.Quantity * OrderDetail.UnitPrice * (1 - OrderDetail.Discount)).desc())
|
|
18
21
|
)
|
|
22
|
+
|
|
@@ -21,7 +21,14 @@ class Graphic(BaseModel):
|
|
|
21
21
|
sqlalchemy_query: str # sqlalchemy query using group by, returns result = { "result": [ ("name", "value") ] }
|
|
22
22
|
sql_query: str # sql query using group by, returns result = { "result": [ ("name", "value") ] }
|
|
23
23
|
classes_used: str # comma-delimited list of classes used in sqlalchemy_query
|
|
24
|
-
|
|
24
|
+
class_x_axis: str # name of class for x axis
|
|
25
|
+
name: str # suggested Python name for sqlalchemy_query - unique
|
|
26
|
+
prompt: str # prompt used to create the graphic
|
|
27
|
+
title: str # expanded name
|
|
28
|
+
xAxis: str # caption for x axis
|
|
29
|
+
yAxis: str # caption for y axis
|
|
30
|
+
dashboard: bool # whether appears on home page
|
|
31
|
+
graph_type: str # Bar, Line, Pie
|
|
25
32
|
html_code: str # create a java script app to show a bar chart from sqlalchemy_query result
|
|
26
33
|
|
|
27
34
|
class WGResult(BaseModel): # must match system/genai/prompt_inserts/response_format.prompt
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
|
|
2
|
+
param(
|
|
3
|
+
[Parameter()]
|
|
4
|
+
[String]$IDE
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
SRA="venv/lib/python3.12/site-packages/api_logic_server_cli/create_from_model/safrs-react-admin-npm-build"
|
|
8
|
+
|
|
9
|
+
if (Test-Path -Path $SRA) {
|
|
10
|
+
Write-Output " "
|
|
11
|
+
Write-Output "(SRA location verified)"
|
|
12
|
+
Write-Output " "
|
|
13
|
+
} else {
|
|
14
|
+
Write-Output " "
|
|
15
|
+
Write-Output "Safrs React Admin (SRA) not found - please fix line above"
|
|
16
|
+
Write-Output " "
|
|
17
|
+
Exit 1
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
$clonedocs = $true
|
|
21
|
+
Write-Output "IDE specified as: $IDE"
|
|
22
|
+
|
|
23
|
+
if($IDE -eq "") {
|
|
24
|
+
Write-Output " "
|
|
25
|
+
Write-Output "Installs dev version of ApiLogicServer and safrs-react-admin (version 7.0.15)"
|
|
26
|
+
Write-Output " .. vscode option creates venv, and starts vscode on workspace "
|
|
27
|
+
Write-Output " .. See: https://apilogicserver.github.io/Docs/Architecture-Internals"
|
|
28
|
+
Write-Output " "
|
|
29
|
+
Write-Output " IMPORTANT - create a folder, then install:"
|
|
30
|
+
Write-Output " > mkdir ApiLogicServer"
|
|
31
|
+
Write-Output " "
|
|
32
|
+
Write-Output " > .\Install-ApiLogicServer-Dev [ vscode | charm | x ]"
|
|
33
|
+
Write-Output " "
|
|
34
|
+
Exit
|
|
35
|
+
}
|
|
36
|
+
ls
|
|
37
|
+
Write-Output " "
|
|
38
|
+
$Ready= Read-Host -Prompt "Verify ApiLogicServer-dev does not exist, and [Enter] install *dev* version of ApiLogicServer for $1> "
|
|
39
|
+
Set-PSDebug -Trace 0
|
|
40
|
+
|
|
41
|
+
if (Test-Path -Path "ApiLogicServer-dev") {
|
|
42
|
+
Write-Output " "
|
|
43
|
+
Write-Output "Really, ApiLogicServer-dev must not exist"
|
|
44
|
+
Write-Output " "
|
|
45
|
+
Exit 1
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
mkdir ApiLogicServer-dev
|
|
49
|
+
cd ApiLogicServer-dev
|
|
50
|
+
mkdir servers # good place to create ApiLogicProjects
|
|
51
|
+
mkdir build_and_test
|
|
52
|
+
mkdir org_git # git clones from org ApiLogicServer here
|
|
53
|
+
cd org_git
|
|
54
|
+
|
|
55
|
+
if ($clonedocs -eq $true) {
|
|
56
|
+
Write-Output "\n Docs setup (slow) "
|
|
57
|
+
git clone https://github.com/ApiLogicServer/Docs.git
|
|
58
|
+
cd Docs
|
|
59
|
+
python -m venv venv
|
|
60
|
+
venv\Scripts\activate
|
|
61
|
+
pip -m install -r requirements.txt
|
|
62
|
+
cd ..
|
|
63
|
+
} else {
|
|
64
|
+
Write-Output "\n Docs setup DECLINED "
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
git clone https://github.com/ApiLogicServer/ApiLogicServer-src.git
|
|
69
|
+
cd ApiLogicServer-src
|
|
70
|
+
ls
|
|
71
|
+
# $Ready= Read-Host -Prompt "Should be at -src - ready to copy sra build $1> "
|
|
72
|
+
cp -r ../../../$SRA api_logic_server_cli/create_from_model/safrs-react-admin-npm-build
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
if ($IDE -eq "vscode") {
|
|
76
|
+
python -m venv venv
|
|
77
|
+
# pwd
|
|
78
|
+
# ls
|
|
79
|
+
venv\Scripts\activate
|
|
80
|
+
python -m pip install -r requirements.txt
|
|
81
|
+
code .vscode/ApiLogicServerDev.code-workspace
|
|
82
|
+
Set-PSDebug -Trace 0
|
|
83
|
+
Write-Output ""
|
|
84
|
+
Write-Output "Workspace opened; use pre-created Launch Configurations:"
|
|
85
|
+
Write-Output " * Run 1 - Create ApiLogicProject, then..."
|
|
86
|
+
Write-Output " * Run 2 - RUN ApiLogicProject"
|
|
87
|
+
} elseif ($IDE -eq "pycharm") {
|
|
88
|
+
charm .
|
|
89
|
+
Set-PSDebug -Trace 0
|
|
90
|
+
Write-Output " * Python Interpreter > Add New Environment (default, to create venv)"
|
|
91
|
+
Write-Output " IMPORTANT - NOT DOCKER"
|
|
92
|
+
Write-Output " * then open requirements.txt - PyCharm should **Install Requirements**"
|
|
93
|
+
Write-Output " If this fails, use a terminal to run pip install -r requirements.txt"
|
|
94
|
+
} else {
|
|
95
|
+
Write-Output "No IDE started"
|
|
96
|
+
}
|
|
97
|
+
Write-Output ""
|
|
98
|
+
Write-Output "IDEs are preconfigured with run/launch commands to create and run the sample"
|
|
99
|
+
Write-Output ""
|
|
100
|
+
exit 0
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
contains()
|
|
4
|
+
# echo contains check $1 in $2
|
|
5
|
+
case "$1" in
|
|
6
|
+
(*"$2"*) true;;
|
|
7
|
+
(*) false;;
|
|
8
|
+
esac
|
|
9
|
+
|
|
10
|
+
sra="venv/lib/python3.12/site-packages/api_logic_server_cli/create_from_model/safrs-react-admin-npm-build"
|
|
11
|
+
if [ -d $src ]
|
|
12
|
+
then
|
|
13
|
+
echo "\n(SRA location verified)\n"
|
|
14
|
+
else
|
|
15
|
+
echo "\n(SRA location not found)\n"
|
|
16
|
+
echo "Please fix variable above"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
sra_curl="0.2.9/$sra"
|
|
21
|
+
|
|
22
|
+
ostype=$(uname -a)
|
|
23
|
+
if contains "Ubuntu" $ostype; then
|
|
24
|
+
ostype="ubuntu"
|
|
25
|
+
fi
|
|
26
|
+
# if contains "ubuntu" $ostype; then
|
|
27
|
+
# echo $ostype contains ubuntu
|
|
28
|
+
# fi
|
|
29
|
+
|
|
30
|
+
# normally true, use false for skipping long clone during testing
|
|
31
|
+
clonedocs=true
|
|
32
|
+
|
|
33
|
+
if [ $# -eq 0 ]
|
|
34
|
+
then
|
|
35
|
+
echo " "
|
|
36
|
+
# echo "shell: $SHELL"
|
|
37
|
+
echo "Installs dev version of ApiLogicServer and safrs-react-admin on $ostype (version 7.0.15)\n"
|
|
38
|
+
echo " .. vscode option creates venv, and starts vscode on workspace"
|
|
39
|
+
echo " .. See: https://apilogicserver.github.io/Docs/Architecture-Internals"
|
|
40
|
+
echo " "
|
|
41
|
+
echo " > sh system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.sh [ vscode | charm | x ]"
|
|
42
|
+
echo " "
|
|
43
|
+
exit 0
|
|
44
|
+
else
|
|
45
|
+
ls
|
|
46
|
+
echo " "
|
|
47
|
+
read -p "Verify ApiLogicServer-dev does not exist, and [Enter] install *dev* version of ApiLogicServer for $1> "
|
|
48
|
+
if [ -d "ApiLogicServer-dev" ]
|
|
49
|
+
then
|
|
50
|
+
echo "\nReally, ApiLogicServer-dev must not exist\n"
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
set -x
|
|
54
|
+
mkdir ApiLogicServer-dev
|
|
55
|
+
cd ApiLogicServer-dev
|
|
56
|
+
mkdir servers # good place to create ApiLogicProjects
|
|
57
|
+
mkdir build_and_test
|
|
58
|
+
mkdir org_git # git clones from org ApiLogicServer here
|
|
59
|
+
cd org_git
|
|
60
|
+
|
|
61
|
+
if [ "$clonedocs" = true ]
|
|
62
|
+
then
|
|
63
|
+
git clone https://github.com/ApiLogicServer/Docs
|
|
64
|
+
cd Docs
|
|
65
|
+
python3 -m venv venv # may require python -m venv venv
|
|
66
|
+
if contains "ubuntu" $ostype; then
|
|
67
|
+
echo $ostype contains ubuntu
|
|
68
|
+
. venv/bin/activate
|
|
69
|
+
else
|
|
70
|
+
echo $ostype does not contain ubuntu
|
|
71
|
+
source venv/bin/activate # windows venv\Scripts\activate
|
|
72
|
+
fi
|
|
73
|
+
pip install -r requirements.txt
|
|
74
|
+
cd ..
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
git clone https://github.com/ApiLogicServer/ApiLogicServer-src.git
|
|
78
|
+
cd ApiLogicServer-src
|
|
79
|
+
echo "\ncopying $sra --> ApiLogicServer"
|
|
80
|
+
cp -r ../../../$sra api_logic_server_cli/create_from_model/safrs-react-admin-npm-build
|
|
81
|
+
|
|
82
|
+
#
|
|
83
|
+
#
|
|
84
|
+
# read -p "Installed - ready to launch IDE..."
|
|
85
|
+
if [ "$1" = "vscode" ]
|
|
86
|
+
then
|
|
87
|
+
python3 -m venv venv # may require python -m venv venv
|
|
88
|
+
# pwd
|
|
89
|
+
# ls
|
|
90
|
+
. venv/bin/activate
|
|
91
|
+
# read -p "venv created; do optional pre-installs now $1> "
|
|
92
|
+
python3 -m pip install -r requirements.txt # you may need to use pip3, or restart your terminal session
|
|
93
|
+
code .vscode/ApiLogicServerDev.code-workspace
|
|
94
|
+
set +x
|
|
95
|
+
echo ""
|
|
96
|
+
echo "Workspace opened; use pre-created Launch Configurations:"
|
|
97
|
+
echo " * Run 1 - Create ApiLogicProject, then..."
|
|
98
|
+
echo " * Run 2 - RUN ApiLogicProject"
|
|
99
|
+
elif [ "$1" = "charm" ]
|
|
100
|
+
then
|
|
101
|
+
charm .
|
|
102
|
+
set +x
|
|
103
|
+
echo " * Python Interpreter > Add New Environment (default, to create venv)"
|
|
104
|
+
echo " IMPORTANT - NOT DOCKER"
|
|
105
|
+
echo " * then open requirements.txt - PyCharm should **Install Requirements**"
|
|
106
|
+
echo " If this fails, use a terminal to run pip install -r requirements.txt"
|
|
107
|
+
else
|
|
108
|
+
set +x
|
|
109
|
+
fi
|
|
110
|
+
echo ""
|
|
111
|
+
echo "IDEs are preconfigured with run/launch commands to create and run the sample"
|
|
112
|
+
echo ""
|
|
113
|
+
echo "ApiLogicServer/react-admin contains shell burn-and-rebuild-react-admin"
|
|
114
|
+
echo ""
|
|
115
|
+
exit 0
|
|
116
|
+
fi
|
|
@@ -12,7 +12,7 @@ date_format: 'LL'
|
|
|
12
12
|
edit_on_mode : 'dblclick'
|
|
13
13
|
min_decimal_digits: '2'
|
|
14
14
|
max_decimal_digits: '4'
|
|
15
|
-
decimal_min: '
|
|
15
|
+
decimal_min: '2'
|
|
16
16
|
decimal_max: '1000000000'
|
|
17
17
|
row_height: small,
|
|
18
18
|
include_translation: 'false'
|
|
@@ -20,7 +20,7 @@ use_keycloak: 'false'
|
|
|
20
20
|
keycloak_url: http://localhost:8080
|
|
21
21
|
keycloak_realm: kcals
|
|
22
22
|
keycloak_client_id: alsclient
|
|
23
|
-
serviceType:
|
|
23
|
+
serviceType: JSONAPI
|
|
24
24
|
locale: en
|
|
25
25
|
applicationLocales: ["en","es"]
|
|
26
26
|
startSessionPath: /auth/login
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Default location for WebGenAI - projects, sqlite databases, etc.
|
|
2
|
+
* Examine these to verify genai logic, but use export to debug or make changes.
|
|
3
|
+
* See [Export](https://apilogicserver.github.io/Docs/WebGenAI-CLI/#export)
|
|
4
|
+
* See [Import / Merge WebGenai](https://apilogicserver.github.io/Docs/IDE-Import-WebGenAI/)
|
|
5
|
+
|
|
6
|
+
See docker_compose for WebGenAI run instructions.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Graph number of sales per category, for dashboard
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Graph count orders by month
|