Skip to content

Fix TestPyPI publish failure: remove git URL from metl optional dependency - #20

Merged
jahnzh merged 5 commits into
testfrom
copilot/fix-build-and-publish-test
Jul 7, 2026
Merged

Fix TestPyPI publish failure: remove git URL from metl optional dependency#20
jahnzh merged 5 commits into
testfrom
copilot/fix-build-and-publish-test

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

PyPI/TestPyPI rejects packages with direct URL dependencies. The test branch introduced a [metl] optional extra using a git URL for metl-pretrained, causing every publish attempt to fail with HTTP 400.

Changes

  • pyproject.toml / setup.py: Remove the metl extra entirely. metl-pretrained is not on PyPI, so it cannot be expressed as a valid extras dependency. The esm and dev extras are unchanged.
  • README.md / CHANGELOG.md: Replace pip install pepe-cli[metl] with the direct git install:
    pip install git+https://github.com/gitter-lab/metl-pretrained.git
  • metl_embedder.py: Drop the pepe-cli[metl] hint from METLPackageRequiredError; only the git URL remains.
  • test.yml: Add permissions: contents: read (CodeQL missing-permissions alert on the workflow).

Copilot AI added 3 commits July 7, 2026 19:50
…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 finished work on behalf of jahnzh July 7, 2026 19:56
Copilot AI requested a review from jahnzh July 7, 2026 19:56
Copilot stopped work on behalf of jahnzh due to an error July 7, 2026 19:59
@jahnzh
jahnzh changed the base branch from main to test July 7, 2026 20:00
@jahnzh
jahnzh marked this pull request as ready for review July 7, 2026 20:00
Copilot AI review requested due to automatic review settings July 7, 2026 20:00
@jahnzh
jahnzh merged commit 4cd517d into test Jul 7, 2026
6 of 7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from pyproject.toml and setup.py to avoid PyPI/TestPyPI rejection of direct URL dependencies.
  • Updated README/CHANGELOG and the METL missing-package error message to point users to installing metl-pretrained from 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"
Comment thread README.md
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
Comment thread CHANGELOG.md
### 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`
Comment thread CHANGELOG.md
- `[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.
@jahnzh
jahnzh deleted the copilot/fix-build-and-publish-test branch July 7, 2026 21:04
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.

3 participants