diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index d634de401b6..76043a6d143 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -4482,6 +4482,11 @@ "fileMatch": ["pyrightconfig.json"], "url": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json" }, + { + "name": "pytest", + "description": "pytest configuration", + "url": "https://json.schemastore.org/partial-pytest.json" + }, { "name": "Qgoda", "description": "Qgoda static site generator configuration file format", @@ -4999,6 +5004,21 @@ "fileMatch": [".snapcraft.yaml", "snapcraft.yaml"], "url": "https://raw.githubusercontent.com/snapcore/snapcraft/master/schema/snapcraft.json" }, + { + "name": "snowflake-config", + "description": "Configuration file for Snowflake", + "fileMatch": ["**/.snowflake/config.toml", "**/snowflake/config.toml"], + "url": "https://json.schemastore.org/snowflake-config.json" + }, + { + "name": "snowflake-connections", + "description": "Configuration file for Snowflake connections", + "fileMatch": [ + "**/.snowflake/connections.toml", + "**/snowflake/connections.toml" + ], + "url": "https://json.schemastore.org/snowflake-connections.json" + }, { "name": "Solidarity", "description": "CLI config for enforcing environment settings", diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index d4281a644eb..965e0cd5974 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -991,6 +991,9 @@ "partial-pyright.json": { "unknownKeywords": ["markdownDescription", "x-intellij-html-description"] }, + "partial-pytest.json": { + "unknownKeywords": ["x-tombi-array-values-order", "x-tombi-table-keys-order"] + }, "partial-setuptools.json": { "unknownFormat": [ "python-module-name", @@ -1099,6 +1102,7 @@ "partial-poe.json", "partial-poetry.json", "partial-pyright.json", + "partial-pytest.json", "partial-repo-review.json", "partial-scikit-build.json", "partial-setuptools.json", @@ -1229,6 +1233,12 @@ "pep561-stub-name" ] }, + "snowflake-config.json": { + "unknownKeywords": ["x-tombi-toml-version", "x-tombi-table-keys-order"] + }, + "snowflake-connections.json": { + "unknownKeywords": ["x-tombi-toml-version", "x-tombi-table-keys-order"] + }, "staticwebapp.config.json": { "unknownKeywords": ["examples"] }, diff --git a/src/schemas/json/partial-pytest.json b/src/schemas/json/partial-pytest.json new file mode 100644 index 00000000000..3ce87333660 --- /dev/null +++ b/src/schemas/json/partial-pytest.json @@ -0,0 +1,296 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/partial-pytest.json", + "description": "JSON schema for pytest configuration options under `[tool.pytest]` in `pyproject.toml`.", + "type": "object", + "properties": { + "ini_options": { + "$ref": "#/definitions/IniOptions", + "title": "Bridge Configuration Options for `pytest.ini` File", + "description": "The `ini_options` table is used as a bridge between the existing `pytest.ini` configuration system and future configuration formats. `pytest.ini` takes precedence over `[tool.pytest.ini_options]` in `pyproject.toml`." + } + }, + "additionalProperties": false, + "x-tombi-table-keys-order": "schema", + "definitions": { + "IniOptions": { + "type": "object", + "properties": { + "addopts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Extra command line options to be added by default.", + "x-tombi-array-values-order": "ascending" + }, + "cache_dir": { + "type": "string", + "description": "Sets directory for cache plugin. Can include environment variables.", + "default": ".pytest_cache" + }, + "consider_namespace_packages": { + "type": "boolean", + "description": "Controls whether pytest attempts to identify namespace packages.", + "default": false + }, + "console_output_style": { + "type": "string", + "enum": [ + "classic", + "progress", + "progress-even-when-capture-no", + "count" + ], + "description": "Sets console output style during test execution.", + "default": "progress" + }, + "doctest_encoding": { + "type": "string", + "description": "Sets default encoding for doctest files." + }, + "doctest_optionflags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specifies doctest flag names from the `doctest` module.", + "x-tombi-array-values-order": "ascending" + }, + "empty_parameter_set_mark": { + "type": "string", + "enum": ["skip", "xfail", "fail_at_collect"], + "description": "Defines behavior for empty parameter sets in parameterization.", + "default": "skip" + }, + "faulthandler_timeout": { + "type": "integer", + "description": "Sets timeout in seconds for dumping the traceback of all threads if a test takes too long." + }, + "filterwarnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Sets action to take for matching warnings. Each item is a warning specification string.", + "x-tombi-array-values-order": "ascending" + }, + "junit_duration_report": { + "type": "string", + "enum": ["total", "call"], + "description": "Sets how to record test durations in JUnit XML report.", + "default": "total" + }, + "junit_family": { + "type": "string", + "enum": ["xunit1", "xunit2"], + "description": "Sets format of generated JUnit XML files.", + "default": "xunit2" + }, + "junit_logging": { + "type": "string", + "enum": ["no", "log", "system-out", "system-err", "out-err", "all"], + "description": "Controls whether captured output is written to JUnit XML file.", + "default": "no" + }, + "junit_log_passing_tests": { + "type": "boolean", + "description": "If `junit_logging` is not 'no', controls whether to include output of passing tests.", + "default": true + }, + "junit_suite_name": { + "type": "string", + "description": "Sets name of root test suite in JUnit XML report." + }, + "log_auto_indent": { + "description": "Allows selective auto-indentation of multiline log messages. Can be true, false, positive integer, 'On', or 'Off'.", + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "string", + "enum": ["On", "Off"] + } + ] + }, + "log_cli": { + "type": "boolean", + "description": "Enables log display during test run (live logging).", + "default": false + }, + "log_cli_date_format": { + "type": "string", + "description": "Sets date format for live logging using `time.strftime()` format." + }, + "log_cli_format": { + "type": "string", + "description": "Sets message format for live logging using `logging` format." + }, + "log_cli_level": { + "$ref": "#/definitions/LogLevel", + "description": "Sets minimum log level for live logging. Can be level name or integer value." + }, + "log_date_format": { + "type": "string", + "description": "Sets date format for captured logging using `time.strftime()` format." + }, + "log_file": { + "type": "string", + "description": "Sets file path to write log messages to." + }, + "log_file_date_format": { + "type": "string", + "description": "Sets date format for log file using `time.strftime()` format." + }, + "log_file_format": { + "type": "string", + "description": "Sets message format for log file using `logging` format." + }, + "log_file_level": { + "$ref": "#/definitions/LogLevel", + "description": "Sets minimum log level for log file. Can be level name or integer value." + }, + "log_format": { + "type": "string", + "description": "Sets message format for captured logging using `logging` format." + }, + "log_level": { + "$ref": "#/definitions/LogLevel", + "description": "Sets minimum log level for captured logging. Can be level name or integer value." + }, + "markers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allows registering additional markers for test functions.", + "x-tombi-array-values-order": "ascending" + }, + "minversion": { + "type": "string", + "description": "Specifies minimum required pytest version." + }, + "norecursedirs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Sets base name patterns for directories to be skipped during test discovery. Uses fnmatch-style matching. Replaces default patterns.", + "x-tombi-array-values-order": "ascending" + }, + "python_classes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specifies name prefixes or glob patterns for identifying test classes.", + "x-tombi-array-values-order": "ascending" + }, + "python_files": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specifies glob patterns for identifying Python test module files.", + "default": ["test_*.py", "*_test.py"], + "x-tombi-array-values-order": "ascending" + }, + "python_functions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specifies name prefixes or glob patterns for identifying test functions and methods.", + "default": ["test_*"], + "x-tombi-array-values-order": "ascending" + }, + "pythonpath": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Sets list of directories to be added to the Python search path. Paths are relative to root directory.", + "x-tombi-array-values-order": "ascending" + }, + "required_plugins": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Space-separated list of plugins required to run pytest. Can include version specifiers.", + "x-tombi-array-values-order": "ascending" + }, + "testpaths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Sets directories to search for tests when no specific paths are given on the command line. Paths are relative to root directory. Shell-style wildcards can be used.", + "x-tombi-array-values-order": "ascending" + }, + "tmp_path_retention_count": { + "type": "integer", + "description": "Number of sessions to retain `tmp_path` directories for.", + "default": 3 + }, + "tmp_path_retention_policy": { + "type": "string", + "enum": ["all", "failed", "none"], + "description": "Controls which `tmp_path` directories to retain based on test outcome.", + "default": "all" + }, + "usefixtures": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of fixtures that will be applied to all test functions.", + "x-tombi-array-values-order": "ascending" + }, + "verbosity_assertions": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "string", + "enum": ["auto"] + } + ], + "description": "Sets verbosity specific to assertion-related output. Can be integer or 'auto'." + }, + "verbosity_test_cases": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "string", + "enum": ["auto"] + } + ], + "description": "Sets verbosity specific to test case execution output. Can be integer or 'auto'." + }, + "xfail_strict": { + "type": "boolean", + "description": "If true, test suite will fail if a test marked with `@pytest.mark.xfail` unexpectedly passes.", + "default": false + } + }, + "additionalProperties": false, + "x-tombi-table-keys-order": "schema" + }, + "LogLevel": { + "type": "string", + "enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] + } + } +} diff --git a/src/schemas/json/pyproject.json b/src/schemas/json/pyproject.json index dbc6903bcd7..f9bd1ae5d16 100644 --- a/src/schemas/json/pyproject.json +++ b/src/schemas/json/pyproject.json @@ -934,6 +934,11 @@ "title": "Static Type Checker", "description": "Static type checker for Python." }, + "pytest": { + "$ref": "https://json.schemastore.org/partial-pytest.json", + "title": "Testing Framework", + "description": "Standardized automated testing of Python packages" + }, "repo-review": { "$ref": "https://json.schemastore.org/partial-repo-review.json", "title": "Repository Reviewer", diff --git a/src/schemas/json/snowflake-config.json b/src/schemas/json/snowflake-config.json new file mode 100644 index 00000000000..fef18c1b6b3 --- /dev/null +++ b/src/schemas/json/snowflake-config.json @@ -0,0 +1,172 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/snowflake-config.json", + "x-tombi-toml-version": "1.0.0", + "type": "object", + "title": "Snowflake Config", + "description": "Configuration for Snowflake", + "properties": { + "default_connection_name": { + "title": "Default Connection", + "description": "The default connection to use", + "type": "string" + }, + "connections": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SnowflakeConnection" + }, + "minProperties": 1 + }, + "cli": { + "type": "object", + "properties": { + "logs": { + "$ref": "#/definitions/Logs" + }, + "features": { + "$ref": "#/definitions/Features" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "minProperties": 1, + "x-tombi-table-keys-order": "schema", + "definitions": { + "Features": { + "type": "object", + "title": "Features", + "description": "Configuration for features", + "properties": { + "enable_separate_authentication_policy_id": { + "type": "boolean", + "title": "Enable Separate Authentication Policy ID", + "description": "When this access is enabled, specified users can access Snowflake CLI but not the other Snowflake drivers.", + "default": false + } + }, + "additionalProperties": false, + "x-tombi-table-keys-order": "schema" + }, + "Logs": { + "type": "object", + "title": "Logs", + "description": "Configuration for logging", + "properties": { + "save_logs": { + "type": "boolean", + "title": "Save Logs", + "description": "Whether to save logs to a file", + "default": true + }, + "level": { + "title": "Level", + "description": "The level of logs to output", + "type": "string", + "default": "info", + "enum": ["debug", "info", "warning", "error"] + }, + "path": { + "type": "string", + "title": "Path", + "description": "specifies the absolute path to save the log files. The format of the path varies based on your operating system. If not specified, the command creates a logs directory in the default config.toml file location." + } + }, + "additionalProperties": false, + "x-tombi-table-keys-order": "schema" + }, + "SnowflakeConnection": { + "type": "object", + "title": "Snowflake Connection Configuration", + "description": "Configuration settings for connecting to a Snowflake database instance", + "properties": { + "account": { + "type": "string", + "title": "Account Identifier", + "description": "The Snowflake account identifier", + "examples": ["myaccount"] + }, + "user": { + "type": "string", + "title": "Username", + "description": "The username to authenticate with Snowflake", + "examples": ["jondoe"] + }, + "password": { + "type": "string", + "title": "Password", + "description": "The password for authentication with Snowflake", + "examples": ["******"] + }, + "warehouse": { + "type": "string", + "title": "Warehouse", + "description": "The name of the Snowflake warehouse to use for queries", + "examples": ["my-wh"] + }, + "database": { + "type": "string", + "title": "Database", + "description": "The name of the Snowflake database to connect to", + "examples": ["my_db"] + }, + "schema": { + "type": "string", + "title": "Schema", + "description": "The name of the database schema to use", + "examples": ["my_schema"] + }, + "role": { + "type": "string", + "title": "Role", + "description": "The name of the Snowflake role to use" + }, + "authenticator": { + "type": "string", + "title": "Authenticator", + "description": "The name of the Snowflake authenticator to use", + "enum": [ + "externalbrowser", + "id_token", + "no_auth", + "oauth", + "programmatic_access_token", + "snowflake_jwt", + "snowflake", + "username_password_mfa" + ], + "default": "snowflake" + }, + "private_key_file": { + "type": "string", + "title": "Private Key File for JWT Authentication", + "description": "The path to the private key file for the Snowflake JWT Authentication" + }, + "private_key_file_pwd": { + "type": "string", + "title": "Private Key File Password for JWT Authentication", + "description": "The password for the private key file for the Snowflake JWT Authentication" + }, + "private_key_path": { + "type": "string", + "title": "Private Key Path for Key Pair Authentication", + "description": "The path to the private key file for the Snowflake Key Pair Authentication" + }, + "private_key_passphrase": { + "type": "string", + "title": "Private Key Passphrase for Key Pair Authentication", + "description": "The passphrase for the private key file for the Snowflake Key Pair Authentication" + }, + "token_file_path": { + "type": "string", + "title": "Token File Path for OAuth", + "description": "The path to the token file for the Snowflake OAuth Authentication" + } + }, + "additionalProperties": true, + "x-tombi-table-keys-order": "schema" + } + } +} diff --git a/src/schemas/json/snowflake-connections.json b/src/schemas/json/snowflake-connections.json new file mode 100644 index 00000000000..5a9efcc1063 --- /dev/null +++ b/src/schemas/json/snowflake-connections.json @@ -0,0 +1,110 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/snowflake-connections.json", + "x-tombi-toml-version": "1.0.0", + "type": "object", + "properties": { + "default": { + "$ref": "#/definitions/SnowflakeConnection", + "title": "Default Connection", + "description": "The default connection to use" + } + }, + "additionalProperties": { + "$ref": "#/definitions/SnowflakeConnection" + }, + "minProperties": 1, + "definitions": { + "SnowflakeConnection": { + "type": "object", + "title": "Snowflake Connection Configuration", + "description": "Configuration settings for connecting to a Snowflake database instance", + "properties": { + "account": { + "type": "string", + "title": "Account Identifier", + "description": "The Snowflake account identifier", + "examples": ["myaccount"] + }, + "user": { + "type": "string", + "title": "Username", + "description": "The username to authenticate with Snowflake", + "examples": ["jondoe"] + }, + "password": { + "type": "string", + "title": "Password", + "description": "The password for authentication with Snowflake", + "examples": ["******"] + }, + "warehouse": { + "type": "string", + "title": "Warehouse", + "description": "The name of the Snowflake warehouse to use for queries", + "examples": ["my-wh"] + }, + "database": { + "type": "string", + "title": "Database", + "description": "The name of the Snowflake database to connect to", + "examples": ["my_db"] + }, + "schema": { + "type": "string", + "title": "Schema", + "description": "The name of the database schema to use", + "examples": ["my_schema"] + }, + "role": { + "type": "string", + "title": "Role", + "description": "The name of the Snowflake role to use" + }, + "authenticator": { + "type": "string", + "title": "Authenticator", + "description": "The name of the Snowflake authenticator to use", + "enum": [ + "externalbrowser", + "id_token", + "no_auth", + "oauth", + "programmatic_access_token", + "snowflake_jwt", + "snowflake", + "username_password_mfa" + ], + "default": "snowflake" + }, + "private_key_file": { + "type": "string", + "title": "Private Key File for JWT Authentication", + "description": "The path to the private key file for the Snowflake JWT Authentication" + }, + "private_key_file_pwd": { + "type": "string", + "title": "Private Key File Password for JWT Authentication", + "description": "The password for the private key file for the Snowflake JWT Authentication" + }, + "private_key_path": { + "type": "string", + "title": "Private Key Path for Key Pair Authentication", + "description": "The path to the private key file for the Snowflake Key Pair Authentication" + }, + "private_key_passphrase": { + "type": "string", + "title": "Private Key Passphrase for Key Pair Authentication", + "description": "The passphrase for the private key file for the Snowflake Key Pair Authentication" + }, + "token_file_path": { + "type": "string", + "title": "Token File Path for OAuth", + "description": "The path to the token file for the Snowflake OAuth Authentication" + } + }, + "additionalProperties": true, + "x-tombi-table-keys-order": "schema" + } + } +}