Skip to content

Improve catalog update process and script, including tests#889

Merged
edwardchalstrey1 merged 27 commits into
masterfrom
fix/888
Jun 1, 2026
Merged

Improve catalog update process and script, including tests#889
edwardchalstrey1 merged 27 commits into
masterfrom
fix/888

Conversation

@edwardchalstrey1

@edwardchalstrey1 edwardchalstrey1 commented May 26, 2026

Copy link
Copy Markdown
Member

Issues closed by this PR

Description of the changes in this PR

  • This PR has several updates to the catalog update process, both in terms of docs and code, see the linked issues above.
  • Also updates the catalog module to ensure that non EFG/NFG files are not picked up by mistake - something @rahulsavani noticed
  • Adds help to the update script so you can do python build_support/catalog/update.py --help
  • Adds tests for build_support/catalog/update.py covering the functions handling DrawTree settings, updating the variables passed to the Makefile.am and correctly generating the catalog RST doc
  • Also updates DrawTree to 0.9.1 which includes fixes to EF->EFG generation

How to review this PR

Comment thread doc/developer.catalog.rst Outdated

When updating the catalog, changes can be viewed by inspecting the documentation build generated by a pull request.
To test changes locally, you'll need to have a developer install of `pygambit` available in your Python environment, see :ref:`build-python`.
To test changes locally, you'll need to have an editable developer install of `pygambit` available in your Python environment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to have an editable install, but it can be a useful technique if you are working only with the catalog. This needs to be written a bit more carefully though because an editable install doesn't work in general if one is making changes to the C++ part of the code.

This edit might be more confusing than helpful to a less-experienced dev.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, I can just make that explicit here - the idea is yes in general developer install would not be editable, but when you're making catalog edits this will definitely save a lot of time

@edwardchalstrey1 edwardchalstrey1 changed the title fix/888 Improve catalog update process May 27, 2026
@edwardchalstrey1 edwardchalstrey1 changed the title Improve catalog update process Improve catalog update process and script May 27, 2026
@edwardchalstrey1 edwardchalstrey1 changed the title Improve catalog update process and script Improve catalog update process and script, including tests May 27, 2026
@edwardchalstrey1 edwardchalstrey1 marked this pull request as ready for review May 27, 2026 13:56
@edwardchalstrey1 edwardchalstrey1 marked this pull request as draft May 28, 2026 10:13
@edwardchalstrey1

Copy link
Copy Markdown
Member Author

@rahulsavani If you have any EF layout variants for the vonstengel2022 or vonstengelforges2008 games we can include them in this PR since there is now the option for custom EF layouts and to include multiple for a given game.

@edwardchalstrey1 edwardchalstrey1 marked this pull request as ready for review May 28, 2026 10:35
@edwardchalstrey1

Copy link
Copy Markdown
Member Author

@rahulsavani If you have any EF layout variants for the vonstengel2022 or vonstengelforges2008 games we can include them in this PR since there is now the option for custom EF layouts and to include multiple for a given game.

Example of how this looks adding 2 EFs for one game when I tested it locally:

Screenshot 2026-05-29 at 09 37 43

@rahulsavani

rahulsavani commented May 29, 2026

Copy link
Copy Markdown
Member

@rahulsavani If you have any EF layout variants for the vonstengel2022 or vonstengelforges2008 games we can include them in this PR since there is now the option for custom EF layouts and to include multiple for a given game.

Example of how this looks adding 2 EFs for one game when I tested it locally:

Screenshot 2026-05-29 at 09 37 43

This looks great. I am reviewing the PR now.

One immediate comment: The long list of files does not look great -- can we hide it (within the entry) by default and expand it similarly to the whole entry?

@edwardchalstrey1

Copy link
Copy Markdown
Member Author

The long list of files does not look great -- can we hide it (within the entry) by default and expand in similarly to the whole entry?

Good idea, have changed that for all the entries and it looks better

@rahulsavani rahulsavani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the tabs for alternatives.

However, at the moment, to get two or more alternatives one needs to add two or more .ef files to the catalog.

I think a typical use case is that one provides one alternative with the other desired one is that created bydraw_tree (i.e. what we used to have before allowing custom .efs at all).

Currently if one provides a {slug}__{label}.ef without a {slug}.ef the former is ignored and one just gets the default draw_tree one. I think in this case the default and the variant should be created.

@edwardchalstrey1

Copy link
Copy Markdown
Member Author

Currently if one provides a {slug}__{label}.ef without a {slug}.ef the former is ignored and one just gets the default draw_tree one. I think in this case the default and the variant should be created.

@rahulsavani Just pushed an updated and that is now the case

@edwardchalstrey1

Copy link
Copy Markdown
Member Author

Just also added a small change to the recently added gilboa1997/fig1 to prevent the action label overlapping the information set boundary:

In draw_tree_settings.yml:

gilboa1997/fig1:
    action_label_dist: 5.0
Screenshot 2026-06-01 at 11 00 36

@rahulsavani rahulsavani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this works nicely. I am happy with this for now.

I added two alternative .efs for vonstengelforges2008; they need some minor tweaks, but I will do that later -- let's get this merged in so you can merge in the bibtex stuff.

@edwardchalstrey1 edwardchalstrey1 merged commit 4af45f6 into master Jun 1, 2026
26 checks passed
@edwardchalstrey1 edwardchalstrey1 deleted the fix/888 branch June 1, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants