McRogueFace/tools
John McCardle 2086d25581 Phase 5.3: documentation regeneration + introspection-based stub generator
Regenerate HTML/Markdown API reference, man page, and type stubs against
current committed HEAD (post API-freeze pass #304-#308, #252 overhaul, and
Phase 3/4/5.1/5.2 changes).

The previous tools/generate_stubs_v2.py hand-maintained hardcoded strings,
which drifted badly: stubs still contained removed module functions
(setScale, findAll, getMetrics, setDevConsole), lacked new types (GridView,
Behavior, Trigger, DiscreteMap, Viewport3D, Entity3D, Model3D, Billboard,
NoiseSource, WangSet, LdtkProject, HeightMap, DijkstraMap, AStarPath,
ColorLayer, TileLayer, etc.), and missed post-overhaul properties
(tile_width/tile_height, sprite_grid, perspective_map, cell_pos, labels,
turn_order, move_speed, etc.).

Rewrite the generator as a runtime-introspection script mirroring
generate_dynamic_docs.py's approach:
  - classify mcrfpy members (classes, enums, functions, constants, submodules)
  - parse signatures from docstring first line with proper paren-depth tracking
  - translate multi-form signatures (foo(x,y) or foo(pos)) to *args/**kwargs
  - sanitize docstring '...' placeholder params into '**kwargs'
  - emit IntEnum blocks for int-subclass types with uppercase members
  - discover delegated methods via instance probing (Grid/GridView -> _GridData)
  - conservative property type inference (only accept recognized primitives
    and CapitalCase class names in parenthesized hints)

Resulting stubs/mcrfpy.pyi (2069 lines) parses as valid Python.
Markdown/HTML/man-page regeneration is otherwise timestamp-only since the
introspection path was already current -- the stubs were the stale artifact.
2026-04-18 07:33:51 -04:00
..
build_debug_libs.sh Split UIGrid.cpp into three files for maintainability, closes #149 2026-04-10 04:08:27 -04:00
generate_all_docs.sh docs: Complete Phase 7 documentation system with parser fixes and man pages 2025-10-30 21:20:50 -04:00
generate_color_table.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_dynamic_docs.py docs: Fix property extraction and add Scene documentation 2025-12-29 19:48:21 -05:00
generate_man_page.sh docs: Complete Phase 7 documentation system with parser fixes and man pages 2025-10-30 21:20:50 -04:00
generate_stubs.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_stubs_v2.py Phase 5.3: documentation regeneration + introspection-based stub generator 2026-04-18 07:33:51 -04:00
gitea_issues.py feat: Add development tooling scripts 2025-10-23 13:19:25 -04:00
package.sh distribution packaging 2026-01-09 12:00:59 -05:00
package_stdlib.py distribution packaging 2026-01-09 12:00:59 -05:00
stdlib_modules.yaml distribution packaging 2026-01-09 12:00:59 -05:00
test_link_transform.py feat: add link transformation to documentation generator 2025-10-30 11:39:54 -04:00
test_vector_docs.py feat: convert PyVector properties to use macros 2025-10-30 11:33:49 -04:00
ui_methods_documentation.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00