Skip to content

Commit

Permalink
Add minimal install option
Browse files Browse the repository at this point in the history
  • Loading branch information
mingjerli committed Apr 29, 2022
1 parent d226178 commit fb2e0ad
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ pip install git+https://github.com/LineaLabs/lineapy.git --upgrade
Followings are extras to extend core LineaPy capabilities
| extra | pip install command | enables |
|-------|---------------------|---------|
| minimal | `pip install lineapy[minimal]` | Bare bone dependencies for LineaPy |
| 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 |

The bare bone version of LineaPy does not include black and isort as dependencies.
This may result less organized output codes and scripts.

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 Down
2 changes: 2 additions & 0 deletions docs/source/fundamentals/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Followings are extras to extend core LineaPy capabilities
+----------+---------------------------------------+----------------------------------------------+
| extra | pip install command | enables |
+==========+=======================================+==============================================+
| minimal | :code:`pip install lineapy[minimal]` | Bare bone dependencies for LineaPy |
+==========+=======================================+==============================================+
| dev | :code:`pip install lineapy[dev]` | All LineaPy tests related dependencies |
+----------+---------------------------------------+----------------------------------------------+
| graph | :code:`pip install lineapy[graph]` | Dependencies to visualize LineaPy node graph |
Expand Down
25 changes: 15 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ def version(path):
VERSION = version("lineapy/__init__.py")

minimal_requirement = [
"astor",
"click>=8.0.0",
"pydantic",
"SQLAlchemy",
"networkx",
"black",
"rich",
"pyyaml",
"asttokens",
"isort",
"IPython>=7.0.0",
"jinja2",
"nbformat",
Expand All @@ -63,7 +60,11 @@ def version(path):
"scour==0.38.2", # also for graphing use, pinned because other versions are not tested and to increase stability
]

ext_test_libs = [
integration_test_libs = ["astor"]

formatter_libs = ["black", "isort"]

extra_test_libs = [
"altair",
"pandas",
"sklearn",
Expand All @@ -76,7 +77,7 @@ def version(path):
"Pillow>=9.0.1",
]

test_libs = [
core_test_libs = [
"syrupy==1.4.5",
"pytest",
# Coveralls doesn't work with 6.0
Expand All @@ -89,11 +90,11 @@ def version(path):
"coveralls",
"pre-commit",
"pytest-xdist",
"astpretty",
]

benchmark_libs = [
"scipy",
"astpretty",
]

doc_libs = [
Expand All @@ -115,23 +116,27 @@ def version(path):
]


INSTALL_REQUIRES = minimal_requirement
MINIMAL_REQUIRES = minimal_requirement
INSTALL_REQUIRES = minimal_requirement + formatter_libs
POSTGRES_REQUIRES = INSTALL_REQUIRES + postgres_libs
GRAPH_REQUIRES = INSTALL_REQUIRES + graph_libs
DEV_REQUIRES = (
minimal_requirement
+ formatter_libs
+ postgres_libs
+ graph_libs
+ ext_test_libs
+ test_libs
+ integration_test_libs
+ extra_test_libs
+ core_test_libs
+ benchmark_libs
+ doc_libs
+ typing_libs
+ postgres_libs
)
EXTRA_REQUIRES = {
"dev": DEV_REQUIRES,
"graph": GRAPH_REQUIRES,
"postgres": POSTGRES_REQUIRES,
"minimal": MINIMAL_REQUIRES,
}

setup(
Expand Down

0 comments on commit fb2e0ad

Please sign in to comment.