validate
#
Modules:
-
tests–Validation testing that all orders have been included
Functions:
-
count_initial_order–Internal function to count the total number of orders
-
count_initial_back_personalisations–Internal function to count the total
-
count_initial_sleeve_personalisations–Internal function to count the total number of orders
-
count_processed_order–Internal function to count the total number of items in a
-
count_processed_back_personalisations–Internal function to count the total number of requested back
-
count_processed_sleeve_personalisations–Internal function to count the total number of requested back
-
assert_order_count–Assert that the item count in the DataFrame of
-
assert_back_personalisations–Assert that the back name personalisations count in the
-
assert_sleeve_personalisations–Assert that the sleeve name personalisations count in the
count_initial_order
#
Internal function to count the total number of orders Some code is repeated in count_initial_back_personalisations and count_initial_sleeve_personalisations but cba to change it
Source code in plkit/validate/tests.py
count_initial_back_personalisations
#
Internal function to count the total number of back name personalisations
Source code in plkit/validate/tests.py
count_initial_sleeve_personalisations
#
Internal function to count the total number of orders
Source code in plkit/validate/tests.py
count_processed_order
#
Internal function to count the total number of items in a processed order form - could make this a bit simpler actually
Source code in plkit/validate/tests.py
count_processed_back_personalisations
#
Internal function to count the total number of requested back name personalisations
Source code in plkit/validate/tests.py
count_processed_sleeve_personalisations
#
Internal function to count the total number of requested back name personalisations
Source code in plkit/validate/tests.py
assert_order_count
#
Assert that the item count in the DataFrame of products to order matches the total number of items in the initial order.
Parameters#
df_orders: _pd.DataFrame The order details converted to a pandas DataFrame df_products: _pd.DataFrame Full order details for every product, completed with the orders contained in df_orders
Returns#
None
Source code in plkit/validate/tests.py
assert_back_personalisations
#
Assert that the back name personalisations count in the DataFrame of products to order matches the total number of personalisations in the initial order.
Parameters#
df_orders: _pd.DataFrame The order details converted to a pandas DataFrame df_personal: __pd.DataFrame Full personalisation details for every product, completed with the orders contained in df_orders
Returns#
None
Source code in plkit/validate/tests.py
assert_sleeve_personalisations
#
Assert that the sleeve name personalisations count in the DataFrame of products to order matches the total number of personalisations in the initial order.
Parameters#
df_orders: _pd.DataFrame The order details converted to a pandas DataFrame df_personal: __pd.DataFrame Full personalisation details for every product, completed with the orders contained in df_orders
Returns#
None