Fix TestPyPI publish failure: remove git URL from metl optional dependency - #20
Merged
Conversation
Release 1.4.0
…dency 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.
Copilot
AI
changed the title
[WIP] Fix the failing build-and-publish-test GitHub Actions job
Fix TestPyPI publish failure: remove git URL from metl optional dependency
Jul 7, 2026
Copilot stopped work on behalf of
jahnzh due to an error
July 7, 2026 19:59
jahnzh
marked this pull request as ready for review
July 7, 2026 20:00
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes TestPyPI/PyPI publishing failures by removing the invalid direct-URL dependency from the metl optional extra, and updates user-facing install instructions to use a direct Git install instead.
Changes:
- Removed the
[metl]optional extra frompyproject.tomlandsetup.pyto avoid PyPI/TestPyPI rejection of direct URL dependencies. - Updated README/CHANGELOG and the METL missing-package error message to point users to installing
metl-pretrainedfrom GitHub. - Tightened GitHub Actions workflow permissions (
contents: read) to address missing-permissions findings.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/pepe/embedders/metl_embedder.py |
Updates the METL install hint to remove the [metl] extra reference. |
setup.py |
Removes the metl extra that used a direct Git URL dependency. |
README.md |
Replaces pip install pepe-cli[metl] with direct Git install instructions for metl-pretrained. |
pyproject.toml |
Removes the metl optional dependency extra to keep metadata PyPI-compliant. |
CHANGELOG.md |
Updates METL installation instructions and removes mention of [metl] extra. |
.github/workflows/test.yml |
Adds explicit minimal workflow permissions (contents: read). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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" |
| 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 |
| ### 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` |
| - `[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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyPI/TestPyPI rejects packages with direct URL dependencies. The
testbranch introduced a[metl]optional extra using a git URL formetl-pretrained, causing every publish attempt to fail with HTTP 400.Changes
pyproject.toml/setup.py: Remove themetlextra entirely.metl-pretrainedis not on PyPI, so it cannot be expressed as a valid extras dependency. Theesmanddevextras are unchanged.README.md/CHANGELOG.md: Replacepip install pepe-cli[metl]with the direct git install:metl_embedder.py: Drop thepepe-cli[metl]hint fromMETLPackageRequiredError; only the git URL remains.test.yml: Addpermissions: contents: read(CodeQL missing-permissions alert on the workflow).