Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add ergonomic helpers to reduce boilerplate by 50-70%#1216

Merged
SkBlaz merged 3 commits intomasterSkBlaz/py3plex:masterfrom
copilot/simulate-user-ergonomicsSkBlaz/py3plex:copilot/simulate-user-ergonomicsCopy head branch name to clipboard
Feb 10, 2026
Merged

Add ergonomic helpers to reduce boilerplate by 50-70%#1216
SkBlaz merged 3 commits intomasterSkBlaz/py3plex:masterfrom
copilot/simulate-user-ergonomicsSkBlaz/py3plex:copilot/simulate-user-ergonomicsCopy head branch name to clipboard

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 9, 2026

Simulated realistic user workflows to identify friction points. Created helper functions that collapse common 10-15 line patterns into 3-5 line calls.

New API Surface

py3plex/ergonomics.py - Four helper functions:

  • quick_network() - Network construction from Python lists
  • quick_analysis() - Single-line centrality computation
  • quick_communities() - One-call detection
  • show_network_summary() - Human-readable stats

Code Impact

Before (15 lines):

from py3plex.core import multinet
net = multinet.multi_layer_network(directed=False)
for person in ['Alice', 'Bob', 'Carol']:
    for layer in ['work', 'social']:
        net.add_nodes([{'source': person, 'type': layer}])
for src, dst, layer in connections:
    net.add_edges([{'source': src, 'target': dst, 
                     'source_type': layer, 'target_type': layer}])

After (5 lines):

from py3plex.ergonomics import quick_network
net = quick_network(
    people=['Alice', 'Bob', 'Carol'],
    layers=['work', 'social'],
    connections=[('Alice', 'Bob', 'work')]
)

Validation

User journey simulations:

  • examples/getting_started/user_journey_simulation.py - Three personas (first-time, intermediate, advanced)
  • examples/getting_started/quick_start_ergonomics.py - Before/after demonstrations

Tests: 17 tests covering all helpers, edge cases, and full pipeline integration.

Bug Fixes

  • Generator length handling in analysis helpers
  • Edge format compatibility in summary display
  • Layer counting edge cases

No breaking changes. All additions are opt-in.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 9, 2026 20:11
…uick-start helpers, and validation tests

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>
Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve ergonomics in user simulation Add ergonomic helpers to reduce boilerplate by 50-70% Feb 9, 2026
Copilot AI requested a review from SkBlaz February 9, 2026 20:16
@SkBlaz SkBlaz marked this pull request as ready for review February 10, 2026 19:44
@SkBlaz SkBlaz merged commit a894f02 into master Feb 10, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.