This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-ai.git
The following commit(s) were added to refs/heads/main by this push:
new e403108 refactor(vermeer): use uv to manage pkgs & update README
(#272)
e403108 is described below
commit e403108710ff8a7adb68e38c795940fb41c4c3ce
Author: imbajin <[email protected]>
AuthorDate: Wed Jun 11 21:18:19 2025 +0800
refactor(vermeer): use uv to manage pkgs & update README (#272)
This commit introduces the following changes to the
`vermeer-python-client` module:
1. **Build System Update:**
* Replaced `setup.py` and `requirements.txt` with a `pyproject.toml`
file.
* This aligns the project structure with other modules in the repository
that use `uv` for dependency management and `setuptools` for building.
* Dependencies from `requirements.txt` have been moved into
`pyproject.toml`.
2. **README Update:**
* Removed TODO markers from the `README.md` file.
* Added comprehensive installation instructions, including how to
install using `uv pip install .` (for regular install) and `uv pip
install -e .` (for editable/development install).
* Added placeholder sections for client usage examples, including client
initialization, running graph algorithms, and managing jobs. These
examples will need to be filled in with specific code for the
`vermeer-python-client`.
* Updated contribution and contact information to be consistent with
other modules.
---
vermeer-python-client/README.md | 71 ++++++++++++++++++++++++++++++----
vermeer-python-client/pyproject.toml | 53 +++++++++++++++++++++++++
vermeer-python-client/requirements.txt | 7 ----
vermeer-python-client/setup.py | 42 --------------------
4 files changed, 117 insertions(+), 56 deletions(-)
diff --git a/vermeer-python-client/README.md b/vermeer-python-client/README.md
index 83c0cc2..818feff 100644
--- a/vermeer-python-client/README.md
+++ b/vermeer-python-client/README.md
@@ -2,13 +2,16 @@
The `vermeer-python-client` is a Python client(SDK) for
[Vermeer](https://github.com/apache/incubator-hugegraph-computer/tree/master/vermeer#readme)
(A high-performance distributed graph computing platform based on memory,
supporting more than 15 graph algorithms, custom algorithm extensions, and
custom data source access & easy to deploy and use)
-
## Installation
-To install the `vermeer-python-client`, you can use `pip/uv` or **source code
building**:
+### Install the released package (🚧 ing)
+
+To install the `vermeer-python-client`, you can use uv/pip:
```bash
-#todo
+# uv is optional, you can use pip directly
+# uv pip install vermeer-python-client (Not published yet 🚧ing)
+# Note: This will install the latest released version. For the newest code,
please install from source.
```
### Install from Source (Latest Code)
@@ -16,11 +19,65 @@ To install the `vermeer-python-client`, you can use
`pip/uv` or **source code b
To install from the source, clone the repository and install the required
dependencies:
```bash
-#todo
+git clone https://github.com/apache/incubator-hugegraph-ai.git
+cd incubator-hugegraph-ai/vermeer-python-client
+
+# Normal install
+uv pip install .
+
+# (Optional) install the devel version
+uv pip install -e .
```
## Usage
-```bash
-#todo
-```
\ No newline at end of file
+This section provides examples of how to use the `vermeer-python-client`.
+
+**Note:** The following examples are placeholders. Please replace them with
actual usage scenarios for the `vermeer-python-client`.
+
+### Initialize the Client
+
+```python
+from pyvermeer.client import VermeerClient
+
+# Initialize the client
+client = VermeerClient(host="127.0.0.1", port="8080")
+print("Client initialized successfully.")
+```
+
+### Example: Running a Graph Algorithm
+
+```python
+# Placeholder for running a graph algorithm example
+try:
+ result = client.run_algorithm(name="pagerank", params={"alpha": 0.85,
"max_iter": 10})
+ print(f"PageRank results: {result}")
+except Exception as e:
+ print(f"Error running algorithm: {e}")
+```
+
+### Example: Managing Jobs
+
+```python
+# Placeholder for managing jobs example
+try:
+ job_status = client.get_job_status(job_id="some_job_id")
+ print(f"Job status: {job_status}")
+except Exception as e:
+ print(f"Error getting job status: {e}")
+```
+
+Other info is under 🚧 (Welcome to add more docs for it)
+
+## Contributing
+
+* Welcome to contribute to `vermeer-python-client`. Please see the
[Guidelines](https://hugegraph.apache.org/docs/contribution-guidelines/) for
more information.
+* Code format: Please run `./style/code_format_and_analysis.sh` to format your
code before submitting a PR.
+
+Thank you to all the people who already contributed to `vermeer-python-client`!
+
+## Contact Us
+
+* [GitHub Issues](https://github.com/apache/incubator-hugegraph-ai/issues):
Feedback on usage issues and functional requirements (quick response)
+* Feedback Email:
[[email protected]](mailto:[email protected]) (subscriber only)
+```
diff --git a/vermeer-python-client/pyproject.toml
b/vermeer-python-client/pyproject.toml
new file mode 100644
index 0000000..2fd2391
--- /dev/null
+++ b/vermeer-python-client/pyproject.toml
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[project]
+name = "vermeer-python-client"
+version = "1.5.0"
+description = "A Python SDK for Apache Vermeer."
+authors = [
+ { name = "Apache HugeGraph Contributors", email =
"[email protected]" },
+]
+readme = "README.md"
+license = "Apache-2.0"
+requires-python = ">=3.9"
+dependencies = [
+ "decorator~=5.1.1",
+ "requests~=2.32.0",
+ "urllib3~=2.2.2",
+]
+
+[project.urls]
+"Homepage" = "https://github.com/apache/incubator-hugegraph-ai"
+"Repository" = "https://github.com/apache/incubator-hugegraph-ai"
+"Bug Tracker" = "https://github.com/apache/incubator-hugegraph-ai/issues"
+
+[project.optional-dependencies]
+dev = [
+ "pytest>=7.0.0",
+ "black>=23.0.0",
+ "isort>=5.0.0",
+ "flake8>=6.0.0",
+]
+
+[build-system]
+requires = ["setuptools>=61.0"]
+build-backend = "setuptools.build_meta"
+
+[tool.setuptools.packages.find]
+where = ["src"]
+exclude = ["tests"]
diff --git a/vermeer-python-client/requirements.txt
b/vermeer-python-client/requirements.txt
deleted file mode 100644
index 30b82d7..0000000
--- a/vermeer-python-client/requirements.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# TODO: replace pip/current file to uv
-decorator~=5.1.1
-requests~=2.32.0
-setuptools~=78.1.1
-urllib3~=2.2.2
-rich~=13.9.4
-python-dateutil~=2.9.0
diff --git a/vermeer-python-client/setup.py b/vermeer-python-client/setup.py
deleted file mode 100644
index 753d897..0000000
--- a/vermeer-python-client/setup.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-import setuptools
-from pkg_resources import parse_requirements
-
-# TODO: replace/delete current file by uv
-with open("README.md", "r", encoding="utf-8") as fh:
- long_description = fh.read()
-
-with open("requirements.txt", encoding="utf-8") as fp:
- install_requires = [str(requirement) for requirement in
parse_requirements(fp)]
-
-setuptools.setup(
- name="vermeer-python",
- version="0.1.0",
- install_requires=install_requires,
- long_description=long_description,
- long_description_content_type="text/markdown",
- packages=setuptools.find_packages(where="src", exclude=["tests"]),
- package_dir={"": "src"},
- classifiers=[
- "Programming Language :: Python :: 3",
- "License :: OSI Approved :: Apache Software License",
- "Operating System :: OS Independent",
- ],
- python_requires=">=3.9",
-)