Skip to content

Commit d578906

Browse files
committed
Update docs
1 parent b791fca commit d578906

File tree

5 files changed

+39
-77
lines changed

5 files changed

+39
-77
lines changed

dev.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/configuration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ For example to override settings for the `autopep8` formatter, enter something l
9393

9494
:::{warning}
9595
This plugin does not pick up file based configuration at the moment (e.g. setup.cfg, pyproject.yml, etc.)
96+
97+
Ticket is already opened at [#167](https://github.com/ryantam626/jupyterlab_code_formatter/issues/167).
98+
:::
99+
100+
:::{warning}
101+
This plugin might be out of sync with the list of possibilities of configuration option.
102+
103+
See [settings.json](https://github.com/ryantam626/jupyterlab_code_formatter/blob/master/schema/settings.json) for the JSON schema used, feel free to open a PR for updating it.
96104
:::
97105

98106
## Chaining Formatters Invocation

docs/dev.md

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,15 @@
11
# Development
22

3-
1. Get Task - A Go task runner
3+
Prerequisites:
44

5-
```bash
6-
sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
7-
```
5+
- Install [task](https://taskfile.dev);
6+
- Install docker, with buildkit;
87

9-
2. Build docker image for dev
8+
1. Spin up docker compose based dev env - `task dev:up`
9+
2. Run `jlpm watch` inside dev container - `task dev:jlpm-watch`
10+
3. In another terminal, run `jupyter lab` inside dev container - `task dev:jupyter-lab`
1011

11-
```bash
12-
task dev:build
13-
```
12+
This watches the source directory and run JupyterLab at the same time in different terminals to watch for changes in the
13+
extension's source and automatically rebuild the extension inside the dev docker container.
1414

15-
3. Obtain a shell
16-
17-
```bash
18-
task dev:shell
19-
# NOTE: If you have a running container already, use the following instead
20-
task dev:shell-reuse
21-
```
22-
23-
4. Live compilation of Lab Extension
24-
25-
Assume you have a shell in dev container, do
26-
27-
```bash
28-
jlpm run build
29-
jlpm run watch
30-
```
31-
32-
5. Start JupyterLab
33-
34-
Do this in another terminal.
35-
36-
Assume you have a shell in dev container, do
37-
38-
````{tab} Watch mode
39-
```bash
40-
# NOTE: This might take a little while...
41-
./dev/start-jupyterlab.sh --watch
42-
```
43-
````
44-
45-
````{tab} Non-watch mode
46-
```bash
47-
./dev/start-jupyterlab.sh
48-
```
49-
````
15+
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

docs/index.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ your-support.md
1515

1616
# JupyterLab Code Formatter
1717

18-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ryantam626/jupyterlab_code_formatter/master?urlpath=lab)
19-
[![npm version](https://badge.fury.io/js/%40ryantam626%2Fjupyterlab_code_formatter.svg)](https://badge.fury.io/js/%40ryantam626%2Fjupyterlab_code_formatter)
20-
[![npm downloads](https://img.shields.io/npm/dw/%40ryantam626%2Fjupyterlab_code_formatter.svg)](https://badge.fury.io/js/%40ryantam626%2Fjupyterlab_code_formatter)
21-
[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
22-
[![Github Actions Status](https://github.com/ryantam626/jupyterlab_code_formatter/workflows/CI/badge.svg)](https://github.com/ryantam626/jupyterlab_code_formatter/actions)
23-
2418
*A JupyterLab plugin to facilitate invocation of code formatters.*
2519

2620
**Source Code**: [GitHub](https://github.com/ryantam626/jupyterlab_code_formatter/).
@@ -31,7 +25,7 @@ your-support.md
3125

3226
## Requirements
3327

34-
- Python 3.6+
28+
- Python 3.7+
3529
- JupyterLab >= 3.0.0
3630
- Any supported code formatters (you can also specify your own, see [custom formatter](custom-formatter.md)).
3731

@@ -50,12 +44,6 @@ pip install jupyterlab-code-formatter
5044
```
5145
````
5246

53-
````{tab} Conda
54-
```bash
55-
conda install -c conda-forge jupyterlab_code_formatter
56-
```
57-
````
58-
5947
````{tab} Poetry
6048
```bash
6149
poetry add jupyterlab-code-formatter
@@ -69,15 +57,34 @@ pipenv install jupyterlab-code-formatter
6957
````
7058

7159
2. **Install some supported formatters** (isort+black are default for Python)
60+
````{tab} Pip
7261
```bash
7362
# NOTE: Install black and isort,
7463
# JL code formatter is configured to invoke isort and black by default
7564
pip install black isort
7665
```
66+
````
67+
68+
````{tab} Poetry
69+
```bash
70+
# NOTE: Install black and isort,
71+
# JL code formatter is configured to invoke isort and black by default
72+
poetry add black isort
73+
```
74+
````
75+
76+
````{tab} Pipenv
77+
```bash
78+
# NOTE: Install black and isort,
79+
# JL code formatter is configured to invoke isort and black by default
80+
pipenv install black isort
81+
```
82+
````
7783

7884
3. **Restart JupyterLab**
7985

80-
This plugin includes a server plugin, restart JupyterLab if you have followed the above steps while it's running.
86+
This plugin includes a server plugin, as suck you will need to restart JupyterLab if you have followed
87+
the above steps while it's running.
8188

8289
4. **Configure plugin**
8390

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Here is a non-exhaustive list of possibilities:
1414

1515
These commands invoke the specified code formatter in the current focused cell.
1616

17-
To find out what formatters are available, you can query http://localhost:8888/jupyterlab_code_formatter/formatters?bypassVersionCheck=1 (you might need to replace the port and address), the keys of formatter are shown there.
17+
To find out what formatters are available, you can query http://localhost:8888/jupyterlab_code_formatter/formatters (you might need to replace the port and address), the keys of formatter are shown there.
1818

1919
---
2020

0 commit comments

Comments
 (0)