echo "Reinstalling library"
pip install -e .
rm dl4to.egg-info/ -r

echo "Testing all notebooks"
time nbdev_test_nbs --fname "notebooks/preprocessing/1_problem_preprocessing.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/preprocessing/2_solution_preprocessing.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/preprocessing/0_preprocessing.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/solution/1_solution.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/solution/0_plotting_for_solution.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/criteria/0_criteria.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/criteria/2_unsupervised_criteria.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/criteria/1_supervised_criteria.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/datasets/4_selto_dataset.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/datasets/1_topo_dataset.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/datasets/3_csv_dataset.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/datasets/0_csv_converter.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/datasets/2_basic_dataset.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/utils/infection.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/utils/utils.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/density_representers/2_filtering_density_representer.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/density_representers/1_density_representer.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/density_representers/3_deep_image_prior_density_representer.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/density_representers/0_density_filters.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/plotting/3d_plotting.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/plotting/logs_plotting.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/models/0_conv.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/models/5_equivariance_wrapper.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/models/1_encoding.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/models/4_deep_image_prior.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/models/2_decoding.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/models/3_unet.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/pde/2_pde_solver.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/pde/1_sparse_linear_solver.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/pde/6_fdm.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/pde/0_linear_solver.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/pde/3_fdm_derivatives.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/pde/4_fdm_assembly.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/pde/5_unpadded_fdm.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/problem/0_plotting_for_problem.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/problem/2_problem.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/problem/1_input_checker_for_problem.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/5_simp.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/0_eval_module.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/4_simp_iterator.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/3_trivial_solver.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/2_topo_solver.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/6_oracle_topo_solver.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/1_training_module.ipynb" --flags "$1"
time nbdev_test_nbs --fname "notebooks/topo_solvers/7_trainable_topo_solver.ipynb" --flags "$1"
