Skip to content

Commit

Permalink
Add documentation for pip install extras
Browse files Browse the repository at this point in the history
  • Loading branch information
mingjerli committed Apr 29, 2022
1 parent 2da905c commit 64b5aab
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,22 @@ or new tools needed. Go from your Jupyter notebook to an Airflow pipeline in min
To install LineaPy, run:

```bash
$ pip install lineapy
pip install lineapy
```

Or, if you want the latest version of LineaPy directly from the source, run:

```
$ pip install git+https://github.com/LineaLabs/lineapy.git --upgrade
pip install git+https://github.com/LineaLabs/lineapy.git --upgrade
```

Followings are extras to extend core LineaPy capabilities
| extra | pip install command | enables |
|-------|---------------------|---------|
| dev | `pip install lineapy[dev]` | All LineaPy tests related dependencies |
| graph | `pip install lineapy[graph]` | Dependencies to visualize LineaPy node graph |
| postgres | `pip install lineapy[postgres]` | Dependencies to use PostgreSQL backend |

By default, LineaPy uses SQLite for artifact store, which keeps the package light and simple.
However, SQLite has several limitations, one of which is that it does not support multiple concurrent
writes to a database (it will result in a database lock). If you want to use a more robust database,
Expand All @@ -77,15 +84,15 @@ please follow [instructions](https://docs.lineapy.org/en/latest/features/postgre
To use LineaPy in an interactive computing environment such as Jupyter Notebook/Lab or IPython, launch the environment with the `lineapy` command, like so:

```bash
$ lineapy jupyter notebook
lineapy jupyter notebook
```

```bash
$ lineapy jupyter lab
lineapy jupyter lab
```

```bash
$ lineapy ipython
lineapy ipython
```

This will automatically load the LineaPy extension in the corresponding interactive shell application.
Expand All @@ -100,7 +107,7 @@ you can load it on the fly with:

executed at the top of your session. Please note:

- You will need to run this as the first command in a given session; executing it
- You will need to run this as the first command in a given session; executing it
in the middle of a session will lead to erroneous behaviors by LineaPy.

- This loads the extension to the current session only, i.e., it does not carry over
Expand All @@ -111,7 +118,7 @@ to different sessions; you will need to repeat it for each new session.
We can also use LineaPy as a CLI command. Run:

```bash
$ lineapy python --help
lineapy python --help
```

to see available options.
Expand Down Expand Up @@ -182,7 +189,7 @@ never collect user code, data, variable names, or stack traces.
You can opt-out of usage tracking by setting environment variable:

```bash
$ export LINEAPY_DO_NOT_TRACK=true
export LINEAPY_DO_NOT_TRACK=true
```

## What Next?
Expand Down
12 changes: 12 additions & 0 deletions docs/source/fundamentals/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ Or, if you want the latest version of LineaPy directly from the source, run:
$ pip install git+https://github.com/LineaLabs/lineapy.git --upgrade
Followings are extras to extend core LineaPy capabilities

+----------+---------------------------------------+----------------------------------------------+
| extra | pip install command | enables |
+==========+=======================================+==============================================+
| dev | :code:`pip install lineapy[dev]` | All LineaPy tests related dependencies |
+----------+---------------------------------------+----------------------------------------------+
| graph | :code:`pip install lineapy[graph]` | Dependencies to visualize LineaPy node graph |
+----------+---------------------------------------+----------------------------------------------+
| postgres | :code:`pip install lineapy[postgres]` | Dependencies to use PostgreSQL backend |
+----------+---------------------------------------+----------------------------------------------+

.. note::

By default, LineaPy uses SQLite for artifact store, which keeps the package light and simple.
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def version(path):
]

postgres_libs = [
"pg",
"psycopg2",
]

Expand Down

0 comments on commit 64b5aab

Please sign in to comment.