Skip to content

Commit 419ce6e

Browse files
committed
some more text about packages and virtual environments
1 parent 0a9f4d9 commit 419ce6e

File tree

8 files changed

+254
-26
lines changed

8 files changed

+254
-26
lines changed

bibliography/bibliography.bib

+80-9
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ @string { a_feldt_robert
127127
@string { a_feng_yu = "Yu Feng" }
128128
@string { a_fernandez_del_rio_jaime = "Jaime {Fern{\'a}ndez del R{\'i}o}" }
129129
@string { a_ferraiolo_jon = "Jon Ferraiolo" }
130+
@string { a_figgins_stephen = "Stephen Figgins" }
130131
@string { a_filaseta_michael = "Michael Filaseta" }
131132
@string { a_finucane_stephen = "Stephen Finucane" }
132133
@string { a_fitzpatrick_richard = "Richard Fitzpatrick" }
@@ -243,6 +244,7 @@ @string { a_lima_luan_p
243244
@string { a_lin_zeming = "Zeming Lin" }
244245
@string { a_liu_yuxi = "Yuxi Liu" }
245246
@string { a_lotha_gloria = "Gloria Lotha" }
247+
@string { a_love_robert = "Robert Love" }
246248
@string { a_lownds_tony = "Tony Lownds" }
247249
@string { a_loy_marc = "Marc Loy" }
248250
@string { a_luce_laurent = "Laurent Luce" }
@@ -261,6 +263,7 @@ @string { a_mcintosh_shane
261263
@string { a_mdn_contributors = "{{MDN}~Contributors}" }
262264
@string { a_mejia_alvarez_pedro = "Pedro {Mejia Alvarez}" }
263265
@string { a_mendoza_mark = "Mark Mendoza" }
266+
@string { a_meyer_carl = "Carl Meyer" }
264267
@string { a_michel_vincent = "Vincent Michel" }
265268
@string { a_mikkonen_tommi = "Tommi Mikkonen" }
266269
@string { a_millman_jarrod_k = "K.\ Jarrod Millman" }
@@ -309,6 +312,7 @@ @string { a_peterson_pearu
309312
@string { a_pfeiffer_silvia = "Silvia Pfeiffer" }
310313
@string { a_phalgun_amit = "Amit Phalgun" }
311314
@string { a_picus_matti = "Matti Picus" }
315+
@string { a_pip_developers = "\pip\ developers" }
312316
@string { a_polat_ilhan = "Ilhan Polat" }
313317
@string { a_pollard_tom_j = "Tom J.\ Pollard" }
314318
@string { a_pomerance_carl = "Carl Pomerance" }
@@ -325,6 +329,7 @@ @string { a_ribeiro_antonio_h
325329
@string { a_riesel_hans = "Hans Riesel" }
326330
@string { a_ritter_frank_e = "Frank E. Ritter" }
327331
@string { a_rivest_ronald_linn = "Ronald Linn Rivest" }
332+
@string { a_robbins_arnold = "Arnold Robbins" }
328333
@string { a_robertson_edmund_f = "Edmund F.\ Robertson" }
329334
@string { a_robson_eleanor = "Eleanor Robson" }
330335
@string { a_rocha_linoln_s = "Lincoln S.\ Rocha" }
@@ -360,6 +365,7 @@ @string { a_shen_kangshen
360365
@string { a_sheppart_kevin = "Kevin Sheppard" }
361366
@string { a_shewchuk_jonathan_richard = "Jonathan Richard Shewchuk" }
362367
@string { a_shimizukawa_takayuki = "Takayuki Shimizukawa" }
368+
@string { a_siever_ellen = "Ellen Siever" }
363369
@string { a_sigler_laurence_e = "Laurence E.\ Sigler" }
364370
@string { a_silberschatz_avi = "Avi Silberschatz" }
365371
@string { a_silva_sara = "Sara Silva" }
@@ -401,6 +407,7 @@ @string { a_van_kerkwijk_marten_h
401407
@string { a_van_mulbregt_paul = "Paul {van Mulbregt}" }
402408
@string { a_van_rossum_guido = "Guido {van Rossum}" }
403409
@string { a_van_rysdam = "Peter {van Rysdam}" }
410+
@string { a_van_vugt_sander = "Sander {van Vugt}" }
404411
@string { a_varoquaux_gael = "Ga{\"e}l Varoquaux" }
405412
@string { a_varro_daniel = "D{\'a}niel Varr{\'o}" }
406413
@string { a_vasilescu_bogdan = "Bogdan Vasilescu" }
@@ -588,6 +595,7 @@ @string { p_packt
588595
@string { p_payhip = "{Payhip}" }
589596
@string { p_pearson_education = "{Pearson Education,~Inc.}" }
590597
@string { p_microsoft_press = "{Microsoft Press}, " # p_pearson_education }
598+
@string { p_pearson_it_certification = "{Pearson {IT} Certification}" }
591599
@string { p_plos = "{Public Library of Science~{(PLOS)}}" }
592600
@string { p_pragmatic_ai_labs = "{Pragmatic {AI} Labs}" }
593601
@string { p_pragmatic_bookshelf = "{{Pragmatic Bookshelf} {by} {The Pragmatic Programmers, {L.L.C.}}}" }
@@ -681,6 +689,7 @@ @string { pa_packt
681689
@string { pa_payhip = l_uk_london }
682690
@string { pa_pearson_education = l_usa_hoboken }
683691
@string { pa_microsoft_press = pa_pearson_education }
692+
@string { pa_pearson_it_certification = pa_pearson_education }
684693
@string { pa_plos = l_usa_san_francisco }
685694
@string { pa_pragmatic_ai_labs = l_usa_san_francisco }
686695
@string { pa_pragmatic_bookshelf = l_usa_flower_mound }
@@ -1406,9 +1415,9 @@ @book{CLRS2009ITA
14061415
}
14071416

14081417
@book{CN2020ULB,
1418+
author = a_clinton_david # and # a_negus_christopher,
14091419
title = {\ubuntu\ \linux\ Bible},
14101420
edition = {10},
1411-
author = a_clinton_david # and # a_negus_christopher,
14121421
date = {2020-11-10},
14131422
isbn = {978-1119722335},
14141423
xdata = {ser_bs},
@@ -2309,6 +2318,23 @@ @book{PC2024PL
23092318
urldate = {2024-09-24}
23102319
}
23112320

2321+
@book{PD2024PD,
2322+
title = {\pip\ Documentation~v24.3.1},
2323+
author = a_pip_developers,
2324+
date = {2024-10-27},
2325+
publisher = p_python_software_foundation,
2326+
address = pa_python_software_foundation,
2327+
url = {https://pip.pypa.io},
2328+
urldate = {2024-12-25},
2329+
}
2330+
2331+
@inbook{PD2024RFF,
2332+
title = {Requirements File Format},
2333+
crossref = {PD2024PD},
2334+
url = {https://pip.pypa.io/en/stable/reference/requirements-file-format},
2335+
urldate = {2024-12-25},
2336+
}
2337+
23122338
@techreport{PEP8,
23132339
title = {Style Guide for \python\ Code},
23142340
author = a_van_rossum_guido # and # a_warsaw_barry # and # a_coghlan_alyssa,
@@ -2418,6 +2444,16 @@ @techreport{PEP362
24182444
urldate = {2024-12-12},
24192445
}
24202446

2447+
@techreport{PEP405,
2448+
author = a_meyer_carl,
2449+
title = {\python\ \glslink{virtualEnvironment}{Virtual Environments}},
2450+
number = {405},
2451+
xdata = {rep_pep},
2452+
date = {2011-06-13/2012-05-24},
2453+
url = {https://peps.python.org/pep-0405},
2454+
urldate = {2024-12-25},
2455+
}
2456+
24212457
@techreport{PEP482,
24222458
author = a_langa_lukasz,
24232459
title = {Literature Overview for \glslink{typeHint}{Type Hints}},
@@ -2955,6 +2991,21 @@ @inbook{PSF2024TWS
29552991
urldate = {2024-12-15},
29562992
}
29572993

2994+
@inbook{PSF2024VCOVE,
2995+
title = {\pythonilIdx{venv} -- Creation of \glslink{virtualEnvironment}{Virtual Environments}},
2996+
xdata = {PSF2024TPSL},
2997+
url = {https://docs.python.org/3/library/venv.html},
2998+
urldate = {2024-12-25},
2999+
}
3000+
3001+
@inbook{PSF2024VEAP,
3002+
title = {Virtual Environments and Packages},
3003+
chapter = {12},
3004+
xdata = {PSF2024TPT},
3005+
url = {https://docs.python.org/3/tutorial/venv.html},
3006+
urldate = {2024-12-24},
3007+
}
3008+
29583009
@xdata{PSF2024WNIP,
29593010
volume = {What's New in \python},
29603011
crossref = {PSF2024P3D}
@@ -3184,14 +3235,6 @@ @inbook{SD2024DCAD
31843235
urldate = {2024-12-12},
31853236
}
31863237

3187-
@book{SD2024SIDFD,
3188-
author = a_sphinx_developers,
3189-
title = {\pythonilIdx{sphinx.ext.autodoc} -- Include Documentation from \pglspl{docstring}},
3190-
date = {2024-10-13},
3191-
url = {https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html},
3192-
urldate = {2024-12-12},
3193-
}
3194-
31953238
@book{SCL1999TNCOTMACAC,
31963239
title = {The Nine Chapters on the Mathematical Art:~{C}ompanion and Commentary},
31973240
author = a_shen_kangshen # and # a_crossley_john_newsome # and # a_lun_anthony_w_c,
@@ -3202,6 +3245,14 @@ @book{SCL1999TNCOTMACAC
32023245
address = pa_oxford_university_press
32033246
}
32043247

3248+
@book{SD2024SIDFD,
3249+
author = a_sphinx_developers,
3250+
title = {\pythonilIdx{sphinx.ext.autodoc} -- Include Documentation from \pglspl{docstring}},
3251+
date = {2024-10-13},
3252+
url = {https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html},
3253+
urldate = {2024-12-12},
3254+
}
3255+
32053256
@article{SF2013ASROSR,
32063257
author = a_shahrokni_ali # and # a_feldt_robert,
32073258
title = {A Systematic Review of Software Robustness},
@@ -3215,6 +3266,16 @@ @article{SF2013ASROSR
32153266
urldate = {2024-10-29},
32163267
}
32173268

3269+
@book{SFLR2009LIAN,
3270+
author = a_siever_ellen # and # a_figgins_stephen # and # a_love_robert # and # a_robbins_arnold,
3271+
title = {\linux\ in a Nutshell},
3272+
edition = {6},
3273+
date = {2009-09},
3274+
publisher = p_oreilly,
3275+
address = pa_oreilly,
3276+
isbn = {9780596154486},
3277+
}
3278+
32183279
@book{SKS2019DSC,
32193280
author = a_silberschatz_avi # and # a_korth_henry_f # and # a_sudarshan_s,
32203281
title = {Database System Concepts},
@@ -3361,6 +3422,16 @@ @techreport{VR1999CPFERPASEFTPOT
33613422
urldate = {2024-06-27}
33623423
}
33633424

3425+
@book{VV2022LF,
3426+
author = a_van_vugt_sander,
3427+
title = {\linux\ Fundamentals},
3428+
edition = {2},
3429+
date = {2022-06},
3430+
isbn = {0137929315},
3431+
publisher = p_pearson_it_certification,
3432+
address = pa_pearson_it_certification
3433+
}
3434+
33643435
@inproceedings{VVH2018ELDOSAIOSPACSOTPE,
33653436
author = a_valiev_marat # and # a_vasilescu_bogdan # and # a_herbsleb_james_d,
33663437
title = {Ecosystem\nobreakdashes-Level Determinants of Sustained Activity in Open\nobreakdashes-Source Projects:~{A} Case Study of the \pypi\ Ecosystem},

notation/software.sty

+31-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,26 @@
55
\protected\gdef\softwareStyle#1{\scalebox{0.95}[1]{\texttt{#1}}}%
66
%
77
%
8+
\newglossaryentry{aptGet}{%
9+
text={\softwareStyle{apt\nobreakdashes-get}},%
10+
name={apt-get},%
11+
sort={apt-get},%
12+
description={%
13+
\bashil{apt-get} is a command used to install Debian~\textil{deb} packages under \ubuntu\ \linux~\cite{H2022LML,SFLR2009LIAN,VV2022LF}. %
14+
Using \bashil{apt-get} requires superuser privileges~(\pgls{sudo}), i.e., one usually does \bashil{sudo apt-get install...}. %
15+
Learn more at \url{https://salsa.debian.org/apt-team/apt}.%
16+
}%
17+
}%
18+
\protected\gdef\aptGet{\pgls{aptGet}}%
19+
%
20+
%
821
\newglossaryentry{bash}{%
922
text={\softwareStyle{Bash}},%
1023
name={Bash},%
1124
sort={Bash},%
1225
description={%
1326
is a the shell used under \ubuntu\ \linux, i.e., the program that \inQuotes{runs} in the \pgls{terminal} and interprets your commands, allowing you to start and interact with other programs~\cite{NR2005LTBSUSPCB3,Z2017MB,BN2018BC}. %
14-
Learn more at \url{https://www.gnu.org/software/bash/}.%
27+
Learn more at \url{https://www.gnu.org/software/bash}.%
1528
}%
1629
}%
1730
\protected\gdef\bash{\pgls{bash}}%
@@ -35,10 +48,10 @@ text={\softwareStyle{Linux}},%
3548
name={Linux},%
3649
sort={Linux},%
3750
description={%
38-
is the leading open source operating system, i.e., a free alternative for \windows~\cite{T1999TLE,B2022ELATCL,H2022LML}. %
51+
is the leading open source operating system, i.e., a free alternative for \windows~\cite{T1999TLE,B2022ELATCL,H2022LML,SFLR2009LIAN,VV2022LF}. %
3952
Its variant \ubuntu\ is particularly easy to use and install. %
4053
We recommend using it for this course, for software development, and for research. %
41-
Learn more at \url{https://www.linux.org/}.%
54+
Learn more at \url{https://www.linux.org}.%
4255
}%
4356
}%
4457
\protected\gdef\linux{\pgls{linux}}%
@@ -87,7 +100,7 @@ name={NumPy},%
87100
sort={NumPy},%
88101
description={%
89102
is a fundamental package for scientific computing with \python, which offers efficient array datastructures~\cite{HMvdWGVCWTBSKPHvKBHFdRWPGMSRWAGO2020APWN,DBvR2024ITN,J2018NPSCADSAWNSAM}. %
90-
Learn more at \url{https://numpy.org/}.%
103+
Learn more at \url{https://numpy.org}.%
91104
}%
92105
}%
93106
\protected\gdef\numpy{\pgls{numpy}}%
@@ -111,7 +124,7 @@ name={pip},%
111124
sort={pip},%
112125
description={%
113126
\pythonIdx{pip}%
114-
is the standard tool to install \python\ software packages from the \pgls{pypi} repository~\cite{PSF2024IPM}. %
127+
is the standard tool to install \python\ software packages from the \pgls{pypi} repository~\cite{PSF2024IPM,PD2024PD}. %
115128
To install a package \bashil{thepackage} hosted on \pgls{pypi}, type \bashil{pip install thepackage} into the \pgls{terminal}. %
116129
Learn more at \url{https://packaging.python.org/installing}.%
117130
}%
@@ -270,6 +283,19 @@ If you are in China, you can download it from \expandafter\url{\ubuntuDownloadUr
270283
\xdef\ubuntuDownloadUrl{https://mirrors.ustc.edu.cn/ubuntu-releases}%
271284
%
272285
%
286+
\newglossaryentry{venv}{%
287+
text={\softwareStyle{venv}},%
288+
name={venv},%
289+
sort={venv},%
290+
description={%
291+
\pythonIdx{venv}%
292+
is a \python\ module and tool for creating \pglspl{virtualEnvironment}~\cite{PSF2024VCOVE}. %
293+
Learn more at \url{https://docs.python.org/3/library/venv.html}~\cite{PSF2024VCOVE}.%
294+
}%
295+
}%
296+
\protected\gdef\venv{\pgls{venv}}%
297+
%
298+
%
273299
\newglossaryentry{windows}{%
274300
text={\softwareStyle{Windows}},%
275301
name={Windows},%

notation/terms.sty

+21
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,16 @@ Modulo division is mentioned in \cref{sec:int,sec:floatarith}.%
220220
}%
221221
%
222222
%
223+
\newglossaryentry{package}{%
224+
name={package},%
225+
description={%
226+
A \python\ package is basically a directory containing \python\ files. %
227+
This allows us to group functionality together as a library that can be used by different applications. %
228+
Many popular \python\ packages are offered as open source at \pgls{pypi} and can be installed with~\pip, which we discuss in \cref{sec:pipAndVenv}.%
229+
}%
230+
}%
231+
%
232+
%
223233
\newglossaryentry{regexp}{%
224234
name={regular expression},%
225235
description={%
@@ -370,6 +380,17 @@ The most popular distributed \pgls{VCS} is \pgls{git}.%
370380
}%
371381
%
372382
%
383+
\newglossaryentry{virtualEnvironment}{%
384+
name={virtual environment},%
385+
description={%
386+
A virtual environment is a directory that contains a local \python\ installation~\cite{PSF2024VEAP,PEP405}. %
387+
It comes with its own package installation directory. %
388+
Multiple different virtual environments can be installed on a system. %
389+
This allows different applications to use different versions of the same packages without conflict, because we can simply install these applications into different \pglspl{virtualEnvironment}.%
390+
}%
391+
}%
392+
%
393+
%
373394
\newglossaryentry{xAxis}{%
374395
name={\ensuremath{x}\nobreakdashes-axis},%
375396
plural={\ensuremath{x}\nobreakdashes-axes},%

text/main/basics/collections/lists/lists.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
\begin{figure}%
167167
\centering%
168168
\includegraphics[width=0.7\linewidth]{\currentDir/pipInstallRuff}%
169-
\caption{Installing \ruff\ in a \ubuntu\ \pgls{terminal} via \pip.}%
169+
\caption{Installing \ruff\ in a \ubuntu\ \pgls{terminal} via \pip~(see \cref{sec:pipAndVenv} for a discussion of how packages can be installed).}%
170170
\label{fig:pipInstallRuff}%
171171
\end{figure}%
172172
%

text/main/basics/variables/typesAndTypeHints/typesAndTypeHints.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
\begin{figure}%
8383
\centering%
8484
\includegraphics[width=0.7\linewidth]{\currentDir/pipInstallMypy}%
85-
\caption{Installing \mypy\ in a \ubuntu\ \pgls{terminal} via \pip.}%
85+
\caption{Installing \mypy\ in a \ubuntu\ \pgls{terminal} via \pip~(see \cref{sec:pipAndVenv} for a discussion of how packages can be installed).}%
8686
\label{fig:pipInstallMypy}%
8787
\end{figure}%
8888
%

text/main/controlFlow/functions/functions.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
\begin{figure}%
312312
\centering%
313313
\includegraphics[width=0.7\linewidth]{\currentDir/pipInstallPytest}%
314-
\caption{Installing \pytest\ in a \ubuntu\ \pgls{terminal} via \pip.}%
314+
\caption{Installing \pytest\ in a \ubuntu\ \pgls{terminal} via \pip~(see \cref{sec:pipAndVenv} for a discussion of how packages can be installed).}%
315315
\label{fig:pipInstallPytest}%
316316
\end{figure}%
317317
%

text/main/controlFlow/loops/loops.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
\begin{figure}%
324324
\centering%
325325
\includegraphics[width=0.7\linewidth]{\currentDir/pipInstallPylint}%
326-
\caption{Installing \pylint\ in a \ubuntu\ \pgls{terminal} via \pip.}%
326+
\caption{Installing \pylint\ in a \ubuntu\ \pgls{terminal} via \pip~(see \cref{sec:pipAndVenv} for a discussion of how packages can be installed).}%
327327
\label{fig:pipInstallPylint}%
328328
\end{figure}%
329329
%

0 commit comments

Comments
 (0)