From 918e9bf4418ad6aaf68880ac5250e68a2f611473 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 19:47:46 +0000 Subject: [PATCH 1/3] Initial plan From 39c6efcf0db93141e923c0f56420c623c585afd6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 19:53:33 +0000 Subject: [PATCH 2/3] Fix TestPyPI publish failure: remove git URL from metl optional dependency PyPI/TestPyPI reject packages with direct URL dependencies (PEP 440). Remove `metl-pretrained @ git+https://...` from [project.optional-dependencies] in pyproject.toml and from extras_require in setup.py. Users should install metl-pretrained directly from GitHub. Update README, CHANGELOG, and error messages accordingly. --- CHANGELOG.md | 4 ++-- README.md | 12 +++--------- pyproject.toml | 1 - setup.py | 3 --- src/pepe/embedders/metl_embedder.py | 1 - 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60d47a0..70b953e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,10 +19,10 @@ truth that drives publishing). ### Added - METL 1D protein embeddings via optional `metl-pretrained` backend: install with - `pip install pepe-cli[metl]` and use model identifiers such as `metl-g-20m-1d` + `pip install git+https://github.com/gitter-lab/metl-pretrained.git` and use model identifiers such as `metl-g-20m-1d` (and other `metl-*-1d` names). Dispatch lives in `model_selecter.py`; embedding is handled by `METLEmbedder` with `METLDataset` tokenization. -- `[metl]` and `[esm]` optional dependency extras in `pyproject.toml` and +- `[esm]` optional dependency extra in `pyproject.toml` and `setup.py`. - Typed errors `METLPackageRequiredError` and `METL3DNotSupportedError` when METL is requested without the extra or when a 3D METL model id is used. diff --git a/README.md b/README.md index df630ac..97fd333 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,7 @@ PEPE (Pipeline for Easy Protein Embedding) is a tool for extracting embeddings a pip install git+https://github.com/Biohub/transformers.git@main ``` -3. *(Optional)* For METL 1D embedding models (e.g. `metl-g-20m-1d`), install the optional backend: - - ```sh - pip install pepe-cli[metl] - ``` - - The underlying `metl-pretrained` package is not on PyPI. PEPE's `[metl]` extra installs it from GitHub; you can also install it directly: +3. *(Optional)* For METL 1D embedding models (e.g. `metl-g-20m-1d`), install the backend directly from GitHub (it is not on PyPI): ```sh pip install git+https://github.com/gitter-lab/metl-pretrained.git @@ -233,7 +227,7 @@ results = pepe.embed( - biohub/ESMC-300M - biohub/ESMC-600M - biohub/ESMC-6B - - METL 1D models (requires `[metl]` extra; see Quick start) + - METL 1D models (requires `metl-pretrained` from GitHub; see Quick start) - `metl-g-20m-1d` and other `metl-*-1d` identifiers supported by [metl-pretrained](https://github.com/gitter-lab/metl-pretrained) - Custom Hugging Face models - Any compatible model from Hugging Face Hub: `username/model-name` @@ -250,7 +244,7 @@ results = pepe.embed( - **`--model_name`** (str): Name of model or link to model. Choose from [List of supported models](../README.md#list-of-supported-models) or use custom models: - ESM models: `esm2_t33_650M_UR50D` - ESMC models: `biohub/ESMC-300M` (requires Biohub transformers fork; see Quick start) - - METL 1D models: `metl-g-20m-1d` (requires `[metl]` extra; see Quick start) + - METL 1D models: `metl-g-20m-1d` (requires `metl-pretrained` from GitHub; see Quick start) - Hugging Face models: `username/model-name` - Custom PyTorch models: `/path/to/model.pt` or `/path/to/model_directory/` - Local HF models: `/path/to/local_hf_directory/` diff --git a/pyproject.toml b/pyproject.toml index ec7375e..19691de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,6 @@ dependencies = [ ] [project.optional-dependencies] -metl = ["metl-pretrained @ git+https://github.com/gitter-lab/metl-pretrained.git@52358614c4b412e81e19e300485e8b85123bd903"] esm = ["fair-esm"] # Developer toolchain: `pip install -e .[dev]` bootstraps everything needed to # run the hooks and the local test suite. diff --git a/setup.py b/setup.py index e0aaafa..a2c601c 100644 --- a/setup.py +++ b/setup.py @@ -57,9 +57,6 @@ def read_readme(): "rjieba", ], extras_require={ - "metl": [ - "metl-pretrained @ git+https://github.com/gitter-lab/metl-pretrained.git@52358614c4b412e81e19e300485e8b85123bd903" - ], "esm": ["fair-esm"], }, entry_points={ diff --git a/src/pepe/embedders/metl_embedder.py b/src/pepe/embedders/metl_embedder.py index d2b42d3..f197add 100644 --- a/src/pepe/embedders/metl_embedder.py +++ b/src/pepe/embedders/metl_embedder.py @@ -16,7 +16,6 @@ def _import_metl(): except ImportError as e: raise METLPackageRequiredError( "METL models require metl-pretrained. Install with: " - "pip install 'pepe-cli[metl]' or " "pip install git+https://github.com/gitter-lab/metl-pretrained.git" ) from e From 0d4571bfd4d0bd9202177ce74dd8caaa2b8d54c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 19:54:49 +0000 Subject: [PATCH 3/3] Add permissions: contents read to test.yml workflow (CodeQL fix) --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1926c83..ba37e2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,9 @@ concurrency: group: tests-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: lint: name: Lint & format (pre-commit)