Skip to content

COLLECT previous frame details for good JSON data using inspect module, and MATCH it against future JSON data to detect errors that would otherwise go unnoticed, or make the program to fail elsewhere.

Notifications You must be signed in to change notification settings

GautamGadipudi/tracky

Repository files navigation

Silent JSON changes detector

example workflow Python 3.9.4 RIT-CS

In this capstone project, we implement a static class in Python3 with static methods to capture details about the operations - frame metadata - performed on JSON data, log this frame metadata, and match it against target frame metadata to discover examples and scenarios of silent JSON errors in Python3 programs.

Getting the code

Run either of the below commands in the terminal:

# for https connections
git clone https://github.com/GautamGadipudi/tracky.git

# for ssh connections
git clone [email protected]:GautamGadipudi/tracky.git

Installation

Requirements:

  1. Python 3.9.4

Install dependencies:

cd tracky

python -m pip install --upgrade pip
pip install -r requirements.txt
# Make sure you have modules accessible to the interpretter
export PYTHONPATH="$PYTHONPATH:<your-relative-path-to-repo>/src"

Running the code


All programs are located in ./src/programs/


1. As a CLI:

# see usage and get help
python3 <path-to-a-program> --help
# collect mode
python3 <path-to-a-program> collect 
    --jsoninputpath <filename> 
    --outputdirectory <path>
# match mode
python3 <path-to-a-program> match 
    --jsoninputpath <filename> 
    --targetfile <filename>

Use -v or --verbose to enable verbose console logging

2. Using built-in configurations (scenarios) in VSCode:

This approach is recommended when debugging.

# open cloned repository in VSCode
code .

or just open the cloned repository in a new VSCode window

  1. Open the "Run" tab in VSCode (shortcut - shift + + D)
  2. Select a scenario to run from the "RUN" dropdown (typically on the top right corner)
  3. Click the green play button ("Start Debugging" button)

3. Run all programs (both collect and match), for all overloaded methods, for all examples

python3 ./src/tests/run_all.py

Control flow

About

COLLECT previous frame details for good JSON data using inspect module, and MATCH it against future JSON data to detect errors that would otherwise go unnoticed, or make the program to fail elsewhere.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages