optimal-congress

CLI to find an optimal, personal schedule for the 37c3 congress.


License
MIT
Install
pip install optimal-congress==0.7.4

Documentation

Optimal Congress

Command Line Interface to find an optimal, personal schedule for the 37c3 congress.

Project status

โš ๏ธ Development for this project is currently on hold. It can quickly be adapted for future CCC events. โš ๏ธ

Optimization logic

The optimization relies on a simple 2-fold logic:

  1. Find a personal schedule that maximizes the sum of 'rating scores' assigned to scheduled events.
  2. The schedule must be feasible, i.e. the times of scheduled events must not overlap.

Installation

pip install optimal-congress

Available commands

optimal-congress provides the following commands:

$ optimal-congress -h

 Usage: optimal-congress [OPTIONS] COMMAND [ARGS]...

 Optimize your personal schedule for the 37c3.

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --verbose  -v        Include debug messages in output.                               โ”‚
โ”‚ --help     -h        Show this message and exit.                                     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ dump                   Export all latest ratings to CSV, for bulk editing.           โ”‚
โ”‚ fetch                  Fetch events and rooms from API, and update local cache.      โ”‚
โ”‚ load                   Bulk import ratings from CSV.                                 โ”‚
โ”‚ next                   List next upcoming events, filtered by minimum rating.        โ”‚
โ”‚ optimize               Optimize the schedule based on ratings.                       โ”‚
โ”‚ rate                   Interactively rate those events that have not been rated yet. โ”‚
โ”‚ ratings                List all latest ratings.                                      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Example Workflow

  1. Fetch events and rooms from congress API:
$ optimal-congress fetch

Fetching events and rooms from API...
Fetched 49 events and 58 rooms from API.

Comparing API with cache...
Found 0 new events, and 0 removed events.

Updating cache...
Done.
  1. Interactively rate events, if not already rated:
$ optimal-congress rate

Unrated event (1/65):

2023-12-28 20:15 - 20:55

Lรผtzerath Lebt! Einblicke in den Widerstand

You can't evict a movement! Der Energiekonzern RWE wird noch Jahre brauchen, die Kohle unter Lรผtzi abzubaggern: Der Kampf gegen die Kohle und fรผr Klimagerechtigkeit geht weiter!

https://events.ccc.de/congress/2023/hub/en/event/lutzerath_lebt_einblicke_in_den_widerstand

Rate from 0 to 10 (Enter to exit):
  1. Review you current ratings:
$ optimal-congress ratings

loading events and ratings from cache...

Latest ratings:
- Rating: 8.0 - Amateurfunk als Hilfe in Not- und Katastrophenfรคll..https://events.ccc.de/congress/2023/hub/en/event/amateurfunk-als-hilfe-in-not-und-katastrophenfalle
- Rating: 8.0 - InfraNodus: Reveal Non-Obvious and Find the Gaps w..https://events.ccc.de/congress/2023/hub/en/event/infranodus-reveal-non-obvious-and-find-the-gaps-wi
  1. Optimize your personal schedule:
$ optimal-congress optimize

loading events, ratings, and rooms from cache...

Scheduled events:
- Wed 27 10:30-11:00 Saal 1..........37C3: Feierliche Erรถffnung................https://events.ccc.de/congress/2023/hub/en/event/37c3_feierliche_eroffnung
- Wed 27 11:00-11:40 Saal Granville..The Trouble with Green Electricity Certi..https://events.ccc.de/congress/2023/hub/en/event/the_trouble_with_green_electricity_certificates
...

Testing

Software testing uses pytest, relying upon poetry and tox.
To run all tests, across multiple python versions:

poetry run tox

Roadmap

  • output more/all information with associated events (see feature request and example for more compact hyperlinks with rich)
  • change rating scheme, to minimize effort and maximize flexibility (see feature request),
    e.g. by first marking favorites, and only requiring relative ratings for conflicting favorites
  • test export of schedule to iOS app via QR code (same format as halfnarp)