Skip to content

Commit eeb474c

Browse files
committed
Merge Rikedyp's documentation work
1 parent cfe9ebc commit eeb474c

File tree

3 files changed

+80
-37
lines changed

3 files changed

+80
-37
lines changed

DOCS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Building the docs
2+
3+
Make a Python virtual environment, e.g.
4+
5+
```sh
6+
mkdir ~/.venv
7+
python -m venv ~/.venv/docs
8+
. ~/.venv/docs/bin/activate
9+
```
10+
11+
Install the following python modules:
12+
13+
```sh
14+
pip install --upgrade pip
15+
pip install mkdocs
16+
pip install mkdocs-material
17+
```
18+
19+
To build:
20+
```sh
21+
mkdocs build
22+
```
23+
24+
View locally:
25+
```sh
26+
mkdocs serve
27+
```
28+
access at http://127.0.0.1:8000
29+
30+
Deploy:
31+
```sh
32+
mkdocs gh-deploy
33+
```

docs/install.md

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,50 @@
11
# Install and use locally
22

3-
## Installing the Dyalog Jupyter kernel
4-
**Dyalog version 15.0 or later** and **Python version 3.X**, and the **jupyter** Python package must be installed in order to use the Dyalog Jupyter kernel.
5-
6-
1. Go to [the python website](https://www.python.org/downloads/) to download and install Python on your system. Linux typically comes with Python already installed.
7-
8-
If you need to manage multiple python versions, we recommend [pyenv](https://github.com/pyenv/pyenv).
9-
10-
1. Install [Jupyter](https://jupyter.org/) from a command line or PowerShell terminal.
11-
12-
`pip install jupyter`
13-
14-
1. Download the Dyalog Jupyter kernel repository as a zip: Click [here](https://github.com/Dyalog/dyalog-jupyter-kernel/archive/master.zip) to do so.
15-
1. After downloading, extract the contents and open the *dyalog-jupyter-kernel-master* directory.
16-
1. Run the following (it will have little visual effect, if any):
17-
18-
Windows: `install.bat`
19-
20-
Linux and macOS: `install.sh`
21-
22-
## Run Jupyter Notebook
23-
Use a command line or PowerShell terminal.
24-
25-
Go to the directory which contains your notebooks:
26-
27-
```
28-
cd /path/to/my/notebooks
29-
```
30-
31-
Then start the Jupyter notebook system:
32-
33-
```
34-
jupyter notebook
35-
```
36-
37-
Jupyter Notebook uses a web interface. It has a drop-down button labeled *New▾* where you can choose to create a new Dyalog APL notebook. You can also navigate to and click on any existing notebook (a file with the `.ipynb` extension) to open it.
3+
**Dyalog version 15.0 or later** and **Python version 3.8+**, and the **jupyterlab** Python package must be installed in order to use the Dyalog Jupyter kernel.
4+
5+
Installing, operating and maintaining a Python installation can be a bit of a chore, especially if you're not a Python developer. If you're coming to this wanting only to use Jupyter for Dyalog APL, here are some step by step instructions for how to set up the whole tool chain from scratch.
6+
7+
If you're a Python developer, or if you're already using a "canned" Python distribution, like [conda](https://docs.conda.io/en/latest/), you probably know what you're doing and can skip this document.
8+
9+
The below instructions show how to install Jupyter and the Dyalog kernel inside a Python "virtual environment". This means that you can keep your Jupyter work separate from any other Python work, current or future. This is usually a good idea when working with Python.
10+
11+
1. Download and install the [Dyalog interpreter](https://www.dyalog.com/download-zone.htm).
12+
2. Download, and run the official [Python installer](https://www.python.org/downloads/). Ensure you select `Use admin privileges to install Python`, `Add python.exe to PATH`, and `Disable PATH limit`.
13+
3. Open a terminal (e.g. PowerShell if you're on Windows). Type the following steps into the terminal window.
14+
4. Create a virtual Python environment with a name of your choosing, e.g.
15+
```
16+
python -m venv jupy312
17+
```
18+
5. Activate the virtual environment -- this is important:
19+
```
20+
jupy312\Scripts\activate # Windows
21+
. jupy312/bin/activate # linux, macOS. Note leading dot.
22+
```
23+
Your terminal prompt should change to have a `(jupy312)` prefix.
24+
6. [Optional, but recommended] Upgrade `pip` to the latest version:
25+
```
26+
python.exe -m pip installl --upgrade pip # Windows
27+
python -m pip installl --upgrade pip # linux, macOS
28+
```
29+
7. Install `jupyterlab`:
30+
```
31+
pip install jupyterlab
32+
```
33+
8. Install the Dyalog kernel Python module:
34+
```
35+
pip install dyalog-jupyter-kernel
36+
```
37+
9. Register the kernel with Jupyter:
38+
```
39+
python -m 'dyalog_kernel' install
40+
```
41+
10. Start jupyterlab (or notebook):
42+
```
43+
cd path/to/my/notebooks/
44+
jupyter lab # or jupyter notebook
45+
```
46+
47+
Jupyter lab (and notebook) uses a web interface. It has a drop-down button labeled *New▾* where you can choose to create a new Dyalog APL notebook. You can also navigate to and click on any existing notebook (a file with the `.ipynb` extension) to open it.
3848
3949
## Troubleshooting
4050

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ markdown_extensions:
2222
- footnotes
2323
- attr_list
2424
- pymdownx.emoji:
25-
emoji_index: !!python/name:materialx.emoji.twemoji
26-
emoji_generator: !!python/name:materialx.emoji.to_svg
25+
emoji_index: !!python/name:material.extensions.emoji.twemoji
26+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
2727
- pymdownx.superfences
2828
- toc:
2929
title: On this page

0 commit comments

Comments
 (0)