Overview
HeXtractor is a tool designed to automatically convert selected data in tabular format into a PyTorch Geometric heterogeneous graph. As research into graph neural networks (GNNs) expands, the importance of heterogeneous graphs grows. However, data often comes in tabular form, and manually transforming this data into graph format can be tedious and error-prone. HeXtractor aims to streamline this process, providing researchers and practitioners with a more efficient workflow.
Features
- Automatic Conversion: Converts tabular data into heterogeneous graphs suitable for GNNs.
- Support for Multiple Formats: Handles various tabular data formats with ease.
- Integration with PyTorch Geometric: Directly creates graphs that can be used with PyTorch Geometric.
- isualization: Utilizes NetworkX and PyVis for graph visualization.
Why HeXtractor?
Heterogeneous graphs are crucial in many applications of graph neural networks, yet creating them from tabular data manually is often cumbersome. HeXtractor automates this process, allowing researchers to focus on developing and training their models instead of data preprocessing.
Technologies
Python: The primary programming language used for HeXtractor.pandas: Utilized for data manipulation and handling tabular data.PyTorchGeometric: Framework for creating and working with graph neural networks.NetworkX: Used for creating and managing complex graph structures.PyVis: Enables interactive visualization of graphs.
Installation
HeXtractor can be installed either from PyPI (recommended for most users) or from source code (recommended for developers or if you need the latest features).
From PyPI
To install the latest version from PyPI run:
pip install hextractor
From Source Code
To install HeXtractor from source, you'll first need to clone the repository:
git clone https://github.com/maddataanalyst/hextractor.git
cd hextractor
You can then install it using either conda or any standard Python virtual environment. We use Poetry as our primary dependency manager because it provides robust dependency resolution, reproducible builds, and better package management.
Option 1: Using Conda
- If you prefer Conda for environment management:
# Create a new conda environment from the provided file
conda env create -f environment.yml
# Activate the environment
conda activate hextractor
# Install poetry inside the conda environment
pip install poetry
# Install the package with all dependencies
poetry install --with dev --with research
Option 2: Using Standard Python Virtual Environment
- Create and activate a virtual environment using your preferred method:
# Using venv (Python 3.3+)
python -m venv hextractor-env
source hextractor-env/bin/activate # On Windows: hextractor-env\Scripts\activate
# Or using virtualenv
virtualenv hextractor-env
source hextractor-env/bin/activate # On Windows: hextractor-env\Scripts\activate
- Install Poetry and the package:
# Install poetry
pip install poetry
# Install the package with all dependencies
poetry install --with dev --with research
Remember to activate your environment (conda or virtual environment) whenever you want to use HeXtractor.
Documentation
You can find an official, detailed documentation here.
Contributing and help
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
- Reporting bugs;
- Fixing bugs;
- Implementing features;
- Writing documentation;
- Submitting feedback.
Detailed contribution and community guidelines can be found in the CONTRIBUTING.rst file.
Metadata
Release files for hextractor 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hextractor-1.0.2.tar.gz | 19.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hextractor-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.1 kB
Release files / hextractor-1.0.2.tar.gz
| Download URL | hextractor-1.0.2.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4f02cbb692e5cde45aaf33ce7ba58548917dfc84b83199c747ae713b793f20c
|
|
BLAKE2b-256 checksum How to use checksums |
3b5eab6bc299e43aa8f317a97528349a5e553bbf3ab803f3044d90ca3f7971d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Linux/6.8.0-60-generic
|
Release files / hextractor-1.0.2-py3-none-any.whl
| Download URL | hextractor-1.0.2-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95dc5f0a32adec76e9555fa30925f1b654ba51c25a65d0e1acd50449712be91b
|
|
BLAKE2b-256 checksum How to use checksums |
9c0237a6ef5e9358f239067a29bd13d498c475f3c3a77b36750dd5bbc4177527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Linux/6.8.0-60-generic
|