Skip to main content

Optimal Congress

Python PyPI Pytest pre-commit

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

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 38c3.

╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --verbose  -v        Include debug messages in output.                               │
│ --help     -h        Show this message and exit.                                     │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────╮
│ fetch                  Fetch events and rooms from API, and update local cache.      │
│ rate                   Interactively rate those events that have not been rated yet. │
│ ratings                List all latest ratings.                                      │
│ optimize               Optimize the schedule based on ratings.                       │
│ next                   List next upcoming events, filtered by minimum rating.        │
│ dump                   Export all latest ratings to CSV, for bulk editing.           │
│ load                   Bulk import ratings from CSV.                                 │
│ version                Print version and exit.                                       │
╰──────────────────────────────────────────────────────────────────────────────────────╯

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

Long-term Roadmap

  • add github action for pytest, ruff, and mypy
  • add latest UI examples to README
  • use rich table for next view
  • 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)

Metadata

Release files for optimal-congress 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optimal-congress 1.1.1
File Size Uploaded Provenance Actions
optimal_congress-1.1.1.tar.gz 12.6 kB Without provenance Details for optimal_congress-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for optimal-congress 1.1.1
File Interpreter ABI Platform Actions
optimal_congress-1.1.1-py3-none-any.whl Python 3 none any Details for optimal_congress-1.1.1-py3-none-any.whl

Total release size: 25.9 kB

Release files / optimal_congress-1.1.1.tar.gz

Download URL optimal_congress-1.1.1.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
46bae54a68dcc4e607851986bbd946b0cae26ab467dae85cff6292fb58825c88
BLAKE2b-256 checksum
How to use checksums
218b5c345364abb9d74190c4140d547207336e223065f62aefdec321ca9a1d5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Darwin/24.2.0

Release files / optimal_congress-1.1.1-py3-none-any.whl

Download URL optimal_congress-1.1.1-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f8563c4ef8baf56a65cfb1f9d11b27df9e0dde808a749adfd49e16bd6cd35db
BLAKE2b-256 checksum
How to use checksums
3f886d24595614fad51226193dbe7edf6644a48bbc3614669cf516c0af231876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Darwin/24.2.0

Security for optimal-congress 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page