### Starting the Python Remote Server Source: https://github.com/robotframework/pythonremoteserver/blob/master/example/README.rst Demonstrates how to start the Python remote library server using different Python interpreters from the command line. ```bash python examplelibrary.py jython examplelibrary.py ``` -------------------------------- ### Install robotremoteserver from source Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Installs the robotremoteserver package by downloading and extracting the source distribution from PyPI and running the setup script. ```bash python setup.py install ``` -------------------------------- ### Install Build Dependencies Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Installs necessary Python dependencies for building releases using pip and a requirements file. ```bash pip install -r requirements-build.txt ``` -------------------------------- ### Install Python Remote Server Source: https://github.com/robotframework/pythonremoteserver/blob/master/docs/robotremoteserver-1.1.rst Instructions for installing the Python Remote Server using pip. It covers installing the latest pre-release or a specific version. ```bash pip install --pre --upgrade robotremoteserver ``` ```bash pip install robotremoteserver==1.1 ``` -------------------------------- ### Invoke Task Execution Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Demonstrates how to execute tasks defined in the 'tasks.py' file using the Invoke tool. Shows how to list all tasks and get help for a specific task. ```bash invoke task [options] invoke --list invoke --help task ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/robotframework/pythonremoteserver/blob/master/test/README.rst Installs the necessary development dependencies for running the acceptance tests. This command should be executed in your terminal. ```bash pip install -r requirements-dev.txt ``` -------------------------------- ### Install Python Remote Server Source: https://github.com/robotframework/pythonremoteserver/blob/master/docs/robotremoteserver-1.1.1.rst Instructions for installing the Python Remote Server using pip. It covers upgrading to the latest version or installing a specific version (1.1.1). ```bash pip install --upgrade robotremoteserver ``` ```bash pip install robotremoteserver==1.1.1 ``` -------------------------------- ### Installing/Upgrading the Package Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Installs or upgrades the robotremoteserver package from PyPI using pip. The `--upgrade` flag ensures the latest version is installed, and `--pre` can be used for pre-releases. ```bash pip install --upgrade robotremoteserver ``` -------------------------------- ### Install robotremoteserver using pip Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Installs the robotremoteserver package using pip, the standard Python package installer. ```bash pip install robotremoteserver ``` -------------------------------- ### Uploading Distributions to PyPI Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Uploads the created distribution files (sdist and wheel) to the Python Package Index (PyPI). This makes the package available for installation via pip. ```bash twine upload dist/* ``` -------------------------------- ### Configuring Remote Server Address and Port Source: https://github.com/robotframework/pythonremoteserver/blob/master/example/README.rst Illustrates how to configure the remote server's listening address and port via command-line arguments and Robot Framework variables. ```bash python examplelibrary.py 192.168.1.15 7777 robot --variable ADDRESS:192.168.1.15 --variable PORT:7777 tests.robot ``` -------------------------------- ### Configured Robot Remote Server Initialization Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Starts a Robot Framework remote server with custom host and port configurations. This example sets the host to '10.0.0.42' and the port to 0, which automatically selects a free port. ```python from robotremoteserver import RobotRemoteServer from examplelibrary import ExampleLibrary RobotRemoteServer(ExampleLibrary(), host='10.0.0.42', port=0) ``` -------------------------------- ### Executing Robot Framework Tests Source: https://github.com/robotframework/pythonremoteserver/blob/master/example/README.rst Shows how to execute Robot Framework tests that utilize the remote library, specifying the interpreter. ```bash robot tests.robot pypy -m robot tests.robot ``` -------------------------------- ### Initialize and Serve Robot Remote Server Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Demonstrates initializing the RobotRemoteServer with specific host, port, and port file configurations, and then explicitly starting the server. This approach allows for more control over the server's lifecycle, such as starting it in a background thread. ```python from robotremoteserver import RobotRemoteServer from examplelibrary import ExampleLibrary server = RobotRemoteServer(ExampleLibrary(), host='10.0.0.42', port=0, port_file='/tmp/remote-port.txt', serve=False) server.serve() ``` -------------------------------- ### Robot Framework Python Remote Server API Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Documentation for the Robot Framework Python Remote Server API, outlining its structure and potential methods. This section provides a high-level overview and examples of how the API might be structured or interacted with. ```APIDOC RobotFrameworkRemoteServer: __init__(host, port, allowAmf=False, log=None, logLevel='INFO', name=None) Initializes the remote server. Parameters: host: Hostname or IP address to bind to. port: Port number to listen on. allowAmf: Whether to allow AMF connections (default: False). log: Path to a log file. logLevel: Logging level (e.g., 'INFO', 'DEBUG'). name: Name of the remote server. start(stopRobot=True) Starts the remote server and begins listening for connections. Parameters: stopRobot: Whether to stop the Robot Framework process when the server stops (default: True). stop() Stops the remote server. runKeyword(name, args, kwspec=None) Executes a keyword provided by the remote server. Parameters: name: The name of the keyword to execute. args: A list of arguments to pass to the keyword. kwspec: Keyword specification (optional). Returns: The result of the keyword execution. getKeywods Retrieves a list of all keywords available from the remote server. Returns: A dictionary where keys are keyword names and values are descriptions or argument specifications. ``` -------------------------------- ### Basic Robot Remote Server Initialization Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Starts a Robot Framework remote server by initializing the RobotRemoteServer class with a test library instance. The server defaults to listening on 127.0.0.1:8270. ```python from robotremoteserver import RobotRemoteServer from mylibrary import MyLibrary RobotRemoteServer(MyLibrary()) ``` -------------------------------- ### Test Remote Server Status Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Provides command-line examples for testing if a Robot Framework remote server is running at a given URI. The `test` argument checks the server's availability. ```bash python -m robotremoteserver test python -m robotremoteserver test http://10.0.0.42:57347 ``` -------------------------------- ### Run Robot Remote Server in Background Thread Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Shows how to start the RobotRemoteServer in a background thread, allowing the main program to continue execution. It includes setting up a signal handler for graceful shutdown (SIGINT) and managing the thread's lifecycle. Note that automatic Ctrl+C handling is not supported in this mode. ```python import signal import threading from examplelibrary import ExampleLibrary from robotremoteserver import RobotRemoteServer server = RobotRemoteServer(ExampleLibrary(), port=0, serve=False) # Register SIGINT handler for graceful shutdown signal.signal(signal.SIGINT, lambda signum, frame: server.stop()) server_thread = threading.Thread(target=server.serve) server_thread.start() while server_thread.is_alive(): server_thread.join(0.1) ``` -------------------------------- ### List Keywords using Libdoc Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Shows how to use the `robot.libdoc` tool to list available keywords from a remote server. This is useful for understanding the API exposed by the server. ```bash python -m robot.libdoc Remote::http://127.0.0.1:8270 list ``` -------------------------------- ### Add, Commit, and Push Release Notes Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Stages the generated release notes file, commits it with a descriptive message, and pushes the changes to the repository. ```bash git add docs/robotremoteserver-$VERSION.rst git commit -m "Release notes for $VERSION" docs/robotremoteserver-$VERSION.rst git push ``` -------------------------------- ### Generate Release Notes Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Generates a template for release notes using the Invoke tool. Options include specifying the version, GitHub credentials, and whether to write to a file or print to the console. Handles preview releases by filtering issues based on labels. ```bash invoke release-notes -w -v $VERSION -u $GITHUB_USERNAME -p $GITHUB_PASSWORD # Omit -w to print to console # Omit -v if version is already set ``` -------------------------------- ### Generate HTML Documentation using Libdoc Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Demonstrates how to use `robot.libdoc` to generate HTML documentation for a remote server. This creates a browsable documentation file for the library. ```bash python -m robot.libdoc Remote::http://127.0.0.1:8270 MyLibrary.html ``` -------------------------------- ### Python Remote Server Enhancements Source: https://github.com/robotframework/pythonremoteserver/blob/master/docs/robotremoteserver-1.1.rst Summary of key enhancements in Python Remote Server 1.1, including Python 3 support, dynamic library API, background server startup, and the @keyword decorator. ```robotframework # Python 3 support # Support for dynamic library API # Support starting server on background # Support @keyword decorator ``` -------------------------------- ### Creating Source and Wheel Distributions Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Generates a source distribution (sdist) and a universal wheel distribution for the Python package. These are the standard formats for distributing Python packages. ```bash python setup.py sdist bdist_wheel --universal ls -l dist ``` -------------------------------- ### Clean Project with Invoke Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Executes the 'clean' task using Invoke to clean the project, likely removing build artifacts or temporary files. ```bash invoke clean ``` -------------------------------- ### Git Status and Update Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Commands to check the current Git branch, status, and to pull changes with rebasing, ensuring the local repository is up-to-date before release preparation. ```bash git branch git status git pull --rebase git push ``` -------------------------------- ### Set GitHub Credentials Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Sets shell variables for GitHub username and password to facilitate authentication for release note generation. Alternatively, credentials can be provided directly when running the command. ```bash GITHUB_USERNAME= GITHUB_PASSWORD= ``` -------------------------------- ### Cleaning Build Artifacts Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Removes temporary files, build directories, and distribution directories to ensure a clean build environment. This command is part of the preparation for creating new distributions. ```bash invoke clean ``` -------------------------------- ### Tagging and Pushing a Release Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Creates an annotated Git tag for a new version and pushes all tags to the remote repository. This is a crucial step for version control and release management. ```bash git tag -a v$VERSION -m "Release $VERSION" git push --tags ``` -------------------------------- ### Set Version in Source Code Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Uses the Invoke tool to update the version information within the project's source file. ```bash invoke set-version $VERSION ``` -------------------------------- ### Set Release Version Variable Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Sets a shell variable 'VERSION' to the desired release version. This is used to easily copy-paste version information into subsequent commands. Supports pre-release postfixes like 'aN', 'bN', or 'rcN'. ```bash VERSION= # Example: VERSION=3.0.1 # Example pre-release: VERSION=3.1a2 ``` -------------------------------- ### RobotRemoteServer Configuration Parameters Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Details the configuration parameters for the RobotRemoteServer class, including library, host, port, port_file, allow_stop, serve, and allow_remote_stop. ```APIDOC RobotRemoteServer: __init__(library, host='127.0.0.1', port=8270, port_file=None, allow_stop='DEPRECATED', serve=True, allow_remote_stop=True) library: Test library instance or module to host. Mandatory argument. host: Address to listen. Use '0.0.0.0' to listen to all available IPv4 interfaces. Defaults to '127.0.0.1'. port: Port to listen. Use 0 to select a free port automatically. Can be given as an integer or as a string. Defaults to 8270. port_file: File to write the port that is used. None (default) means no such file is written. allow_stop: Deprecated since version 1.1. Use allow_remote_stop instead. serve: If True, start the server automatically and wait for it to be stopped. If False, server can be started using the serve method. New in version 1.1. Defaults to True. allow_remote_stop: Allow/disallow stopping the server remotely using 'Stop Remote Server' keyword and 'stop_remote_server' XML-RPC method. New in version 1.1. Defaults to True. ``` -------------------------------- ### Commit and Push Version Update Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Commits the changes made to the source file that updated the version number and pushes the commit to the repository. ```bash git commit -m "Updated version to $VERSION" src/robotremoteserver.py # Note: The original text implies a push here, but it's not explicitly stated as a command. ``` -------------------------------- ### Updating Development Version Source: https://github.com/robotframework/pythonremoteserver/blob/master/BUILD.rst Resets the project to a development version after a release. This typically involves updating a version number in a source file and committing the change. ```bash git checkout master invoke set-version dev git commit -m "Back to dev version" src/robotremoteserver.py git push ``` -------------------------------- ### Programmatically Test Remote Server Source: https://github.com/robotframework/pythonremoteserver/blob/master/README.rst Demonstrates how to programmatically test if a remote server is running using the `test_remote_server` function. This function checks the connectivity to the specified server address. ```python from robotremoteserver import test_remote_server if test_remote_server('http://localhost:8270'): print('Remote server running!') ``` -------------------------------- ### Robot Framework Status Checker Source: https://github.com/robotframework/pythonremoteserver/blob/master/requirements-dev.txt A Python script to check the status of Robot Framework execution, likely used for monitoring or integration purposes. ```python from robotremoteserver import RobotRemoteServer class StatusChecker: def get_status(self): # Placeholder for status checking logic return "OK" if __name__ == '__main__': server = RobotRemoteServer(StatusChecker(), port=8270) server.serve_forever() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.