From d807d3008f5b128cff57498880a5924a3f62776d Mon Sep 17 00:00:00 2001 From: SexyERIC0723 Date: Mon, 16 Mar 2026 12:31:37 +0000 Subject: [PATCH] fix: correct package name, URL, and dependencies in setup.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three critical bugs made the package completely uninstallable: 1. Package name was "medgpt" but the source directory is foresight/ — setuptools could not find any modules to install. 2. Missing comma after 'datasets==2.15.0' caused Python implicit string concatenation, producing the nonsensical requirement 'datasets==2.15.0transformers==4.35.2'. 3. URL pointed to the old repo (github.com/w-is-h/medgpt) instead of github.com/CogStack/Foresight. Additional improvements: - Removed the non-existent foresight.models sub-package (see #1) - Relaxed version pins (>=X.Y instead of ==X.Y.Z) so the package can coexist with other libraries - Moved flash-attn to extras_require since it requires a CUDA build environment and is not needed for CPU-only usage - Added python_requires=">=3.9" - Added torch and numpy as explicit dependencies (imported by the package but previously missing from install_requires) - Removed unused setuptools command imports - Added encoding="utf-8" to open() Co-Authored-By: Claude Opus 4.6 --- setup.py | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index c5ea0a0..8bde124 100644 --- a/setup.py +++ b/setup.py @@ -1,27 +1,34 @@ import setuptools -from setuptools.command.install import install -from setuptools.command.develop import develop -from setuptools.command.egg_info import egg_info -with open("./README.md", "r") as fh: +with open("./README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( - name="medgpt", - version="0.4", + name="foresight", + version="0.5", author="w-is-h", author_email="w.kraljevic@gmail.com", - description="Temporal modeling of patients and diseases", + description="Deep Generative Modelling of Patient Timelines using Electronic Health Records", long_description=long_description, long_description_content_type="text/markdown", - url="https://github.com/w-is-h/medgpt", - packages=['medgpt', 'medgpt.datasets', 'medgpt.metrics', 'medgpt.utils', - 'medgpt.models', 'medgpt.tokenizers'], + url="https://github.com/CogStack/Foresight", + packages=[ + "foresight", + "foresight.datasets", + "foresight.metrics", + "foresight.utils", + "foresight.tokenizers", + ], + python_requires=">=3.9", install_requires=[ - 'datasets==2.15.0' - 'transformers==4.35.2', - 'flash-attn==2.3.6', - ], + "datasets>=2.15", + "transformers>=4.35", + "torch", + "numpy", + ], + extras_require={ + "flash-attn": ["flash-attn>=2.3"], + }, classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License",