diff --git a/cpp/src/gis/gis_functions.cpp b/cpp/src/gis/gis_functions.cpp index 347d56eef..4da3e0663 100644 --- a/cpp/src/gis/gis_functions.cpp +++ b/cpp/src/gis/gis_functions.cpp @@ -344,7 +344,7 @@ std::shared_ptr ST_Envelope_Aggr( /*************************** AGGREGATE FUNCTIONS ***************************/ std::string GIS_Version() { - const std::string info = "gis version : " + std::string(LIB_VERSION) + "\n" + + const std::string info = "version : " + std::string(LIB_VERSION) + "\n" + #ifdef USE_GPU "build type : " + CMAKE_BUILD_TYPE + "/GPU \n" + #else diff --git a/python/arctern/_wrapper_func.py b/python/arctern/_wrapper_func.py index c9e8c8832..b25fd52cb 100644 --- a/python/arctern/_wrapper_func.py +++ b/python/arctern/_wrapper_func.py @@ -1533,8 +1533,18 @@ def fishnet_map_layer(vega, points, weights, transform=True): rs = arctern_core_.fishnet_map(vega_string, geos_rs, weights_rs) return base64.b64encode(rs.buffers()[1].to_pybytes()) -def version(): +def version(verbose=False): """ - :return: version of arctern + Return the information of arctern version. + + :type verbose: bool + :param verbose: whether to get other information besides version + + :rtype: str + :return: Information of arctern version. """ - return arctern_core_.GIS_Version().decode("utf-8") + full_version_info = arctern_core_.GIS_Version().decode("utf-8") + if verbose: + return full_version_info + only_versin_info = full_version_info.split("\n")[0] + return only_versin_info diff --git a/spark/pyspark/arctern_pyspark/__init__.py b/spark/pyspark/arctern_pyspark/__init__.py index 541cea3bd..22df69052 100644 --- a/spark/pyspark/arctern_pyspark/__init__.py +++ b/spark/pyspark/arctern_pyspark/__init__.py @@ -17,9 +17,15 @@ from .gis_func import * from .plot import plot -def version(): +def version(verbose=False): """ - :return: version of arctern_pyspark + Return the information of arctern_pyspark version. + + :type verbose: bool + :param verbose: whether to get other information besides version + + :rtype: str + :return: Information of arctern_pyspark version. """ import arctern - return arctern.version() + return arctern.version(verbose)