rf-shared-resources
Library for importing Robot Framework resource files from python libraries. See examples/ directory for an example of Python library with embedded Robot Framework resources and usage of this library.
Usage
There are three different ways to import resources with this library: inside the Python library that contains the resources, in Settings table with initialization parameters, or through a keyword.
Inside a Python library
from SharedResources import SharedResources
class EmbeddedResources(SharedResources):
def __init__(self):
super().__init__(
'EmbeddedResources.resources',
'a_keywords.resource',
'b_keywords.robot')
In settings table
*** Settings ***
Library SharedResources EmbeddedResources
... a_keywords.resource b_keywords.robot
Through a keyword
*** Settings ***
Library SharedResources
*** Keywords ***
Load resources
Import resource from package EmbeddedResources.resources
... a_keywords.resource b_keywords.robot
Testing
Check and automatically fix formatting with:
pycodestyle SharedResources
autopep8 -aaar --in-place SharedResources
Run static analysis with:
pylint -E --enable=invalid-name,unused-import,useless-object-inheritance SharedResources
Run acceptance tests:
# Run acceptance tests
robot -L TRACE:INFO -d out/ acceptance_tests/
# Run acceptance tests with coverage analysis
coverage run \
--branch \
--source SharedResources/ \
-m robot -L TRACE:INFO -d out/ acceptance_tests/
coverage report -m
Run acceptance tests in Docker container:
# Build image
docker build . -t atest
# Run acceptance tests
docker run --rm atest
# Run acceptance tests and get test output to ./out
docker run -v $(pwd)/out:/out --rm atest -d /out -L TRACE:INFO
Generate documentation with:
python3 -m robot.libdoc SharedResources docs/index.html
Metadata
Release files for rf-shared-resources 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rf-shared-resources-0.1.2.tar.gz | 3.9 kB | Without provenance | Details for rf-shared-resources-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rf_shared_resources-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for rf_shared_resources-0.1.2-py3-none-any.whl |
Total release size: 8.8 kB
Security for rf-shared-resources 0.1.2
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.