Skip to content

[Bug]: old catalog_data not cleared out on a pip install #920

Closed

Description

@rahulsavani

Where did you find this bug?

PyGambit

What operating system are you using?

macOS

What version of Gambit are you using?

development

What happened?

The failures one gets when the catalog structure is updated, e.g. here:

http://github.com/gambitproject/gambit/actions/runs/26894409878/job/79329166508

do not show up on a local install. This seems to be because old package data persists in catalog_data, e.g., for me:

/Users/rahul/.virtualenvs/gambit/lib/python3.13/site-packages/pygambit/catalog_data/selten1975/fig2.nfg

is still there, where it should now only be the following (which is also there):

/Users/rahul/.virtualenvs/gambit/lib/python3.13/site-packages/pygambit/catalog_data/journals/ijgt/selten1975/fig1.efg

Activity

  1. added
    catalogIssues that relate to the Gambit's Catalog of games
    on Jun 3, 2026
  2. edwardchalstrey1 commented on Jun 4, 2026

    @edwardchalstrey1
    Member

    I've come across this issue before and found it fiddly to get around, though it isn't an issue if you switch to an editable install when doing catalog changes (which I recommend in the "important" block at the top of the dev doc, worth doing anyway so you don't need to redo a pip install each time before running the update script), however you're right that this would be good to fix anyway.

    The issue seems to be that the package data that gets added via these lines in pyproject.toml doesn't always remove files that have been removed on a reinstall:

    [tool.setuptools.package-data]
    pygambit = ["catalog_data/**/*"]
    
  3. rahulsavani commented on Jun 4, 2026

    @rahulsavani
    MemberAuthor

    I've come across this issue before and found it fiddly to get around, though it isn't an issue if you switch to an editable install when doing catalog changes (which I recommend in the "important" block at the top of the dev doc, worth doing anyway so you don't need to redo a pip install each time before running the update script), however you're right that this would be good to fix anyway.

    The issue seems to be that the package data that gets added via these lines in pyproject.toml doesn't always remove files that have been removed on a reinstall:

    [tool.setuptools.package-data]
    pygambit = ["catalog_data/**/*"]
    

    OK, I think we should expand the docs to mention this issue and indeed suggest doing -e not just for convenience but for robust testing. Then we can close issue #920.

  4. edwardchalstrey1 commented on Jun 4, 2026

    @edwardchalstrey1
    Member

    From Rahul: Are there perhaps some other pip flags like a "clean" analog that we are missing and would fix this?

  5. tturocy commented on Sep 11, 2026

    @tturocy
    Member

    This should be deal with by having the catalog be a separate resource; see PR #1132.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcatalogIssues that relate to the Gambit's Catalog of games

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions