Skip to main content

Formulated Logo

Formulated Autoamation RPA Resources

FormulatedAutomation-Profiler

FormulatedAutomation PyPI version

image

Introduction

The purpose of this project is to record a snapshot of the runtime environment for an automation workspace. This includes recording installed applications and their versions on the machine. This is especially useful when automations stop working and allows for rapid debugging of machine prior and current states.

⚠️ This project is currently a work in process and should not be used in production environments. ⚠️

Installation

  • Create a virtual environment
  • pip install fa-profiler

Usage

Profiler

*** Settings ***
Library                 FormulatedAutomation.Profiler
Suite Teardown          Teardown

*** Keywords ***
Teardown
    Write Profile

If you look in the 'output' directory (which is the current directory, or whatever you speficy at runtime), you'll find an fa_report.yml file. In this file is a profile of the system you ran on, which includes things like

  • Python version and installed packages
  • Environment variables
  • Robot Framework variables (Secrets omitted)
  • Installed programs(on Windows)

It's organized in a way that makes 'diffing' it with a previous report trivial and therefore makes it easy to see what's changed between runs.

Sample Report from Windows CI
Sample Report from Linux CI

Omitting secrets from the profile

There's a good chance you're setting a varaible to something you don't want listed in the logs. In order to prevent secrets from leaking, Profiler will 'redact' any variables with 'secret' in their name. This will later be configurable.

Debugging

The Formulated Automation Profiler also includes some basic debugging tools.

*** Settings ***
Library                 FormulatedAutomation.Profiler
Suite Teardown          Teardown

*** Keywords ***
Teardown
    Pause On Failure # Launch a Dialog to pause execution whenever a task fails
    Write Profile

*** Keywords ***
Some Task
    Set Breakpoint # Pause execution and drop to Python's 'pdb' debugger
    Do Some Other Task
    Pause for Debug # Pause with a Dialog regardless of failure

Pause on Failure and Pause for Debug only occur if the environment variable 'ROBOT_DEBUG' is set to TRUE. This prevents pausing in production if the keywords are accidentally set.

Command Line Example:

Powershell: $Env:ROBOT_DEBUG = "TRUE"; robot -d output -P src tests
Bash: ROBOT_DEBUG=TRUE && robot -d output -P src tests

Testing

This library expects teh ROBOT_DEBUG environment variable to be set. You can do this however suits your platform:

Powershell: $Env:ROBOT_DEBUG = "TRUE"; robot -d output -P src tests
Bash: ROBOT_DEBUG=TRUE && robot -d output -P src tests

Execute the tests in this project:

robot -d output -P src tests

Metadata

Release files for fa-profiler 0.1.3

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

Source distribution (sdist)

Source distribution for fa-profiler 0.1.3
File Size Uploaded
fa-profiler-0.1.3.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fa-profiler 0.1.3
File Interpreter ABI Platform
fa_profiler-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / fa-profiler-0.1.3.tar.gz

Download URL fa-profiler-0.1.3.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1d5190dc1af3058b6242ae46b38ad0d7cf16ff393e6b1112cb363fe12b7e426f
BLAKE2b-256 checksum
How to use checksums
ed3f32287c155085abf6ba4c73c70327e8575c511d3c5805418e8dee6fdcbef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

Release files / fa_profiler-0.1.3-py3-none-any.whl

Download URL fa_profiler-0.1.3-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc6260daf75a46a4b76403ae0457d18b85bf6a99f2544fb1ec185df5d58e2b8f
BLAKE2b-256 checksum
How to use checksums
e66372da7debab0636b101e7011ea44981394e3a7ebaf44414e87a217926e013
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

1 release file

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