GithubHelp home page GithubHelp logo

regression-testing's Introduction

Regression testing tool using Wandb API.

Usage:

The tool can be used through importing the PyPI package for the tool:

from regressiontestingreport import report_generation

From here, a report can be generated by calling the "generate_report" function with a parameter you want to track, the name of your Wandb project project, and the name of your Wandb entity:

report_generation.generate_report(<parameter_name>, <project_name>, <entity_name>)

Your Wandb key should be included as a environment variable if you wish to automatically log in (Wandb may prompt you to create an account otherwise).

Example Usage:

The report generation function can be used in tandem with arg-parsing and a job scheduler to automatically generate a report every day. An example of a simple script that takes in inputs for the report function through the command line and then generates a report with them is provided below:

daily_report.py:

# Imports
from regressiontestingreport import report_generation
import wandb
import argparse

# Login
wandb.login(key=wandb_key)


# Arg-parsing to take in <parameter_name>, <project_name>, <entity_name> from the command line
parser = argparse.ArgumentParser(description='Take in inputs')
parser.add_argument('my_param', metavar='param', type=str, nargs=1,
                    help='The parameter you wish to log')
parser.add_argument('project_name', metavar='project name', type=str, nargs=1,
                    help='The name of the project')
parser.add_argument('entity_name', metavar='entity name', type=str, nargs=1,
                    help='The name of the entity who owns the project')
args = parser.parse_args()

# Generate and return a report 
my_report = report_generation.generate_report(args.my_param[0], args.project_name[0], args.entity_name[0])

Daily Report Generation Through Cronjob:

Cron is a tool that can help schedule jobs on Unix-like operating systems. The syntax generally involves 5 arguments that specify the schedule (min [0-59], hour [0-23], day of month [1-31], month [1-12], and day of week [0-6]), followed by a command to execute. An example for daily report generation at 2:00 AM is provided below:

0 2 * * * <path_to_python> <path_to_python_script> <parameter_name> <project_name> <entity_name>

regression-testing's People

Contributors

alexjajaja123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.