Skip to content

Feature Request: Make GNEprop installable as a Python package #1

Description

@huguesva

Feature Request

It would be great if GNEprop could be installed directly as a Python package using pip. This would simplify integration into other projects and improve usability.

Current Situation

Currently, to use GNEprop, users need to:

  1. Clone the repository manually
  2. Set up the Python path or PYTHONPATH to import modules
  3. Manage the dependency installation separately

Proposed Solution

Add packaging configuration files to make GNEprop pip-installable:

Option 1: Add a setup.py:

from setuptools import setup, find_packages

setup(
    name="gneprop",
    version="0.1.0",
    packages=find_packages(),
    install_requires=[
        "torch>=2.0.1",
        "torch-geometric>=2.4.0",
        "dgl>=2.1.0",
        "dgllife>=0.3.2",
        "rdkit>=2023.3.2",
        "pytorch-lightning>=1.9.5",
        # ... other dependencies from environment.yml
    ],
    python_requires=">=3.8",
)

Option 2: Add a pyproject.toml:

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "gneprop"
version = "0.1.0"
dependencies = [
    "torch>=2.0.1",
    "torch-geometric>=2.4.0",
    # ... other dependencies
]

Benefits

  1. Easy installation: pip install git+https://github.com/Genentech/gneprop.git
  2. Better dependency management: pip handles all dependencies automatically
  3. Cleaner imports: No need to manipulate sys.path or set environment variables
  4. Integration friendly: Easier to include GNEprop in other projects' requirements

Example Usage After Implementation

# Install directly from GitHub
pip install git+https://github.com/Genentech/gneprop.git

# Or in requirements.txt / pyproject.toml
gneprop @ git+https://github.com/Genentech/gneprop.git
# Clean imports without path manipulation
from gneprop.models import GNEpropGIN
from gneprop.featurization import smiles_to_data

This enhancement would make GNEprop more accessible to the community and easier to integrate into downstream applications.

Thank you for considering this feature request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions