From 64b5aab89927d496ceeb69d2a31831d2929ee4e7 Mon Sep 17 00:00:00 2001 From: Ming-Jer Lee Date: Fri, 29 Apr 2022 02:52:55 -0400 Subject: [PATCH] Add documentation for pip install extras --- README.md | 23 +++++++++++++++-------- docs/source/fundamentals/setup.rst | 12 ++++++++++++ setup.py | 1 - 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 92c52dad0..103493db9 100644 --- a/README.md +++ b/README.md @@ -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, @@ -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. @@ -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 @@ -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. @@ -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? diff --git a/docs/source/fundamentals/setup.rst b/docs/source/fundamentals/setup.rst index 7a26cb082..f5873b392 100644 --- a/docs/source/fundamentals/setup.rst +++ b/docs/source/fundamentals/setup.rst @@ -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. diff --git a/setup.py b/setup.py index 892d400f7..d2ff24143 100644 --- a/setup.py +++ b/setup.py @@ -111,7 +111,6 @@ def version(path): ] postgres_libs = [ - "pg", "psycopg2", ]