Skip to content

Commit 572f57b

Browse files
committed
Release candidate.
1 parent 58fec79 commit 572f57b

File tree

9 files changed

+11978
-11848
lines changed

9 files changed

+11978
-11848
lines changed

doc/source/1_introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ are:
101101

102102
.. only:: html
103103

104-
Installation instructions for these pieces of code are provided `on this
105-
page <https://object-oriented-programming.github.io/installation.html>`__.
104+
Installation instructions for these pieces of code are provided :doc:`on
105+
this page <installation>`.
106106

107107
This is not a course about Git, but a minimal familiarity with Git and GitHub
108108
will be needed in order to work with the examples. :numref:`Appendix %s <git>`

doc/source/_static/video_cover_page.svg

Lines changed: 11828 additions & 11814 deletions
Loading

doc/source/_themes/finite_element/layout.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
<ul>
3030
<li class="page_item"><a href="{{ pathto('index.html', 1) }}" title="Book">Book</a></li>
3131
<li class="page_item"><a href="{{ pathto('videos.html', 1) }}" title="Videos">Videos</a></li>
32-
<li class="page_item"><a href="{{ pathto('exercises.html', 1) }}" title="Exercises">Exercises</a></li>
32+
<li class="page_item"><a href="{{ pathto('exercises.html', 1) }}"
33+
title="Exercises">Exercises</a></li>
34+
<li class="page_item"><a href="{{ pathto('installation.html', 1) }}" title="Installation">Installation</a></li>
35+
3336
</ul>
3437
</div><!-- .menu -->
3538
</div><!-- #access -->

doc/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
master_doc = 'index'
5959

6060
# General information about the project.
61-
project = u'Object oriented programming'
61+
project = u'Object-oriented Programming'
6262
author = u'David A. Ham'
6363
copyright = u'2019-2021, David A. Ham'
6464

@@ -246,7 +246,7 @@
246246
%\hypersetup{urlcolor=externallinkcolor}
247247
\hypersetup{urlcolor=black}
248248
\usepackage{poptitle}
249-
\subtitle{in Python for mathematicians}
249+
\subtitle{in Python for Mathematicians}
250250
\edition{2021}
251251
\makeatletter
252252
\fancypagestyle{normal}{
@@ -268,7 +268,7 @@
268268
# Imperial lecture notes version.
269269
preamble = r"""
270270
\usepackage{imperialmathnotes}
271-
\subtitle{in Python for mathematicians}
271+
\subtitle{in Python for Mathematicians}
272272
\imperialmathnotesvolume{2}
273273
\edition{2021}
274274
"""

doc/source/exercises.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _exercises:
2+
13
Exercise code
24
=============
35

doc/source/images/cover.png

496 KB
Loading

doc/source/index.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,19 @@
2020

2121
.. only:: html
2222

23-
This is the online textbook for MATH50009 Principles of Programming, a
24-
second year object oriented programming module offered to mathematics
25-
undergraduates at Imperial College London. Read the introductory chapter for
26-
information on how to go about doing the module week by week.
27-
28-
If you're not taking the module at Imperial, you should nonetheless feel
29-
free to use this material to learn object-oriented programming in Python. I
30-
would be very interested to hear from anyone interested in using it to
31-
teach.
23+
Welcome to the website for the book Object-oriented Programming in Python
24+
for Mathematicians. Here you'll find the full hyperlinked book text, as well
25+
as consolidated lists of the accompanying :doc:`videos <videos>` and
26+
:doc:`exercise repositories <exercises>`.
27+
28+
.. image:: images/cover.png
29+
:width: 10em
30+
:align: right
31+
:target: https://fixme.foo
32+
33+
The complete book text is available on this website. However, if you'd
34+
like to have a physical copy, then please `buy the book
35+
<https://fixme.foo>`__.
3236

3337
.. container:: preface
3438

doc/source/installation.rst

Lines changed: 124 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,144 @@
1+
Installing the necessary software
2+
=================================
3+
4+
In order to do the exercises in this book, you will need Python, Git, and a
5+
suitable text editor or :term:`Integrated Development Environment`. Visual
6+
Studio Code is recommended as the :term:`IDE`.
7+
8+
Instructions are provided here for Windows, MacOS, and Linux. Chromebook users
9+
can follow the Linux instructions if they first `activate Linux on their
10+
Chromebook <https://support.google.com/chromebook/answer/9145439>`__.
11+
12+
Homebrew for Mac
13+
----------------
14+
15+
The easiest way to install additional programming software on a Mac is to first
16+
install the Homebrew package manager. Open a terminal (press :kbd:`` +
17+
:kbd:`space` to open Spotlight Search and then type `terminal` in the search
18+
window) and run the following command:
19+
20+
.. code-block:: console
21+
22+
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
23+
24+
Don't type the :kbd:`$`. That's the terminal prompt (it might appear as another
25+
symbol such as :kbd:`%` for you).
26+
27+
This will start the install process, and ask you for confirmation before
28+
installing Homebrew.
29+
30+
Further documentation about Homebrew and its dependencies is available on the
31+
`Homebrew website <https://brew.sh>`_.
32+
133

234
Python
3-
......
35+
------
436

537
There are a number of different ways of obtaining Python, depending a little on
6-
which operating system your computer runs. The options suggested here are
38+
which operating system your computer runs. The routes suggested here are ones
39+
that have been easiest for students taking the course at Imperial, however any
40+
sufficiently recent Python should be sufficient.
41+
42+
Windows
43+
.......
44+
45+
Install `Python from the Microsoft Store
46+
<https://www.microsoft.com/en-us/p/python-310/9pjpw5ldxlz5>`__.
47+
48+
MacOS
49+
.....
50+
51+
MacOS comes with Python 3, but it's a cut down version not suitable for our
52+
purposes. Instead, install Python from Homebrew:
53+
54+
.. code-block:: console
55+
56+
$ brew install python
57+
58+
Linux
59+
.....
60+
61+
Every Linux distribution ships with Python 3 by default. However, they don't
62+
always have the Python package manager Pip installed by default. We will need
63+
that so you'll need to use your distribution's package manager to install it.
64+
For example on Ubuntu or Debian you would run:
65+
66+
.. code-block:: console
67+
68+
$ sudo apt install python3-pip
69+
70+
while on Fedora and related distributions you would run:
71+
72+
.. code-block:: console
773
8-
Follow the :doc:`FoNS Python instructions <fons:python>`. We will exclusively
9-
use :ref:`virtual environments <fons:python_virtual_environments>` so it doesn't matter at
10-
all whether you use Python from Anaconda or from another source. Mac users
11-
should note, though that the built-in Python will not do, so you should use
12-
either Homebrew or Anaconda.
74+
$ sudo dnf install python-pip
1375
1476
Git
15-
...
77+
---
1678

1779
Git is a revision control system. Revision control systems enable you to keep
1880
track of the different versions of a piece of code as you work on them, and to
1981
have these versions on different computers as well as backed up in the cloud. We
2082
will use Git and GitHub classroom as a mechanism for distributing, working with
2183
and submitting code exercises.
2284

23-
.. warning::
85+
Windows
86+
.......
87+
88+
Download and install the `Git package <https://git-scm.com/download/win>`__.
89+
90+
MacOS
91+
.....
92+
93+
MacOS comes with a perfectly acceptable Git installation. However you can also
94+
install a more recent version from Homebrew:
95+
96+
.. code-block:: console
97+
98+
$ brew install git
99+
100+
Linux
101+
.....
102+
103+
Use your distribution package manager to install Git. For example on Ubuntu or
104+
Debian:
105+
106+
.. code-block::
107+
108+
$ sudo apt install git-all
109+
110+
On Fedora:
111+
112+
.. code-block::
113+
114+
$ sudo apt install git-all
24115
25-
When you come to the assessable programming tests that make up 100% of the
26-
assessment for this module, the code will be distributed and submitted using
27-
Git. It is therefore essential that you incorporate Git into your day to day
28-
workflow so that when you come to the test, it's second nature. You will not
29-
receive marks for test answers that are not committed and pushed.
30116
31117
Visual Studio Code
32-
..................
118+
------------------
33119

34120
Visual Studio Code is a Python-aware Integrated Development Environment (IDE).
35121
This means that it incorporates editing files with other programming features
36-
such as :ref:`debugging`, Git support, and built-in :ref:`terminal
37-
<terminal-vscode>`. Visual Studio Code also provides an incredibly useful remote
38-
collaborative coding feature called Live Share. This will be very useful for
39-
getting remote help from an instructor.
122+
such as :ref:`debugging`, Git support, and built-in terminal.
123+
124+
Windows
125+
.......
126+
127+
`Download and install the package <https://code.visualstudio.com/download>`__.
128+
129+
MacOS
130+
.....
131+
132+
Use Homebrew to install Visual Studio Code:
133+
134+
.. code-block:: console
135+
136+
$ brew install visual-studio-code
137+
138+
139+
Linux
140+
.....
141+
142+
`Download the package <https://code.visualstudio.com/download>`__ and then use
143+
your package manager to install it `following these instructions
144+
<https://code.visualstudio.com/docs/setup/linux>`__.

doc/source/videos.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _videos:
2+
13
Videos
24
======
35

0 commit comments

Comments
 (0)