Skip to content

Fix PyPI upload failure by removing git dependency#33

Merged
tomdurrant merged 1 commit intomainfrom
fix/remove-notebooks-git-dependency
Mar 6, 2026
Merged

Fix PyPI upload failure by removing git dependency#33
tomdurrant merged 1 commit intomainfrom
fix/remove-notebooks-git-dependency

Conversation

@tomdurrant
Copy link
Contributor

Summary

Removes the notebooks optional dependency that was causing PyPI upload failures.

Problem

The v0.6.3 release failed to upload to PyPI with this error:

ERROR: Can't have direct dependency: rompy-notebooks @ 
git+https://github.com/rom-py/rompy-notebooks.git@package ; extra == "notebooks"

PyPI does not allow direct git dependencies in package metadata, even in optional extras, because they are not reproducible or verifiable according to PEP 440.

Solution

Removed the notebooks optional dependency from pyproject.toml. This dependency is not needed for package distribution because:

  1. The docs build workflow (.github/workflows/build-docs.yml) already clones rompy-notebooks directly from GitHub
  2. The notebooks are copied into the docs directory during the build process
  3. The package is installed with pip install .[docs], not [notebooks]

Testing

  • The change allows the package to be built and uploaded to PyPI without validation errors
  • Docs build workflow remains unaffected as it handles notebooks separately

Fixes the PyPI upload failure in release v0.6.3.

PyPI does not allow direct git dependencies in package metadata, even in
optional extras. The rompy-notebooks dependency was causing PyPI upload
failures with error: 'Can't have direct dependency: rompy-notebooks @
git+https://github.com/rom-py/rompy-notebooks.git@package'.

This dependency is not needed for package distribution since the docs
build workflow already clones rompy-notebooks directly from GitHub and
copies the notebooks into the docs directory during the build process.
@tomdurrant tomdurrant merged commit a40df15 into main Mar 6, 2026
1 check passed
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