Testing catalog build locally doesn't mistakenly retain old games#922
Testing catalog build locally doesn't mistakenly retain old games#922edwardchalstrey1 wants to merge 9 commits into
Conversation
|
Unfortunately, this does not work yet. My best guess is that the repo's live
? |
I think ensuring when running the update script that the structure of |
…t in developer guide
|
@rahulsavani See the top comment - on further inspection, the 2 things that were broken and fixed by this PR are editable installs not picking up live changes properly and old images not being deleted. However, if you are doing a non editable |
|
Unfortunately, Ed, this still doesn't seem to work for me. At this stage could you perhaps create a MWE of the problem locally so you can observe it for yourself and see if this fixes it for you? |
What's the error you're getting? I've tested and not seeing any problems at this point |
Issues closed by this PR
Description of the changes in this PR
This PR fixes stale
catalog_data/files persisting afterpip install -e .by swapping the lookup priority insrc/pygambit/catalog.py: the repo's live (and crucially differently named)catalog/directory is now preferred over the installedcatalog_data/, withcatalog_data/as the fallback for deployed (non editable install) packages, which will lack thecatalog/dir.This ensures catalog changes are always picked up immediately in a editable install development checkout without reinstalling, and eliminates divergence between local and CI environments caused by leftover files from previous installs.
Note: non-editable installs with
pip install .should already replace the catalog data correctly due to this logic insetup.py:There is also a new
clean_stale_img_filesfunction added which gets rid of anything incatalog/imgwhich doesn't match the structure ofcatalogHow to review this PR
pygambit.catalog.games()the changes are picked upcatalog/imgfrom old games that were removed are removed