FrancescoCastaldi commented on code in PR #43695:
URL: https://github.com/apache/superset/pull/43695#discussion_r4256746357
##########
superset/db_engine_specs/ibmi.py:
##########
@@ -14,20 +14,41 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+from superset.db_engine_specs.base import DatabaseCategory
+
from .db2 import Db2EngineSpec
class IBMiEngineSpec(Db2EngineSpec):
- """IBM Db2 for i (AS/400) engine spec.
-
- Note: Documentation is in Db2EngineSpec's compatible_databases section.
- This spec exists for runtime support of the ibmi driver.
- """
+ """IBM Db2 for i (AS/400) engine spec."""
engine = "ibmi"
engine_name = "IBM Db2 for i"
max_column_name_length = 128
+ metadata = {
+ "description": (
+ "IBM Db2 for i (formerly AS/400) is an integrated relational
database "
+ "engine on IBM Power systems running IBM i."
+ ),
+ "logo": "ibm-db2.svg",
+ "homepage_url": "https://www.ibm.com/products/db2-for-i",
+ "categories": [
+ DatabaseCategory.TRADITIONAL_RDBMS,
+ DatabaseCategory.PROPRIETARY,
+ ],
+ "pypi_packages": ["sqlalchemy-ibmi"],
+ "connection_string": "ibmi://{username}:{password}@{host}/{database}",
+ "parameters": {
+ "username": "IBM i username",
+ "password": "IBM i password",
+ "host": "IBM i system host",
+ "database": "Library/schema name",
Review Comment:
Updated. The parameter description in `ibmi.py` now specifies 'RDB name'
instead of 'Library/schema name'.
##########
superset/db_engine_specs/lint_metadata.py:
##########
@@ -272,10 +276,17 @@ def get_all_engine_specs_ast() -> list[dict[str, Any]]:
# noqa: C901
if isinstance(item, ast.Assign):
for target in item.targets:
if isinstance(target, ast.Name) and target.id ==
"engine":
- # Check if engine value is non-empty string
if isinstance(item.value, ast.Constant):
has_non_empty_engine =
bool(item.value.value)
break
+ elif isinstance(item, ast.AnnAssign):
+ if (
+ isinstance(item.target, ast.Name)
+ and item.target.id == "engine"
+ ):
+ if isinstance(item.value, ast.Constant):
+ has_non_empty_engine = bool(item.value.value)
+ break
Review Comment:
Updated. The AST visitor now skips bare annotations without an initial value
and keeps scanning for subsequent assignments, with regression coverage added
for declaration followed by assignment.
##########
superset/db_engine_specs/parseable.py:
##########
@@ -41,11 +41,14 @@ class ParseableEngineSpec(BaseEngineSpec):
"Parseable is a distributed log analytics database "
"with SQL-like query interface."
),
+ "logo": "parseable.png",
+ "homepage_url": "https://www.parseable.com",
"categories": [DatabaseCategory.SEARCH_NOSQL,
DatabaseCategory.OPEN_SOURCE],
"pypi_packages": ["sqlalchemy-parseable"],
"connection_string": (
"parseable://{username}:{password}@{hostname}:{port}/{stream_name}"
),
+ "default_port": 8000,
Review Comment:
Updated. Set the connection string template to
`parseable+http://{username}:{password}@{hostname}:{port}/{stream_name}` to
match the default port 8000.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]