yangxk1 opened a new pull request, #799:
URL: https://github.com/apache/incubator-graphar/pull/799

   <!--
   Thanks for contributing to GraphAr.
   If this is your first pull request you can find detailed information on 
[CONTRIBUTING.md](https://github.com/apache/graphar/blob/main/CONTRIBUTING.md)
   
   The Apache GraphAr (incubating) community has restrictions on the naming of 
pr title. You can find instructions in
   
[CONTRIBUTING.md](https://github.com/apache/graphar/blob/main/CONTRIBUTING.md#title)
 too.
   -->
   
   ### Reason for this PR
   <!-- 
   Why are you proposing this change? If this is already tracked in an issue, 
please link to the issue here.
   Explaining clearly why this change is beneficial is important for the 
reviewers to understand the context.
   -->
   
   This PR refactors and enhances the Python module of Apache GraphAr 
(incubating), transforming it from a CLI-only tool into a full-featured Python 
SDK with both programmatic APIs and a command-line interface.
   
   The original Python implementation was tightly coupled as a CLI utility 
(graphar_cli). To support broader use cases—such as integration into data 
pipelines, Jupyter notebooks, and Python-based graph applications—this PR 
restructures the module into a proper SDK while preserving and improving CLI 
functionality.
   
   ### What changes are included in this PR?
   <!-- 
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   close #798 
   **Module restructuring:** The `cli/` directory is renamed to `python/`, and 
internal code is reorganized into logical packages:
   - `graphar/`: Core Python API (e.g., GraphInfo, VertexInfo, EdgeInfo)
   - `client/`: CLI implementation (graphar command)
   - `graphar/importer/`: Data import utilities
   
   **New public APIs:** Exposes C++ GraphAr types (e.g., `Type`, `FileType`, 
`AdjListType`) and metadata classes via pybind11 bindings, enabling 
programmatic access to GraphAr metadata.
   
   **Improved CLI:**
   - Adds `--version` flag
   - Updates CI workflows to test both CLI and SDK
   
   **Testing:**
   - Adds comprehensive unit tests for `GraphInfo`, `vertex`/`edge` metadata, 
and `propertyGroups`
   - Includes CLI integration tests
   - Enables pytest in CI for both Ubuntu and macOS
   
   ### Are these changes tested?
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   yes, add pytest methods
   ### Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   YES
   Users can now import graphar and use APIs to read GraphAr metadata
   
   ```
   import graphar
   
   graphar.graph_info.GraphInfo.load(graph_path)
   ```
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line 
below and explain which changes are breaking.
   -->
   <!-- **BREAKING CHANGE: <description>** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix 
either
   (a) a security vulnerability,
   (b) a bug that caused incorrect or invalid data to be produced, or
   (c) a bug that causes a crash (even when the API contract is upheld). 
   We use this to highlight fixes to issues that may affect users without their 
knowledge. For this reason, fixing bugs that cause errors don't count, since 
those are usually obvious.
   -->
   <!-- **Critical Fix: <description>** -->
   


-- 
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]

Reply via email to