Ship the listener inside the package, allow no-port URLs - #324
Merged
Merged
Conversation
- Move the Robot Framework listener into robotframework_dashboard/robotdashboardlistener.py so it's available the moment the package is pip-installed, with no separate download from GitHub needed (useful in closed-off/offline CI environments). Reference it via the dotted module path: --listener robotframework_dashboard.robotdashboardlistener - Drop the 'requests' dependency entirely: HTTP (multipart upload, JSON DELETE, HTTPS/SSL context, basic auth) is now implemented on top of urllib/ssl/json from the standard library, so the listener adds zero runtime dependencies beyond Robot Framework itself. - Allow omitting the port from the built URL (host/port args on the listener, and --host/--port on the standalone robotdashboardscript.py pusher): pass port= (listener) or --port "" (script) for servers reachable on the protocol's default port or behind a reverse proxy that doesn't expose one. - example/listener/robotdashboardlistener.py is now a one-line re-export of the packaged module, kept for anyone who prefers a local file path over the dotted import. - Add 50 unit tests (100% coverage) for the packaged listener, mocking urlopen instead of requests. - Update docs/listener-integration.md, docs/installation-version-info.md, and .github/skills/listener-integration.md to lead with the packaged/dotted-path usage and document the no-port option; cross-link the docs page and the canonical source file both ways. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #317.
robotframework_dashboard/robotdashboardlistener.pyso it's available the moment the package ispip installed — no separate download from GitHub, which matters in closed-off/offline CI environments. Reference it via the dotted module path:--listener robotframework_dashboard.robotdashboardlistener.requestsdependency entirely: HTTP (multipart upload, JSONDELETE, HTTPS/SSL context, basic auth) is now implemented onurllib/ssl/jsonfrom the standard library, so the packaged listener adds zero runtime dependencies beyond Robot Framework itself.host/portlistener args (and--host/--porton the standalonerobotdashboardscript.pypusher) can omit the port entirely — passport=(listener) or--port ""(script) — for servers reachable on the protocol's default port (80/443) or behind a reverse proxy that doesn't expose one.example/listener/robotdashboardlistener.pyis now a one-line re-export of the packaged module, kept for anyone who prefers pointing--listenerat a local file path instead of the dotted import.Test plan
bash scripts/python-tests.sh— 361/361 passing,robotdashboardlistener.pyat 100% coverage (50 new tests mockingurlopeninstead ofrequests)robot --listener robotframework_dashboard.robotdashboardlistenervia the actually-pip installed package, confirming output upload, log upload + DB path linking, and the no-port path (server bound to port 80, listener withport=) all work over real HTTP with zero extra dependencies installednpm run docs:build— docs build cleandocs/listener-integration.md,docs/installation-version-info.md,.github/skills/listener-integration.md🤖 Generated with Claude Code