This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git


The following commit(s) were added to refs/heads/main by this push:
     new 374ee1c02 chore(python): define dependencies for development 
environment (#3360)
374ee1c02 is described below

commit 374ee1c02d98c3f1fba94808b61006f106fd1958
Author: Yuta Sakuma <[email protected]>
AuthorDate: Thu Feb 19 00:03:22 2026 +0900

    chore(python): define dependencies for development environment (#3360)
    
    ## Why?
    
    While I was setting up fory python environment by following the
    documentation, pytest failed becasue some of the dependent tools have
    not installed. (e.g. ModuleNotFoundError for numpy, pandas)
    
    ## What does this PR do?
    
    - Added [project.optional-dependencies].dev to pyproject.toml with all
    necessary tools (pytest, numpy, pandas, ruff, etc.).
    - Simplify documentation for easier setup.
    
    ## Related issues
    
    
    
    ## Does this PR introduce any user-facing change?
    
    
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
---
 python/CONTRIBUTING.md | 11 +++++++----
 python/README.md       | 20 +-------------------
 python/pyproject.toml  | 10 +++++++++-
 3 files changed, 17 insertions(+), 24 deletions(-)

diff --git a/python/CONTRIBUTING.md b/python/CONTRIBUTING.md
index eecb4d73e..982b23b10 100644
--- a/python/CONTRIBUTING.md
+++ b/python/CONTRIBUTING.md
@@ -9,9 +9,8 @@ cd python
 # Uninstall numpy first so that when we install pyarrow, it will install the 
correct numpy version automatically.
 # For Python versions less than 3.13, numpy 2 is not currently supported.
 pip uninstall -y numpy
-# Install necessary environment for Python.
-pip install pyarrow Cython wheel pytest
-pip install -v -e .
+# Install development environment for Python
+pip install -v -e ".[dev,format]"
 ```
 
 If the last steps fails with an error like `libarrow_python.dylib: No such 
file or directory`,
@@ -29,6 +28,9 @@ temporary directory it was the last time bazel ran. To remedy 
this run
 ```bash
 cd python
 pytest -v -s .
+
+# Run specific test
+pytest -v -s pyfory/tests/test_serializer.py
 ```
 
 ## Formatting
@@ -36,7 +38,8 @@ pytest -v -s .
 ```bash
 cd python
 pip install ruff
-ruff format python
+ruff format .
+ruff check --fix .
 ```
 
 ## Debugging
diff --git a/python/README.md b/python/README.md
index df8f0e969..ee5215f0e 100644
--- a/python/README.md
+++ b/python/README.md
@@ -1318,25 +1318,7 @@ Apache Fory™ is an open-source project under the Apache 
Software Foundation. W
 3. **Improve Docs**: Documentation improvements are always welcome
 4. **Submit Code**: See our [Contributing 
Guide](https://github.com/apache/fory/blob/main/CONTRIBUTING.md)
 
-### Development Setup
-
-```bash
-git clone https://github.com/apache/fory.git
-cd fory/python
-
-# Install dependencies
-pip install -e ".[dev,format]"
-
-# Run tests
-pytest -v -s .
-
-# Run specific test
-pytest -v -s pyfory/tests/test_serializer.py
-
-# Format code
-ruff format .
-ruff check --fix .
-```
+> **For Contributors**: See [CONTRIBUTING.md](CONTRIBUTING.md) for 
comprehensive development setup instructions
 
 ## 📄 License
 
diff --git a/python/pyproject.toml b/python/pyproject.toml
index 6d1d2eb36..7d8ec8e6d 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -55,7 +55,15 @@ dependencies = [
 [project.optional-dependencies]
 format = ["pyarrow"]
 all = ["pyarrow"]
-dev = ["ruff"]
+dev = [
+    "ruff",
+    "pytest",
+    "setuptools>=45",
+    "wheel",
+    "Cython>=0.29",
+    "numpy",
+    "pandas",
+]
 
 [tool.setuptools]
 packages = ["pyfory", "pyfory.format", "pyfory.lib", "pyfory.lib.mmh3", 
"pyfory.meta"]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to