diff --git a/VERSION b/VERSION index b82608c0bb54..6e8bf73aa550 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.1.0 +0.1.0 diff --git a/coordinator/gscoordinator/coordinator.py b/coordinator/gscoordinator/coordinator.py index 5e6df9d4d40b..102a04f70ad6 100644 --- a/coordinator/gscoordinator/coordinator.py +++ b/coordinator/gscoordinator/coordinator.py @@ -42,7 +42,6 @@ # capture system stdout sys.stdout = StdoutWrapper(sys.stdout) -from daemons.prefab import run from graphscope import __version__ from graphscope.proto import attr_value_pb2 from graphscope.proto import coordinator_service_pb2_grpc diff --git a/coordinator/setup.py b/coordinator/setup.py index 2bc00ae4ffbb..b05d1013b118 100644 --- a/coordinator/setup.py +++ b/coordinator/setup.py @@ -22,6 +22,7 @@ import sys from distutils.cmd import Command +from graphscope import __version__ from setuptools import find_packages from setuptools import setup from setuptools.command.build_py import build_py @@ -140,7 +141,7 @@ def parsed_dev_reqs(): setup( name="gscoordinator", - version="0.1", + version=__version__, description="", long_description=long_description, long_description_content_type="text/markdown", diff --git a/interactive_engine/tests/function_test.sh b/interactive_engine/tests/function_test.sh index 27d14f3ef46d..cbc2ff9cf49f 100755 --- a/interactive_engine/tests/function_test.sh +++ b/interactive_engine/tests/function_test.sh @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. curdir=$(cd "$(dirname "$0")"; pwd) -__version__=`cat ${curdir}/../../VERSION` +version=$(cat ${curdir}/../../VERSION) + tmp_result="$curdir/tmp_result" function _start { _port=$1 @@ -21,10 +22,10 @@ function _start { gs_image=$3 gie_manager_image=$4 if [ -z "$gs_image" ]; then - gs_image="registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${__version__}" + gs_image="registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${version}" fi if [ -z "$gie_manager_image" ]; then - gie_manager_image="registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${__version__}" + gie_manager_image="registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${version}" fi export GS_TEST_DIR=$curdir/src/main/resources diff --git a/python/graphscope/__init__.py b/python/graphscope/__init__.py index c2bb61e9e34f..be8e4e889c4a 100644 --- a/python/graphscope/__init__.py +++ b/python/graphscope/__init__.py @@ -16,7 +16,6 @@ # limitations under the License. # -from graphscope._version import __version__ from graphscope.analytical.app import * from graphscope.analytical.udf import declare from graphscope.analytical.udf.types import Vertex @@ -29,3 +28,4 @@ from graphscope.framework.graph import Graph from graphscope.framework.graph_utils import g from graphscope.framework.graph_utils import load_from +from graphscope.version import __version__ diff --git a/python/graphscope/config.py b/python/graphscope/config.py index 9b733c5a6c98..bf1ccc2081e1 100644 --- a/python/graphscope/config.py +++ b/python/graphscope/config.py @@ -19,7 +19,7 @@ """ GraphScope default configuration. """ -from graphscope._version import __version__ +from graphscope.version import __version__ class GSConfig(object): diff --git a/python/graphscope/_version.py b/python/graphscope/version.py similarity index 97% rename from python/graphscope/_version.py rename to python/graphscope/version.py index 38cf5fd33299..84d93d19eb8c 100644 --- a/python/graphscope/_version.py +++ b/python/graphscope/version.py @@ -25,5 +25,5 @@ try: with open(os.path.join(git_root, "VERSION")) as f: __version__ = f.readline().rstrip() -except: # noqa: E722 +except OSError: __version__ == "latest" diff --git a/python/setup.py b/python/setup.py index 0b311c0e9cb5..7c150d2d6f5a 100644 --- a/python/setup.py +++ b/python/setup.py @@ -29,6 +29,8 @@ from setuptools.command.sdist import sdist from wheel.bdist_wheel import bdist_wheel +from graphscope import __version__ + repo_root = os.path.dirname(os.path.abspath(__file__)) @@ -237,7 +239,7 @@ def build_learning_engine(): setup( name="graphscope", - version="0.1", + version=__version__, description="GraphScope: A One-Stop Large-Scale Graph Computing System from Alibaba", long_description=long_description, long_description_content_type="text/markdown", diff --git a/scripts/prepare_env.sh b/scripts/prepare_env.sh index eafc8c30b68e..b6e3e23a3bff 100755 --- a/scripts/prepare_env.sh +++ b/scripts/prepare_env.sh @@ -7,7 +7,7 @@ set -x set -o pipefail graphscope_home="$( cd "$(dirname "$0")/.." >/dev/null 2>&1 ; pwd -P )" -__version__=`cat ${graphscope_home}/VERSION` +version=$(cat ${graphscope_home}/VERSION) platform=$(awk -F= '/^NAME/{print $2}' /etc/os-release) is_in_wsl=false && [[ ! -z "${IS_WSL}" || ! -z "${WSL_DISTRO_NAME}" ]] && is_in_wsl=true @@ -98,16 +98,16 @@ function launch_k8s_cluster() { function pull_images() { echo "$(date '+%Y-%m-%d %H:%M:%S') pulling GraphScope images." - sudo docker pull registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${__version__} || true - sudo docker pull registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${__version__} || true + sudo docker pull registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${version} || true + sudo docker pull registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${version} || true sudo docker pull zookeeper:3.4.14 || true sudo docker pull quay.io/coreos/etcd:v3.4.13 || true echo "$(date '+%Y-%m-%d %H:%M:%S') images pulled successfully." if [[ "${is_in_wsl}" = true ]]; then echo "$(date '+%Y-%m-%d %H:%M:%S') loading images into kind cluster." - sudo kind load registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${__version__} || true - sudo kind load registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${__version__} || true + sudo kind load registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${version} || true + sudo kind load registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${version} || true sudo kind load zookeeper:3.4.14 || true sudo kind load quay.io/coreos/etcd:v3.4.13 || true echo "$(date '+%Y-%m-%d %H:%M:%S') images loaded." diff --git a/scripts/test.sh b/scripts/test.sh index f8d1ee8c0b83..b537c3662ab9 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -6,13 +6,13 @@ set -euo pipefail # initialize variables graphscope_home="$( cd "$(dirname "$0")/.." >/dev/null 2>&1 ; pwd -P )" -__version__=`cat ${graphscope_home}/VERSION` +version=$(cat ${graphscope_home}/VERSION) platform=$(awk -F= '/^NAME/{print $2}' /etc/os-release) test_dir="" -gs_image="registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${__version__}" -gie_manager_image="registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${__version__}" +gs_image="registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${version}" +gie_manager_image="registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${version}" test_GIE=0 test_on_k8s=0