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 |
|
STARTING STATE OF catalog/img: $ ls catalog/img ACTUAL STATE OF catalog/: $ls catalog PROCESS I RUN $ pip install . Removed 144 stale item(s) from ???/gambit/catalog/img BUT Things seem to get removed from /catalog/img but then put back. After the above completes: $ ls catalog/img I.e. the directory seems to get fully emptied and then filled up incrementally with all the original stuff, even though half of it is not in the directory catalog itself! And the final catalog table has everything just like at the start of the process. |
|
Ok thanks, it might be that your pygambit install in your python environment is still retaining old games in the package data that should be removed when you redo the pip install, (like after having done your recent pip install, does it have the expected games or still retain the old ones e.g. bagwell1995 |
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