Utilizing and testing our package
We have started building out our solution in a Python package coded in Rust. However, we need to justify to our team and ourselves that all this effort was worth it. We can test to see whether we should continue with our efforts in a single isolated Python script. In this Python script, we can test by following these steps:
- Build a Python construct model using pandas.
- Build random event ID generator functions.
- Time our Python and Rust implementations with a series of different data sizes.
Once we have carried out all the aforementioned steps, we will know whether we should progress further with our module.
In our testing script, before we start coding anything, we must import all of what we need with the following code:
import random import time import matplotlib.pyplot as plt import pandas as pd from flitton_oasis_risk_modelling import construct_model
Here, we are using the random
module to generate random event IDs...