Skip to content

build: Make the installed package's CLIs and metadata correct - #31

Draft
toresbe wants to merge 1 commit into
mainfrom
claude/project-thread-vnoffo
Draft

toresbe wants to merge 1 commit into
mainfrom
claude/project-thread-vnoffo

Conversation

@toresbe

@toresbe toresbe commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Before: pip install . already produced a working wheel, with the genome annotations and example data bundled and all five console scripts installed. But every successful run of copykat-py or copykat_matrix exited with status 1 and printed the whole result dict to stderr, so the CLIs broke shell pipelines and job schedulers. The package metadata also said GPL-2.0 while the LICENSE file it ships is MIT, and setuptools warned that the license table form is deprecated.

After: both CLIs exit 0 with an empty stderr. The wheel declares License-Expression: MIT and carries the LICENSE file, the version comes from copykat_py.__version__ alone, and the metadata has project URLs and classifiers. The build runs without warnings.

The console-script wrapper setuptools generates is sys.exit(main()), and sys.exit treats any non-None, non-int value as an error message, so main() and matrix_main() now return None. Nothing in the repo used their return value.

How: pyproject.toml switches to the SPDX license = "MIT" with license-files (which needs setuptools>=77, so the build requirement is raised and the unneeded wheel requirement is dropped), moves version to [tool.setuptools.dynamic], and adds [project.urls] and classifiers. .gitignore now ignores *.egg-info/.

Verified: I built the sdist and wheel with python -m build, installed the wheel into a fresh Python 3.13 venv and imported copykat_py there. I ran copykat(load_example_data(), ...) end to end. I ran copykat-py on the bundled example matrix: exit code 0 and an empty stderr, where the same command exited 1 before this change. ruff passes on the touched file, the mypy error count is unchanged from main (147 errors, already there), and pytest tests passes (122 tests).

Not changed here: the README install section belongs to the README work going on separately. Two notes for it: the README tells users to run copykat_anndata --help, but copykat_anndata is a Python function, not an installed command, and the README describes the gpu extra in terms of CuPy, while the extra installs torch and triton.

🤖 Generated with Claude Code

https://claude.ai/code/session_015f962qieP31uEsiDVYuZ6L


Generated by Claude Code

The copykat-py and copykat_matrix console scripts returned the result
dict from main(), so the generated `sys.exit(main())` wrapper printed the
whole dict to stderr and exited 1 on every successful run. They now
return None.

pyproject.toml declared GPL-2.0 while the shipped LICENSE file is MIT;
the metadata now uses the SPDX expression "MIT" with license-files (the
old license table is deprecated by setuptools). The version is read from
copykat_py.__version__ so it lives in one place, and project URLs and
classifiers are added.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015f962qieP31uEsiDVYuZ6L
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.

2 participants