Skip to content

Commit 989963f

Browse files
authored
[FIX] fix rst spacing for nested lists (#68)
* fix spacing for nested lists * update netlify preview action * simply environment using full anaconda * use 2 and 3 space rules to match first letter in list above * fix list that shouldn't be indented * fix in pandas lecture
1 parent 40582e8 commit 989963f

File tree

11 files changed

+41
-52
lines changed

11 files changed

+41
-52
lines changed

.github/workflows/preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: |
4444
bash scripts/build-website.sh "${{ steps.files.outputs.added_modified }}" "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
4545
- name: Preview Deploy to Netlify
46-
uses: nwtgck/actions-netlify@v1.0
46+
uses: nwtgck/actions-netlify@v1.1
4747
if: env.BUILD_NETLIFY == 'true'
4848
with:
4949
publish-dir: './_build/website/jupyter_html'

environment.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
name: qe-lectures
22
channels:
33
- default
4-
- conda-forge
54
dependencies:
5+
- python=3.7
6+
- anaconda=2020.02
67
- pip
7-
- python
8-
- jupyter
9-
- jupyterlab
10-
- nbconvert
11-
- pandoc
12-
- pandas
13-
- numba
14-
- numpy
15-
- matplotlib
16-
- networkx
17-
- sphinx=2.4.4
18-
- sympy
19-
- scipy
208
- pip:
21-
- sphinxcontrib-jupyter
22-
- sphinxcontrib-bibtex
23-
- joblib
9+
- interpolation
10+
- sphinxcontrib-jupyter
11+
- sphinxcontrib-bibtex
12+
- joblib

source/rst/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ We will break this program into two parts:
234234

235235
#. The main part of the program that
236236

237-
#. calls this function to get data
237+
#. calls this function to get data
238238

239-
#. plots the data
239+
#. plots the data
240240

241241
This is accomplished in the next program
242242

@@ -302,9 +302,9 @@ Notes
302302

303303
* Notice that equality is tested with the ``==`` syntax, not ``=``.
304304

305-
* For example, the statement ``a = 10`` assigns the name ``a`` to the value ``10``.
305+
* For example, the statement ``a = 10`` assigns the name ``a`` to the value ``10``.
306306

307-
* The expression ``a == 10`` evaluates to either ``True`` or ``False``, depending on the value of ``a``.
307+
* The expression ``a == 10`` evaluates to either ``True`` or ``False``, depending on the value of ``a``.
308308

309309
Now, there are several ways that we can simplify the code above.
310310

source/rst/getting_started.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Either
164164

165165
* open up a terminal and type ``jupyter notebook``
166166

167-
* Windows users should substitute "Anaconda command prompt" for "terminal" in the previous line.
167+
* Windows users should substitute "Anaconda command prompt" for "terminal" in the previous line.
168168

169169
If you use the second option, you will see something like this
170170

@@ -237,15 +237,15 @@ The two modes are
237237

238238
#. Edit mode
239239

240-
* Indicated by a green border around one cell, plus a blinking cursor
240+
* Indicated by a green border around one cell, plus a blinking cursor
241241

242-
* Whatever you type appears as is in that cell
242+
* Whatever you type appears as is in that cell
243243

244244
#. Command mode
245245

246-
* The green border is replaced by a grey (or grey and blue) border
246+
* The green border is replaced by a grey (or grey and blue) border
247247

248-
* Keystrokes are interpreted as commands --- for example, typing `b` adds a new cell below the current one
248+
* Keystrokes are interpreted as commands --- for example, typing `b` adds a new cell below the current one
249249

250250

251251
To switch to
@@ -519,9 +519,9 @@ Nothing beats the power and efficiency of a good text editor for working with pr
519519

520520
A good text editor will provide
521521

522-
* efficient text editing commands (e.g., copy, paste, search and replace)
522+
* efficient text editing commands (e.g., copy, paste, search and replace)
523523

524-
* syntax highlighting, etc.
524+
* syntax highlighting, etc.
525525

526526
Right now, an extremely popular text editor for coding is `VS Code <https://code.visualstudio.com/>`__.
527527

@@ -595,7 +595,7 @@ There are two main flavors of Git
595595

596596
#. the various point-and-click GUI versions
597597

598-
* See, for example, the `GitHub version <https://desktop.github.com/>`_
598+
* See, for example, the `GitHub version <https://desktop.github.com/>`_
599599

600600
As the 1st task, try
601601

source/rst/numba.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ The basic idea is this:
175175
* Python is very flexible and hence we could call the function `qm` with many
176176
types.
177177

178-
* e.g., ``x0`` could be a NumPy array or a list, ``n`` could be an integer or a float, etc.
178+
* e.g., ``x0`` could be a NumPy array or a list, ``n`` could be an integer or a float, etc.
179179

180180
* This makes it hard to *pre*-compile the function.
181181

source/rst/pandas.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ Just as `NumPy <http://www.numpy.org/>`_ provides the basic array data type plus
3838

3939
#. endows them with methods that facilitate operations such as
4040

41-
* reading in data
41+
* reading in data
4242

43-
* adjusting indices
43+
* adjusting indices
4444

45-
* working with dates and time series
45+
* working with dates and time series
4646

47-
* sorting, grouping, re-ordering and general data munging [#mung]_
47+
* sorting, grouping, re-ordering and general data munging [#mung]_
4848

49-
* dealing with missing values, etc., etc.
49+
* dealing with missing values, etc., etc.
5050

5151
More sophisticated statistical functionality is left to other packages, such
5252
as `statsmodels <http://www.statsmodels.org/>`__ and `scikit-learn <http://scikit-learn.org/>`__, which are built on top of pandas.

source/rst/python_advanced_features.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -796,15 +796,15 @@ Here's what happens
796796

797797
* The call ``f(x)``
798798

799-
* Creates a local namespace
799+
* Creates a local namespace
800800

801-
* Adds ``x`` to local namespace, bound to ``[1]``
801+
* Adds ``x`` to local namespace, bound to ``[1]``
802802

803-
* The list ``[1]`` is modified to ``[2]``
803+
* The list ``[1]`` is modified to ``[2]``
804804

805-
* Returns the list ``[2]``
805+
* Returns the list ``[2]``
806806

807-
* The local namespace is deallocated, and local ``x`` is lost
807+
* The local namespace is deallocated, and local ``x`` is lost
808808

809809
* Global ``x`` has been modified
810810

source/rst/python_by_example.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@ On the other hand, it takes a bit of care to get right, so please remember:
416416

417417
* The line before the start of a code block always ends in a colon
418418

419-
* ``for i in range(10):``
420-
* ``if x > y:``
421-
* ``while x < 100:``
422-
* etc., etc.
419+
* ``for i in range(10):``
420+
* ``if x > y:``
421+
* ``while x < 100:``
422+
* etc., etc.
423423

424424
* All lines in a code block **must have the same amount of indentation**.
425425

source/rst/python_essentials.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,11 +559,11 @@ The rule is:
559559

560560
* Expressions that evaluate to zero, empty sequences or containers (strings, lists, etc.) and ``None`` are all equivalent to ``False``.
561561

562-
* for example, ``[]`` and ``()`` are equivalent to ``False`` in an ``if`` clause
562+
* for example, ``[]`` and ``()`` are equivalent to ``False`` in an ``if`` clause
563563

564564
* All other values are equivalent to ``True``.
565565

566-
* for example, ``42`` is equivalent to ``True`` in an ``if`` clause
566+
* for example, ``42`` is equivalent to ``True`` in an ``if`` clause
567567

568568

569569

source/rst/python_oop.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,11 @@ The rules for using ``self`` in creating a Class are that
340340

341341
* Any instance data should be prepended with ``self``
342342

343-
* e.g., the ``earn`` method uses ``self.wealth`` rather than just ``wealth``
343+
* e.g., the ``earn`` method uses ``self.wealth`` rather than just ``wealth``
344344

345345
* A method defined within the code that defines the class should have ``self`` as its first argument
346346

347-
* e.g., ``def earn(self, y)`` rather than just ``def earn(y)``
347+
* e.g., ``def earn(self, y)`` rather than just ``def earn(y)``
348348

349349
* Any method referenced within the class should be called as ``self.method_name``
350350

@@ -442,7 +442,7 @@ Some points of interest in the code are
442442

443443
* The ``update`` method uses ``h`` to update capital as per :eq:`solow_lom`.
444444

445-
* Notice how inside ``update`` the reference to the local method ``h`` is ``self.h``.
445+
* Notice how inside ``update`` the reference to the local method ``h`` is ``self.h``.
446446

447447
The methods ``steady_state`` and ``generate_sequence`` are fairly self-explanatory
448448

source/rst/scipy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ To understand the idea, recall the well-known game where
231231

232232
* Player B asks if it's less than 50
233233

234-
* If yes, B asks if it's less than 25
234+
* If yes, B asks if it's less than 25
235235

236-
* If no, B asks if it's less than 75
236+
* If no, B asks if it's less than 75
237237

238238
And so on.
239239

0 commit comments

Comments
 (0)