Skip to content

Commit

Permalink
chore: remove extras (#125)
Browse files Browse the repository at this point in the history
* remove extras

* workflow

* typo
  • Loading branch information
ZanSara authored Oct 13, 2023
1 parent f48da24 commit 2971b4d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Canals
run: |
sudo apt install graphviz libgraphviz-dev
pip install .[mermaid,graphviz,dev]
pip install .[dev] pygraphviz
- name: Mypy
run: |
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Install Canals
run: |
sudo apt install graphviz libgraphviz-dev
pip install .[mermaid,graphviz,dev]
pip install .[dev] pygraphviz
- name: Pylint
run: pylint -ry -j 0 canals/ sample_components/
Expand Down Expand Up @@ -98,14 +98,14 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install graphviz libgraphviz-dev
pip install .[mermaid,graphviz,dev]
pip install .[dev] pygraphviz
- name: Install Canals (MacOS)
if: matrix.os == 'macos-latest'
run: |
# brew only offers graphviz 8, which seems to be incompatible with pygraphviz :(
# brew install graphviz@2.49.0
pip install .[mermaid,dev]
pip install .[dev]
- name: Install Canals (Windows)
if: matrix.os == 'windows-latest'
Expand All @@ -116,7 +116,7 @@ jobs:
# --global-option="-IC:\Program Files\Graphviz\include" `
# --global-option="-LC:\Program Files\Graphviz\lib" `
# pygraphviz
pip install .[mermaid,dev]
pip install .[dev]
- name: Run
run: pytest --cov-report xml:coverage.xml --cov="canals" test/
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,18 @@ Canals powers version 2.0 of the [Haystack framework](/~https://github.com/deepset

## Installation

Running:
To install Canals, run:

```console
pip install canals
```

gives you the bare minimum necessary to run Canals.

To be able to draw pipelines, please make sure you have either an internet connection (to reach the Mermaid graph renderer at `https://mermaid.ink`) or [graphviz](https://graphviz.org/download/) (version 2.49.0) installed and then install Canals as:

### Mermaid
```console
pip install canals[mermaid]
```
To be able to draw pipelines (`Pipeline.draw()` method), please make sure you have either an internet connection (to reach the Mermaid graph renderer at `https://mermaid.ink`) or [graphviz](https://graphviz.org/download/) (version 2.49.0) installed. If you
plan to use Mermaid there is no additional steps to take, while for graphviz
you need to do:

### GraphViz
```console
sudo apt install graphviz # You may need `graphviz-dev` too
pip install canals[graphviz]
pip install pygraphviz
```
10 changes: 1 addition & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,10 @@ classifiers = [
dynamic = ["version"]
dependencies = [
"networkx", # Pipeline graphs

"requests", # Mermaid diagrams
]

[project.optional-dependencies]
graphviz = [
"pygraphviz", # Draw pipelines (requires the 'graphviz' system library)

]
mermaid = [
"requests", # Draw pipelines (requires internet connectivity)

]
dev = [
"hatch",
"pre-commit",
Expand Down

0 comments on commit 2971b4d

Please sign in to comment.