Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

BUG-Incorrect Schema for Taipy Core Config #1091

Closed FlorianJacta closed 4 months ago

FlorianJacta commented 5 months ago

Description The schema is not readable. It throws an error:

File "C:\Users\jacta\.conda\envs\3.1_release\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 104 column 13 (char 3168)

In the same issue, you could also fix the collection_name property.

          "collection_name ": {
            "description": "storage_type: mongo_collection specific.",
            "type": "string"
          },

should be (delete the space after collection_name):

      "collection_name": {
        "description": "storage_type: mongo_collection specific.",
        "type": "string"
      },

How to reproduce

import urllib.request
import json

SCHEMA_URL = "https://raw.githubusercontent.com/Avaiga/taipy/release/3.1/taipy/core/config/config.schema.json"

# Load schema from URL
with urllib.request.urlopen(SCHEMA_URL) as url:
    schema = json.load(url)

Expected behavior To be readable.

Runtime environment Please specify relevant indications.

Acceptance Criteria

jrobinAV commented 5 months ago

We should add a unit test that loads the schema to ensure it is loadable. @FlorianJacta Does that mean Taipy Studio is broken?

FlorianJacta commented 5 months ago

I don't know; it seems to work, which is strange.