Skip to content

Latest commit

 

History

History
45 lines (45 loc) · 4.09 KB

File metadata and controls

45 lines (45 loc) · 4.09 KB

This is a very incomplete list of incomplete tasks for this project

Code hygiene

Testing (test)

  • [ ] Quicker/easier smoketests
  • [ ] Optimize tests/test_routes.py performance: Currently very slow to run. Split into fast/slow tests using pytest marks (@pytest.mark.slow) so normal test runs are quick and comprehensive tests can be run separately with `pytest -m slow`

Build & Packaging (build)

  • [ ] Create src directory and move most code to this directory
  • [ ] Potentially add [tool.setuptools] include-package-data = true
  • [ ] whitelist conduits.py, abif_list.yml, examples.yml, static/* and templates/*

Refactoring (refactor)

  • [ ] Move presentation logic from templates to Python
  • [ ] Replace print() statements with the standard `logging` module
  • [ ] Clean up Python imports
  • [ ] Generate IRV transfer indicators server-side, not JavaScript.
  • [ ] Unify color styling: Generate CSS classes in one place for use by all voting methods (FPTP, IRV, STAR, etc.)
  • [ ] Remove dynamic CSS generation from templates: Currently using <style> blocks in templates for candidate colors. Consider CSS custom properties, inline styles, or pre-generated classes instead.
  • [ ] Clean up data structure passed from abiflib to STAR template
  • [ ] Move _add_irv_tie_notices() from conduits.py to abiflib
  • [ ] Move _add_star_tie_notices() from conduits.py to abiflib
  • [ ] Move _add_pairwise_tie_notices() from conduits.py to abiflib
  • [ ] Move Copeland tie notice generation from awt.py GET route to abiflib
  • [ ] Consolidate route processing: Make GET requests use conduits.py pipeline to eliminate duplicate business logic (fixes notice system route duplication problem)
  • [ ] Replace string-based SVG insertion in linkpreview with xml.etree.ElementTree using <g id=”awt-dynamic-content”/> slot

For 0.34.0

  • [ ] Finalize 0.34.0 changelog
  • [ ] AWT: When transform_ballots is enabled for any voting method, add a “See transformed ballots” accordion link that reveals the transformed ABIF (returned by abiflib) inline on the results page.
  • [ ] Verify STL entries load: stl-2025-mayor (featured), stl-2025-comptroller, stl-2025-alderman-ward3, stl-2025-alderman-ward11
  • [ ] Confirm IRV disclaimer shows for non-ranked ballots (e.g., STL 2025) and does not regress ranked-election IRV output
  • [ ] Review bug list on GitHub
  • [ ] See ./CHANGELOG.org
  • [ ] choose_many → choose_one transform (stl-2025-mayor pilot)
    • Default method: least_approval_first_top (pick, on each approval ballot, the approved candidate with the lowest global approvals). Rationale: voters favoring frontrunners tend to bullet vote; voters favoring underdogs often also approve a frontrunner. Thus, when both an underdog and frontrunner are approved, prefer the underdog as the implied favorite.
    • Scope: what‑if FPTP only; do not alter native FPTP. Emit clear abiflib notice with method name and original_ballot_type=choose_many. No alternative transforms exposed yet (see Post 0.34 task below).
    • Evaluation: compare LAF-Top FPTP what‑if against native Approval and other methods on /id/stl-2025-mayor; document intuitions/differences.

Post 0.34.0

  • [ ] Fix width of “Ballot options” fieldset (layout: ensure it fills all available space left of Submit; responsive with method options width)
  • [ ] Fix link previews for method-specific pages (/id/<election-id>/<method>)
  • [ ] Implement /edit route functionality (route exists but not implemented - see routes.md)
  • [ ] Create bifhub and figure out awt interface to it ./docs/bifhub.md
  • [ ] Merge tags-index.html and tag-index.html into a single template (consolidate tag index/detail)
  • [ ] Implement centralized notice system (see docs/notices.md) to replace balkanized approach
  • [ ] Alternative choose_many → choose_one transforms (do not expose before 0.34)
    • most_approval_first_top (pick strongest approved); deterministic tiebreak by token.
    • Other heuristics (e.g., co‑approval weights, precinct covariates) — research only; not in UI.
  • Moar Code hygiene (see above)