[Code scan] Fix package contents to exclude tests and include examples consistently

Open Beginner friendly
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
build-system

Research direction

Start with setup.py lines 15-23 and MANIFEST.in, then build both a wheel and source distribution and inspect their contents. Confirm the runtime package excludes the top-level tests package and resolve the examples discrepancy consistently, either by including examples in the source distribution or aligning the documentation with their absence.

Written by the indexing model from the issue text.

Description

bug

This issue is a result of a Codex global code scan of deepmodeling/fpop at commit b05b337590c31a5237b2dcbd9c0833b841c08cd4.

Relevant code:
https://github.com/deepmodeling/fpop/blob/b05b337590c31a5237b2dcbd9c0833b841c08cd4/setup.py#L15-L23
https://github.com/deepmodeling/fpop/blob/b05b337590c31a5237b2dcbd9c0833b841c08cd4/MANIFEST.in#L1

Problem:
The wheel and source distribution currently package different unintended content:

  • packages=setuptools.find_packages() includes the repository's top-level tests package because it is a Python package under the repo root.
  • MANIFEST.in includes only LICENSE, so the source distribution omits the runnable examples/** files that are present in the repository.

Validation from the current tree:

wheel has tests package True
sample tests entries ['tests/__init__.py', 'tests/constants.py', 'tests/context.py', 'tests/mocked_ops.py', 'tests/test_abacus_inputs.py']
sdist has examples False
sdist has tests True

Expected behavior:
Runtime distributions should not install a top-level tests package into user environments. If examples are intended to be shipped, MANIFEST.in should include them; otherwise documentation should not imply they are available from the source distribution.

Dominant language
Python
Stars
3
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepmodeling/fpop

All issues in deepmodeling/fpop

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.