Skip to content

Commit 55e7afc

Browse files
committed
first steps to static type checking
1 parent 0a54bf6 commit 55e7afc

File tree

6 files changed

+177
-12
lines changed

6 files changed

+177
-12
lines changed

bibliography/bibliography.bib

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ @string { a_beuke_fabian
3838
@string { a_beygelzimer_alina = "Alina Beygelzimer" }
3939
@string { a_blin_kai = "Kai Blin" }
4040
@string { a_blondel_mathieu = "Mathieu Blondel" }
41+
@string { a_bommarito_ethan = "Ethan Bommarito" }
42+
@string { a_bommarito_michael = "Michael Bommarito" }
4143
@string { a_bose_cherokee = "Cherokee Boose" }
4244
@string { a_bott_ed = "Ed Bott" }
4345
@string { a_bradbury_james = "James Bradbury" }
@@ -83,6 +85,7 @@ @string { a_flannery_brian_p
8385
@string { a_flight_robert_m = "Robert M.\ Flight" }
8486
@string { a_fox_emily_b = "Emily B.\ Fox" }
8587
@string { a_fufezan_christian = "Christian Fufezan" }
88+
@string { a_garcia_alessandro = "Alessandro Garcia" }
8689
@string { a_garnett_roman = "Roman Garnett" }
8790
@string { a_gatto_laurent = "Laurent Gatto" }
8891
@string { a_gerard_marchant_pierre = "Pierre G{\'e}rard{-}Marchant" }
@@ -99,17 +102,20 @@ @string { a_grus_joel
99102
@string { a_grys_slawomir = "S{\l}awomir Gry{\'s}" }
100103
@string { a_haberland_matt = "Matt Haberland" }
101104
@string { a_haldane_allan = "Allan Haldane" }
105+
@string { a_hance_jared = "Jared Hance" }
102106
@string { a_harris_charles_r = "Charles R.\ Harris" }
103107
@string { a_hausenblas_michael = "Michael Hausenblas" }
104108
@string { a_heap_danny = "Danny Heap" }
105109
@string { a_henriksen_ian = "Ian Henriksen" }
110+
@string { a_herbsleb_james_d = "James D.\ Herbsleb" }
106111
@string { a_hollasch_steve = "Steve Hollasch" }
107112
@string { a_hoyer_stephan = "Stephan Hoyer" }
108113
@string { a_hubbard_steve = "Steve Hubbard" }
109114
@string { a_hunter_john_d = "John D. Hunter" }
110115
@string { a_hunt_john = "John Hunt" }
111116
@string { a_irving_geoffrey = "Geoffrey Irving" }
112117
@string { a_isard_michael = "Michael Isard" }
118+
@string { a_jain_shantanu = "Shantanu Jain" }
113119
@string { a_johansson_robert = "Robert Johansson" }
114120
@string { a_jones_eric = "Eric Jones" }
115121
@string { a_katz_daniel_s = "Daniel S.\ Katz" }
@@ -125,11 +131,14 @@ @string { a_landau_charles
125131
@string { a_larochelle_hugo = "Hugo Larochelle" }
126132
@string { a_larson_eric = "Eric Larson" }
127133
@string { a_laxalde_denis = "Denis Laxalde" }
134+
@string { a_leavens_gary_t = "Gary T.\ Leavens" }
128135
@string { a_lee_kent_d = "Kent D.\ Lee" }
136+
@string { a_lehtosalo_jukka = "Jukka Lehtosalo" }
129137
@string { a_lerer_adam = "Adam Lerer" }
130138
@string { a_lerner_reuven_m = "Reuven M.\ Lerner" }
131139
@string { a_leuck_daniel = "Daniel Leuck" }
132140
@string { a_levenberg_josh = "Josh Levenberg" }
141+
@string { a_levkivskyi_ivan = "Ivan Levkivskyi" }
133142
@string { a_lin_zeming = "Zeming Lin" }
134143
@string { a_liu_yuxi = "Yuxi Liu" }
135144
@string { a_loy_marc = "Marc Loy" }
@@ -157,6 +166,7 @@ @string { a_oconnor_john_j
157166
@string { a_oliphant_travis_e = "Travis E.\ Oliphant" }
158167
@string { a_pajankar_ashwin = "Ashwin Pajankar" }
159168
@string { a_paquete_luis = "Lu{\'i}s Paquete" }
169+
@string { a_pasareanu_corina_s = "Corina S.\ P{\u{a}}s{\u{a}}reanu" }
160170
@string { a_passos_alexandre = "Alexandre Passos" }
161171
@string { a_paszke_adam = "Adam Paszke" }
162172
@string { a_pearson_kenneth_r = "Kenneth R.\ Pearson" }
@@ -189,10 +199,13 @@ @string { a_sheppart_kevin
189199
@string { a_silva_sara = "Sara Silva" }
190200
@string { a_skoulikari_anna = "Anna Skoulikari" }
191201
@string { a_smith_eric_v = "Eric V.\ Smith" }
202+
@string { a_smith_ethan = "Ethan Smith" }
192203
@string { a_smith_nathaniel_j = "Nathaniel J.\ Smith" }
204+
@string { a_sobolev_nikita = "Nikita Sobolev" }
193205
@string { a_sottet_jean_sebastien = "Jean{-}S{\'e}bastien Sottet" }
194206
@string { a_steiner_benoit = "Benoit Steiner" }
195207
@string { a_straffin_jr_philip_d = "Philip D.\ {Straffin~Jr.}" }
208+
@string { a_sullival_michael_j = "Michael J.\ Sullivan" }
196209
@string { a_taylor_julian = "Julian Taylor" }
197210
@string { a_tejani_alykhan = "Alykhan Tejani" }
198211
@string { a_ternent_tobias = "Tobias Ternent" }
@@ -204,6 +217,7 @@ @string { a_torvalds_linus
204217
@string { a_tsitoara_mariot = "Mariot Tsitoara" }
205218
@string { a_tucker_paul_a = "Paul A.\ Tucker" }
206219
@string { a_uszkoreit_julian = "Julian Uszkoreit" }
220+
@string { a_valiev_marat = "Marat Valiev" }
207221
@string { a_vanderplas_jake = "Jake {VanderPlas}" }
208222
@string { a_van_der_walt_stefan = "St{\'e}fan {van der Walt}" }
209223
@string { a_van_horn_bruce_m_2 = "Bruce M.\ {Van Horn}~II" }
@@ -213,6 +227,7 @@ @string { a_van_rossum_guido
213227
@string { a_van_rysdam = "Peter {van Rysdam}" }
214228
@string { a_varoquaux_gael = "Ga{\"e}l Varoquaux" }
215229
@string { a_varro_daniel = "D{\'a}niel Varr{\'o}" }
230+
@string { a_vasilescu_bogdan = "Bogdan Vasilescu" }
216231
@string { a_vasudevan_vijay = "Vijay Vasudevan" }
217232
@string { a_vetterling_william_t = "William T.\ Vetterling" }
218233
@string { a_virtanen_pauli = "Pauli Virtanen" }
@@ -232,8 +247,11 @@ @string { a_wu_zhize
232247
@string { a_xiong_peng = "Peng Xiong" }
233248
@string { a_yanev_martin = "Martin Yanev" }
234249
@string { a_yang_edward_z = "Edward Z.\ Yang" }
250+
@string { a_yang_xuanda = "Xuanda Yang" }
251+
@string { a_ye_jingchen = "Jingchen Ye" }
235252
@string { a_yu_yuan = "Yuan Yu" }
236253
@string { a_zheng_xiaoqiang = "Xiaoqiang Zheng" }
254+
@string { a_zijlstra_jelle = "Jelle Zijlstra" }
237255
@string { a_zinoviev_dimitry = "Dmitry Zinoviev" }
238256

239257

@@ -263,6 +281,7 @@ @string { l_usa_centennial
263281
@string { l_usa_columbia = "{{Columbia}, {SC}, {USA}}" }
264282
@string { l_usa_hoboken = "{{Hoboken}, {NJ}, {USA}}" }
265283
@string { l_usa_ithaca = "{{Ithaca}, {NY}, {USA}}" }
284+
@string { l_usa_lake_buena_vista = "{{Lake Buena Vista}, {FL}, {USA}}" }
266285
@string { l_usa_new_york = "{{New York}, {NY}, {USA}}" }
267286
@string { l_usa_piscataway = "{{Piscataway}, {NJ}, {USA}}" }
268287
@string { l_usa_providence = "{{Providence}, {RI}, {USA}}" }
@@ -642,6 +661,18 @@ @book{B2023W1IO
642661
execute = {\sloppy}
643662
}
644663

664+
@techreport{BB2019AEAOTPPIP,
665+
author = a_bommarito_ethan # and # a_bommarito_michael,
666+
title = {An Empirical Analysis of the \python\ Package Index~(\pypi)},
667+
xdata = {rep_arxiv_corr},
668+
number = {abs/1907.11073},
669+
date = {2019-07-26},
670+
url = {https://arxiv.org/abs/1907.11073},
671+
urldate = {2024-08-17},
672+
doi = {10.48550/arXiv.1907.11073},
673+
note = {\mbox{arXiv:1907.11073v2} \mbox{[cs.SE]} \mbox{26~Jul~2019}}
674+
}
675+
645676
@book{BHK2006CNFCMEARFCS,
646677
author = a_baumgartner_gary # and # a_heap_danny # and # a_krueger_richard,
647678
title = {Course Notes for {CSC165H}: Mathematical Expression and Reasoning for Computer Science},
@@ -927,6 +958,16 @@ @book{LH2015DSAAWP
927958
isbn = {978-3-319-13071-2},
928959
}
929960

961+
@book{LLHSVRZSJYYMC2024MOSTFP,
962+
author = a_lehtosalo_jukka # and # a_levkivskyi_ivan # and # a_hance_jared # and # a_smith_ethan # and # a_van_rossum_guido # and # a_zijlstra_jelle # and # a_sullival_michael_j # and # a_jain_shantanu # and # a_yang_xuanda # and # a_ye_jingchen # and # a_sobolev_nikita # and # {{\mypy~Contributors}},
963+
title = {\mypy\ -- Static Typing for \python},
964+
date = {2024},
965+
publisher = p_github,
966+
address = pa_github,
967+
url = {https://github.com/python/mypy},
968+
urldate = {2024-08-17},
969+
}
970+
930971
@book{LNL2020LJ,
931972
author = a_loy_marc # and # a_niemeyer_patrick # and # a_leuck_daniel,
932973
title = {Learning \pgls{Java}},
@@ -1049,6 +1090,15 @@ @proceedings{PROC2016OSDI
10491090
isbn = {978-1-931971-33-1},
10501091
}
10511092

1093+
@proceedings{PROC2018ESECFSE,
1094+
title = {Proceedings of the 2018 {ACM} Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering ({ESEC/SIGSOFT}~{FSE}'18), } # nov # {~4-9, 2018, } # l_usa_lake_buena_vista,
1095+
editor = a_leavens_gary_t # and # a_garcia_alessandro # and # a_pasareanu_corina_s,
1096+
publisher = p_acm,
1097+
address = pa_acm,
1098+
date = {2018-10-26},
1099+
isbn = {978-1-4503-5573-5},
1100+
}
1101+
10521102
@proceedings{PROC2019NEURIPS,
10531103
title = {Advances in Neural Information Processing Systems~32: Annual Conference on Neural Information Processing Systems 2019~({NeurIPS'19}), } # dec # {~8-14, 2019, } # l_canada_vancouver,
10541104
editor = a_wallach_hanna_m # and # a_larochelle_hugo # and # a_beygelzimer_alina # and # a_d_alche_buc_florence # and # a_fox_emily_b # and # a_garnett_roman,
@@ -1075,6 +1125,13 @@ @inbook{PSF2024FSL
10751125
urldate = {2024-07-25},
10761126
}
10771127

1128+
@inbook{PSF2024IPM,
1129+
title = {Installing \python\ Modules},
1130+
crossref = {PSF2024P3D},
1131+
url = {https://docs.python.org/3/installing/index.html},
1132+
urldate = {2024-08-17},
1133+
}
1134+
10781135
@inbook{PSF2024NTIFC,
10791136
title = {Numeric Types -- \pythonilIdx{int}, \pythonilIdx{float}, \pythonilIdx{complex}},
10801137
crossref = {PSF2024P3D},
@@ -1098,6 +1155,15 @@ @inbook{PSF2024PSAU
10981155
urldate = {2024-07-05},
10991156
}
11001157

1158+
@book{PSF2024TPPIP,
1159+
title = {The \python\ Package Index~(\pypi)},
1160+
url = {https://pypi.org/},
1161+
urldate = {2024-08-17},
1162+
date = {2024},
1163+
publisher = p_python_software_foundation,
1164+
address = pa_python_software_foundation,
1165+
}
1166+
11011167
@inbook{PSF2024TSTS,
11021168
title = {Text Sequence Type -- \pythonilIdx{str}},
11031169
crossref = {PSF2024P3D},
@@ -1301,6 +1367,14 @@ @techreport{VR1999CPFERPASEFTPOT
13011367
urldate = {2024-06-27}
13021368
}
13031369

1370+
@inproceedings{VVH2018ELDOSAIOSPACSOTPE,
1371+
author = a_valiev_marat # and # a_vasilescu_bogdan # and # a_herbsleb_james_d,
1372+
title = {Ecosystem-Level Determinants of Sustained Activity in Open-Source Projects: A Case Study of the \pypi\ Ecosystem},
1373+
pages = {644--655},
1374+
doi = {10.1145/3236024.3236062},
1375+
crossref = {PROC2018ESECFSE},
1376+
}
1377+
13041378
@inproceedings{WW2023RSDEWASSAA,
13051379
author = a_weise_thomas # and # a_wu_zhize,
13061380
title = {Replicable Self-Documenting Experiments with Arbitrary Search Spaces and Algorithms},

notation/software.sty

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ Learn more at \url{https://thomasweise.github.io/moptipy}.%
4242
}%
4343
\protected\gdef\moptipy{\pgls{moptipy}}%
4444
%
45+
%
46+
\newglossaryentry{mypy}{%
47+
text={\softwareStyle{Mypy}},%
48+
name={Mypy},%
49+
sort={Mypy},%
50+
description={%
51+
is the static type-checking tool for \python~\cite{LLHSVRZSJYYMC2024MOSTFP}. %
52+
Learn more at \url{https://github.com/python/mypy} or in \cref{sec:variableTypesAndTypeHints}.%
53+
}%
54+
}%
55+
\protected\gdef\mypy{\pgls{mypy}}%
56+
%
57+
%
4558
\newglossaryentry{numpy}{%
4659
text={\softwareStyle{NumPy}},%
4760
name={NumPy},%
@@ -66,6 +79,19 @@ Learn more at \url{https://pandas.pydata.org}.%
6679
\protected\gdef\pandas{\pgls{pandas}}%
6780
%
6881
%
82+
\newglossaryentry{pip}{%
83+
text={\softwareStyle{pip}},%
84+
name={pip},%
85+
sort={pip},%
86+
description={%
87+
is the standard tool to install \python\ software packages from the \pgls{pypi} repository~\cite{PSF2024IPM}. %
88+
To install a package \bashil{thepackage} hosted on \pgls{pypi}, type \bashil{pip install thepackage} into the \pgls{terminal}. %
89+
Learn more at \url{https://packaging.python.org/installing}.%
90+
}%
91+
}%
92+
\protected\gdef\pip{\pgls{pip}}%
93+
%
94+
%
6995
\newglossaryentry{pycharm}{%
7096
text={\softwareStyle{PyCharm}},%
7197
name={PyCharm},%
@@ -91,6 +117,18 @@ Learn more at \url{https://python.org}.}
91117
\protected\gdef\pythonWithVersion{\softwareStyle{\python~\pythonVersion}}%
92118
%
93119
%
120+
\newglossaryentry{pypi}{%
121+
text={\softwareStyle{PyPI}},%
122+
name={PyPI},%
123+
sort={PyPI},%
124+
description={%
125+
The \python\ Package Index~(PyPI) is an online repository that provides the software packages that you can install with~\pip~\cite{PSF2024TPPIP,BB2019AEAOTPPIP,VVH2018ELDOSAIOSPACSOTPE}. %
126+
Learn more at \url{https://pypi.org}.%
127+
}%
128+
}%
129+
\protected\gdef\pypi{\pgls{pypi}}%
130+
%
131+
%
94132
\newglossaryentry{pytorch}{%
95133
text={\softwareStyle{PyTorch}},%
96134
name={PyTorch},%

styles/keys.sty

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
\tw@make@key@macro*{\OS}%
1414
%
1515
\protected\gdef\ubuntuTerminal{\keys{\ctrl+\Alt+T}}%
16-
\protected\gdef\windowsTerminal{press \keys{\OSwin + R}, type in \bashil{cmd}, and hit \keys{\return}}%
16+
\protected\gdef\windowsTerminal{press \keys{\OSwin + R}, type in \textil{cmd}, and hit \keys{\return}}%
1717
%
1818
%% the PyCharm main menu key
1919
\protected\gdef\pycharmMainMenu{\ensuremath{\mathrel{\rlap{\raisebox{\fontdimen22\textfont2}{\ensuremath{=}}}\raisebox{-0.5\fontdimen22\textfont2}{\ensuremath{=}}}}}

text/main/basics/variables/assignment/assignment.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
We can use \pythonil{int_var} just like any other value.
118118
For example, we can compute \pythonil{2 + int_var} and pass the result to the \pythonilIdx{print} function.
119119
This will then print \pythonil{3} to the standard output of our program.
120-
We can also use \pythonil{int_var} in f-strings\pythonIdx{f-string}\pythonIdx{str!f} about which we leared back in \cref{sec:fstrings}.
120+
We can also use \pythonil{int_var} in \pglspl{fstring}\pythonIdx{f-string}\pythonIdx{str!f} about which we leared back in \cref{sec:fstrings}.
121121
\pythonil{f"int_var has value \{int_var\}."} will render to \pythonil{"int_var has value 1."}.%
122122
\end{sloppypar}%
123123
%
@@ -135,7 +135,7 @@
135135
Ofcourse, we can have multiple variables.
136136
The command \pythonil{float_var = 3.5} creates a variable named \pythonil{float_var}.
137137
It also allocates a piece of memory, writes the floating point value \pythonil{3.5} into it, and lets \pythonil{float_var} point to that piece of memory, as illustrated in \cref{fig:variable:assignment3}.
138-
We can use this variable in an f-string\pythonIdx{f-string}\pythonIdx{str!f} as well:
138+
We can use this variable in an \pgls{fstring}\pythonIdx{f-string}\pythonIdx{str!f} as well:
139139
\pythonil{print(f"float_var has value \{float_var\}.")} is interpolated to \pythonil{"float_var has value 3.5."}.%
140140
%
141141
\begin{sloppypar}%
Binary file not shown.

0 commit comments

Comments
 (0)