|
42 | 42 | " src=\"https://www.youtube-nocookie.com/embed/qcnmi6PgrKg\"\n", |
43 | 43 | " frameborder=\"0\"\n", |
44 | 44 | " allowfullscreen\n", |
| 45 | + " \n", |
45 | 46 | " ></iframe>\n", |
46 | 47 | " " |
47 | 48 | ], |
48 | 49 | "text/plain": [ |
49 | | - "<IPython.lib.display.IFrame at 0x10405ffd0>" |
| 50 | + "<IPython.lib.display.IFrame at 0x112d27250>" |
50 | 51 | ] |
51 | 52 | }, |
52 | 53 | "execution_count": 1, |
|
91 | 92 | "output_type": "stream", |
92 | 93 | "text": [ |
93 | 94 | "Processing /Users/marius/Desktop/work/projects/sflkit\n", |
94 | | - " Preparing metadata (setup.py) ... \u001b[?25ldone\n", |
95 | | - "\u001b[?25hRequirement already satisfied: astor in /Users/marius/.pyenv/versions/3.10.4/lib/python3.10/site-packages (from sflkit==0.0.1) (0.8.1)\n", |
96 | | - "Requirement already satisfied: numpy in /Users/marius/.pyenv/versions/3.10.4/lib/python3.10/site-packages (from sflkit==0.0.1) (1.21.4)\n", |
| 95 | + " Installing build dependencies ... \u001b[?25ldone\n", |
| 96 | + "\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n", |
| 97 | + "\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n", |
| 98 | + "\u001b[?25hRequirement already satisfied: sflkitlib>=0.0.1 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from sflkit==0.2.6) (0.0.1)\n", |
| 99 | + "Requirement already satisfied: astor>=0.8.1 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from sflkit==0.2.6) (0.8.1)\n", |
| 100 | + "Requirement already satisfied: numpy==1.25.1 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from sflkit==0.2.6) (1.25.1)\n", |
| 101 | + "Requirement already satisfied: matplotlib==3.7.2 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from sflkit==0.2.6) (3.7.2)\n", |
| 102 | + "Requirement already satisfied: sortedcollections>=2.1.0 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from sflkit==0.2.6) (2.1.0)\n", |
| 103 | + "Requirement already satisfied: parameterized>=0.8.1 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from sflkit==0.2.6) (0.9.0)\n", |
| 104 | + "Requirement already satisfied: contourpy>=1.0.1 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (1.1.0)\n", |
| 105 | + "Requirement already satisfied: cycler>=0.10 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (0.11.0)\n", |
| 106 | + "Requirement already satisfied: fonttools>=4.22.0 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (4.40.0)\n", |
| 107 | + "Requirement already satisfied: kiwisolver>=1.0.1 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (1.4.4)\n", |
| 108 | + "Requirement already satisfied: packaging>=20.0 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (23.1)\n", |
| 109 | + "Requirement already satisfied: pillow>=6.2.0 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (9.5.0)\n", |
| 110 | + "Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (2.4.7)\n", |
| 111 | + "Requirement already satisfied: python-dateutil>=2.7 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from matplotlib==3.7.2->sflkit==0.2.6) (2.8.2)\n", |
| 112 | + "Requirement already satisfied: sortedcontainers in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from sortedcollections>=2.1.0->sflkit==0.2.6) (2.4.0)\n", |
| 113 | + "Requirement already satisfied: six>=1.5 in /Users/marius/.pyenv/versions/3.11.1/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib==3.7.2->sflkit==0.2.6) (1.16.0)\n", |
97 | 114 | "Building wheels for collected packages: sflkit\n", |
98 | | - " Building wheel for sflkit (setup.py) ... \u001b[?25ldone\n", |
99 | | - "\u001b[?25h Created wheel for sflkit: filename=sflkit-0.0.1-py3-none-any.whl size=36849 sha256=d7f1eb74bf255ce6931a3cf46b9a96d1b4a0115e9a6a1007ba04db8886cd5326\n", |
100 | | - " Stored in directory: /private/var/folders/09/pt1hglws43n7fh5521n6zyyh0000gn/T/pip-ephem-wheel-cache-w99ak0ft/wheels/17/26/2b/95e39722d6155ccf3490ca6319b00bd6c3f0644a3cffeed02e\n", |
| 115 | + " Building wheel for sflkit (pyproject.toml) ... \u001b[?25ldone\n", |
| 116 | + "\u001b[?25h Created wheel for sflkit: filename=sflkit-0.2.6-py3-none-any.whl size=39297 sha256=aa8c1331ed527c0a89c0632b24b0ba146eab95760564d41188ef489542d5f516\n", |
| 117 | + " Stored in directory: /private/var/folders/09/pt1hglws43n7fh5521n6zyyh0000gn/T/pip-ephem-wheel-cache-1d3qc8oo/wheels/eb/95/8a/7bf6ee4d50417cf8e084552e4c6c5c1932d1e96f61309af921\n", |
101 | 118 | "Successfully built sflkit\n", |
102 | 119 | "Installing collected packages: sflkit\n", |
103 | 120 | " Attempting uninstall: sflkit\n", |
104 | | - " Found existing installation: sflkit 0.0.1\n", |
105 | | - " Uninstalling sflkit-0.0.1:\n", |
106 | | - " Successfully uninstalled sflkit-0.0.1\n", |
107 | | - "Successfully installed sflkit-0.0.1\n" |
| 121 | + " Found existing installation: sflkit 0.2.6\n", |
| 122 | + " Uninstalling sflkit-0.2.6:\n", |
| 123 | + " Successfully uninstalled sflkit-0.2.6\n", |
| 124 | + "Successfully installed sflkit-0.2.6\n" |
108 | 125 | ] |
109 | 126 | } |
110 | 127 | ], |
|
651 | 668 | }, |
652 | 669 | { |
653 | 670 | "cell_type": "code", |
654 | | - "execution_count": 16, |
| 671 | + "execution_count": 19, |
655 | 672 | "id": "b0cd0637-7b4a-4736-80a3-6211b7e529c9", |
656 | 673 | "metadata": {}, |
657 | 674 | "outputs": [], |
658 | 675 | "source": [ |
659 | 676 | "def get_config():\n", |
660 | | - " return Config.config(path=middle_py, working=tmp_py, language=language, predicates=predicates, metrics=metrics, passing=passing, failing=failing)" |
| 677 | + " return Config.create(path=middle_py, working=tmp_py, language=language, predicates=predicates, metrics=metrics, passing=passing, failing=failing)" |
661 | 678 | ] |
662 | 679 | }, |
663 | 680 | { |
|
670 | 687 | }, |
671 | 688 | { |
672 | 689 | "cell_type": "code", |
673 | | - "execution_count": 17, |
| 690 | + "execution_count": 20, |
674 | 691 | "id": "d0a87958-fbf9-4ad8-91c5-c4f9526ebcc5", |
675 | 692 | "metadata": {}, |
676 | 693 | "outputs": [], |
|
692 | 709 | }, |
693 | 710 | { |
694 | 711 | "cell_type": "code", |
695 | | - "execution_count": 18, |
| 712 | + "execution_count": 21, |
696 | 713 | "id": "c19129e7-cf49-4028-8997-76afeafc9324", |
697 | 714 | "metadata": {}, |
698 | 715 | "outputs": [ |
699 | 716 | { |
700 | 717 | "name": "stdout", |
701 | 718 | "output_type": "stream", |
702 | 719 | "text": [ |
703 | | - "import sflkit.instrumentation.lib\n", |
| 720 | + "import sflkitlib.lib\n", |
704 | 721 | "\n", |
705 | 722 | "\n", |
706 | 723 | "def middle(x, y, z):\n", |
707 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 2, 0)\n", |
| 724 | + " sflkitlib.lib.add_line_event('middle.py', 2, 0)\n", |
708 | 725 | " m = z\n", |
709 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 3, 1)\n", |
| 726 | + " sflkitlib.lib.add_line_event('middle.py', 3, 1)\n", |
710 | 727 | " if y < z:\n", |
711 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 4, 2)\n", |
| 728 | + " sflkitlib.lib.add_line_event('middle.py', 4, 2)\n", |
712 | 729 | " if x < y:\n", |
713 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 5, 3)\n", |
| 730 | + " sflkitlib.lib.add_line_event('middle.py', 5, 3)\n", |
714 | 731 | " m = y\n", |
715 | 732 | " else:\n", |
716 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 6, 4)\n", |
| 733 | + " sflkitlib.lib.add_line_event('middle.py', 6, 4)\n", |
717 | 734 | " if x < z:\n", |
718 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 7, 5)\n", |
| 735 | + " sflkitlib.lib.add_line_event('middle.py', 7, 5)\n", |
719 | 736 | " m = y\n", |
720 | 737 | " else:\n", |
721 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 9, 6)\n", |
| 738 | + " sflkitlib.lib.add_line_event('middle.py', 9, 6)\n", |
722 | 739 | " if x > y:\n", |
723 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 10, 7)\n", |
| 740 | + " sflkitlib.lib.add_line_event('middle.py', 10, 7)\n", |
724 | 741 | " m = y\n", |
725 | 742 | " else:\n", |
726 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 11, 8)\n", |
| 743 | + " sflkitlib.lib.add_line_event('middle.py', 11, 8)\n", |
727 | 744 | " if x > z:\n", |
728 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 12, 9)\n", |
| 745 | + " sflkitlib.lib.add_line_event('middle.py', 12, 9)\n", |
729 | 746 | " m = x\n", |
730 | | - " sflkit.instrumentation.lib.add_line_event('middle.py', 13, 10)\n", |
| 747 | + " sflkitlib.lib.add_line_event('middle.py', 13, 10)\n", |
731 | 748 | " return m\n", |
732 | 749 | "\n" |
733 | 750 | ] |
|
763 | 780 | }, |
764 | 781 | { |
765 | 782 | "cell_type": "code", |
766 | | - "execution_count": 19, |
| 783 | + "execution_count": 32, |
767 | 784 | "id": "a5daf879-9158-402f-8b5f-bab67f4736da", |
768 | 785 | "metadata": {}, |
769 | 786 | "outputs": [], |
770 | 787 | "source": [ |
771 | 788 | "def test_tmp(x, y, z, expected): \n", |
772 | 789 | " import tmp\n", |
773 | 790 | " importlib.reload(tmp)\n", |
774 | | - " tmp.sflkit.instrumentation.lib.reset()\n", |
| 791 | + " tmp.sflkitlib.lib.reset()\n", |
775 | 792 | " try:\n", |
776 | 793 | " return test(tmp.middle, x, y, z, expected)\n", |
777 | 794 | " finally:\n", |
778 | | - " tmp.sflkit.instrumentation.lib.dump_events()\n", |
| 795 | + " tmp.sflkitlib.lib.dump_events()\n", |
779 | 796 | " del tmp" |
780 | 797 | ] |
781 | 798 | }, |
|
789 | 806 | }, |
790 | 807 | { |
791 | 808 | "cell_type": "code", |
792 | | - "execution_count": 20, |
| 809 | + "execution_count": 33, |
793 | 810 | "id": "823303be-b13f-4405-9186-857625aec1b1", |
794 | 811 | "metadata": {}, |
795 | 812 | "outputs": [], |
|
807 | 824 | }, |
808 | 825 | { |
809 | 826 | "cell_type": "code", |
810 | | - "execution_count": 21, |
| 827 | + "execution_count": 34, |
811 | 828 | "id": "e084ac5b-b15e-47d0-8cda-4dc14adbb2e9", |
812 | 829 | "metadata": {}, |
813 | 830 | "outputs": [], |
|
834 | 851 | }, |
835 | 852 | { |
836 | 853 | "cell_type": "code", |
837 | | - "execution_count": 22, |
| 854 | + "execution_count": 35, |
838 | 855 | "id": "d922df2e-39a9-4aea-a926-b9275bdd9197", |
839 | 856 | "metadata": {}, |
840 | 857 | "outputs": [], |
|
854 | 871 | }, |
855 | 872 | { |
856 | 873 | "cell_type": "code", |
857 | | - "execution_count": 23, |
| 874 | + "execution_count": 36, |
858 | 875 | "id": "f52db0b7-4423-49a2-b79c-3bff82e9f084", |
859 | 876 | "metadata": {}, |
860 | 877 | "outputs": [], |
|
872 | 889 | }, |
873 | 890 | { |
874 | 891 | "cell_type": "code", |
875 | | - "execution_count": 24, |
| 892 | + "execution_count": 37, |
876 | 893 | "id": "cd538827-c2b6-45fe-a3bf-1bae6e213223", |
877 | 894 | "metadata": {}, |
878 | 895 | "outputs": [ |
879 | 896 | { |
880 | 897 | "data": { |
881 | 898 | "text/plain": [ |
882 | 899 | "{'LINE': {'Tarantula': [[middle.py:7]:1.0,\n", |
883 | | - " [middle.py:4]:0.6666666666666666,\n", |
884 | | - " [middle.py:6]:0.6666666666666666,\n", |
885 | | - " [middle.py:13]:0.5,\n", |
886 | | - " [middle.py:2]:0.5,\n", |
887 | | - " [middle.py:3]:0.5,\n", |
888 | | - " [middle.py:9]:0.0,\n", |
889 | | - " [middle.py:10]:0.0]}}" |
| 900 | + " [middle.py:4, middle.py:6]:0.6666666666666666,\n", |
| 901 | + " [middle.py:3, middle.py:13, middle.py:2]:0.5,\n", |
| 902 | + " [middle.py:9, middle.py:10]:0.0]}}" |
890 | 903 | ] |
891 | 904 | }, |
892 | | - "execution_count": 24, |
| 905 | + "execution_count": 37, |
893 | 906 | "metadata": {}, |
894 | 907 | "output_type": "execute_result" |
895 | 908 | } |
|
916 | 929 | }, |
917 | 930 | { |
918 | 931 | "cell_type": "code", |
919 | | - "execution_count": 25, |
| 932 | + "execution_count": 38, |
920 | 933 | "id": "d2e2b4ed-5c28-45c9-bb12-bd746e7bc966", |
921 | 934 | "metadata": {}, |
922 | 935 | "outputs": [], |
|
930 | 943 | }, |
931 | 944 | { |
932 | 945 | "cell_type": "code", |
933 | | - "execution_count": 26, |
| 946 | + "execution_count": 39, |
934 | 947 | "id": "a7a490d9-7622-4e46-968e-aeb0d7b368b0", |
935 | 948 | "metadata": {}, |
936 | 949 | "outputs": [ |
|
965 | 978 | "<IPython.core.display.HTML object>" |
966 | 979 | ] |
967 | 980 | }, |
968 | | - "execution_count": 26, |
| 981 | + "execution_count": 39, |
969 | 982 | "metadata": {}, |
970 | 983 | "output_type": "execute_result" |
971 | 984 | } |
|
1010 | 1023 | }, |
1011 | 1024 | { |
1012 | 1025 | "cell_type": "code", |
1013 | | - "execution_count": 27, |
| 1026 | + "execution_count": 40, |
1014 | 1027 | "id": "bf3f66c0-1131-4017-bbd2-a4d68eec4c22", |
1015 | 1028 | "metadata": {}, |
1016 | 1029 | "outputs": [ |
|
1046 | 1059 | "<IPython.core.display.HTML object>" |
1047 | 1060 | ] |
1048 | 1061 | }, |
1049 | | - "execution_count": 27, |
| 1062 | + "execution_count": 40, |
1050 | 1063 | "metadata": {}, |
1051 | 1064 | "output_type": "execute_result" |
1052 | 1065 | } |
|
1082 | 1095 | }, |
1083 | 1096 | { |
1084 | 1097 | "cell_type": "code", |
1085 | | - "execution_count": 28, |
| 1098 | + "execution_count": 41, |
1086 | 1099 | "id": "416d8d9f-2636-4e79-8dd4-83d5c3a3e68f", |
1087 | 1100 | "metadata": {}, |
1088 | 1101 | "outputs": [ |
|
1118 | 1131 | "<IPython.core.display.HTML object>" |
1119 | 1132 | ] |
1120 | 1133 | }, |
1121 | | - "execution_count": 28, |
| 1134 | + "execution_count": 41, |
1122 | 1135 | "metadata": {}, |
1123 | 1136 | "output_type": "execute_result" |
1124 | 1137 | } |
|
1154 | 1167 | }, |
1155 | 1168 | { |
1156 | 1169 | "cell_type": "code", |
1157 | | - "execution_count": 29, |
| 1170 | + "execution_count": 42, |
1158 | 1171 | "id": "0c9dcfc0-98db-4151-a0bd-44862985a3b4", |
1159 | 1172 | "metadata": {}, |
1160 | 1173 | "outputs": [ |
|
1190 | 1203 | "<IPython.core.display.HTML object>" |
1191 | 1204 | ] |
1192 | 1205 | }, |
1193 | | - "execution_count": 29, |
| 1206 | + "execution_count": 42, |
1194 | 1207 | "metadata": {}, |
1195 | 1208 | "output_type": "execute_result" |
1196 | 1209 | } |
|
1230 | 1243 | "id": "501b70f5-3276-45e8-9e48-7331964004d7", |
1231 | 1244 | "metadata": {}, |
1232 | 1245 | "source": [ |
1233 | | - "https://github.com/uds-se/sflkit\n", |
1234 | | - "\n", |
1235 | | - "<img src=\"qrcode.png\" style=\"width:500px\">" |
| 1246 | + "https://github.com/uds-se/sflkit" |
1236 | 1247 | ] |
1237 | 1248 | } |
1238 | 1249 | ], |
|
1252 | 1263 | "name": "python", |
1253 | 1264 | "nbconvert_exporter": "python", |
1254 | 1265 | "pygments_lexer": "ipython3", |
1255 | | - "version": "3.10.4" |
| 1266 | + "version": "3.11.1" |
1256 | 1267 | } |
1257 | 1268 | }, |
1258 | 1269 | "nbformat": 4, |
|
0 commit comments