Skip to content

CF-Random PyPi Package#1

Open
prameshsharma25 wants to merge 59 commits into
mainfrom
py-package
Open

CF-Random PyPi Package#1
prameshsharma25 wants to merge 59 commits into
mainfrom
py-package

Conversation

@prameshsharma25
Copy link
Copy Markdown
Collaborator

@prameshsharma25 prameshsharma25 commented May 5, 2026

CF-Random: Convert to Installable Python Package

Summary

Converts CF-Random from a collection of ad-hoc scripts into a properly structured, pip-installable Python package following PEP 517/518 standards. This makes the tool significantly easier to install, use as a library, and distribute to the broader scientific community.


Motivation

Previously, using CF-Random required manual path management and script-level execution with no standard installation procedure. This PR removes that friction by:

  • Enabling single-command installation: pip install .
  • Exposing CF-Random as an importable library (import cf_random)
  • Providing a cf-random CLI entry point for command-line workflows
  • Centralizing all dependencies for reproducible environments
  • Laying the groundwork for future PyPI distribution (pip install cf-random)

Changes

New files

File Purpose
pyproject.toml PEP 517/518 build config, package metadata, dependencies, entry points
setup.py Backward-compatible setup script
cf_random/__init__.py Package initialisation and version info
cf_random/main.py Wrapper module bridging existing prediction logic
cf_random/cli.py Argparse-based CLI entry point (cf-random)
INSTALL.md End-user installation guide
.gitignore Python and project-specific ignore patterns

All existing classes (TMScoreCalAllVarFS, BaseTMScore, ConvertM2S, TMScoreFSMulti, MSAVariableMultimer, etc.) are unchanged. The packaging layer wraps them without modifying behavior.


Installation

# Standard install
pip install .

# Editable install for development
pip install -e .

Usage

CLI

# Show all options
cf-random --help

As a library

import cf_random

Testing

All existing pytest tests pass after restructuring. Import paths updated to reflect the new cf_random.* namespace.

pytest tests/ -v

Notes

  • Future PyPI publishing can proceed directly from this structure with no further packaging changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant