Skip to content

Commit

Permalink
Fix bug with running standalone version; account for NumPy dependency…
Browse files Browse the repository at this point in the history
… in standalone install instructions; a few small changes w/r/t node circle options (#495)

* BUG: Fix error with running standalone vsn

* REL/DOC: More detailed standalone install guide

Forgot to account for chicken-and-egg NumPy problem we ran into
with Qurro. This should fix it.

* DOC: Fix node circle side panel text

Not very related to this PR but still wanted to address

* DOC: descendant -> child in dflt node circle text

* ENH: reorder node circle <option>s from less->more

I think this ordering makes the most sense
  • Loading branch information
fedarko committed Mar 18, 2021
1 parent 5c0b857 commit 26aa6ac
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -28,9 +28,14 @@ Empress is available as either a standalone program or a QIIME 2 plugin. The sta

## Standalone Version

EMPress is available through [PyPI](https://PyPI.org/project/empress/). Run the following command to install Empress:
Empress is available through [PyPI](https://PyPI.org/project/empress/). We recommend installing Empress into an environment (e.g. a [conda](https://docs.conda.io/) environment) using a Python version of at least 3.6.

`pip install empress`
Run the following commands to install Empress:

```bash
pip install cython "numpy >= 1.12.0"
pip install empress
```

Try running the command `empress --help` to ensure that Empress has been installed properly. If you see details for the different Empress commands then the installation has succeeded and you are ready to start using Empress!

Expand Down
2 changes: 1 addition & 1 deletion empress/_plot_utils.py
Expand Up @@ -10,7 +10,6 @@
import os
import pkg_resources

import q2templates
from bp import parse_newick
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -55,6 +54,7 @@ def save_viz(viz, output_dir, q2=True):
viz.copy_support_files(output_dir)

if q2:
import q2templates
index = os.path.join(TEMPLATES, 'index.html')
q2templates.render(index, output_dir)

Expand Down
9 changes: 5 additions & 4 deletions empress/support_files/templates/side-panel.html
Expand Up @@ -409,17 +409,18 @@
<label for="display-nodes-select">Show node circles?</label>
<label class="select-container">
<select id="display-nodes-select">
<option value=2>Hide all node circles</option>
<option value=3 selected>
Show node circles for internal nodes with only one child
</option>
<option value=0>Show internal node circles</option>
<option value=1>Show all node circles</option>
<option value=2>Hide all node circles</option>
<option value=3 selected>Show node circles of internal nodes with only one
descendant
</option>
</select>
</label>
</p>
<p class="side-panel-notes indented">
If checked, this draws circles at all nodes' positions.
Controls behavior of when to draw circles at nodes' positions.
</p>
<hr />
<p class="side-panel-inner-header">
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Expand Up @@ -65,6 +65,10 @@
'support_files/templates/*.html',
'citations.bib']},
data_files={},
# Yanked from Qurro: NumPy and Cython need to be installed before
# trying to install EMPress / other pip packages.
# https://github.com/biocore/qurro/blob/master/setup.py
setup_requires=["cython", "numpy >= 1.12.0"],
install_requires=base,
extras_require={'test': test, 'all': all_deps},
long_description=long_description,
Expand Down

0 comments on commit 26aa6ac

Please sign in to comment.