Skip to content

Commit

Permalink
conda working with docker already installed and no minify-html
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed Feb 14, 2024
1 parent caa8799 commit ff6f649
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
9 changes: 8 additions & 1 deletion conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@

VCF_VALIDATOR_VERSION=0.9.4
BIOVALIDATOR_VERSION=2.1.0
EVA_PYUTILS_VERSION=0.6.1

EVA_SUB_CLI="${PREFIX}/share/${PKG_NAME}-${PKG_VERSION}"
mkdir -p ${PREFIX}/bin ${EVA_SUB_CLI}

# Install eva-sub-cli
$PYTHON -m pip install -r requirements.txt
$PYTHON -m pip install .
cp bin/* ${PREFIX}/bin
echo "Done with eva-sub-cli"

cd ${EVA_SUB_CLI}

# Install python dependencies not yet on conda
curl -Lo eva-pyutils.zip https://github.com/EBIvariation/eva-common-pyutils/archive/refs/tags/v${EVA_PYUTILS_VERSION}.zip \
&& unzip eva-pyutils.zip && rm eva-pyutils.zip \
&& cd eva-common-pyutils-${EVA_PYUTILS_VERSION} \
&& $PYTHON setup.py install \
&& cd ..

# Install biovalidator from source
# Includes some workarounds that can be cleaned up once a new version is released
curl -Lo biovalidator.zip https://github.com/elixir-europe/biovalidator/archive/refs/tags/v${BIOVALIDATOR_VERSION}.zip \
Expand Down
12 changes: 10 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@ requirements:
host:
- nextflow >=21.10.0
- python >=3.8
- pip
# biovalidator
- nodejs >=10.19.1
- pyyaml
- jinja2
- openpyxl
- requests
- jsonschema
run:
- nextflow >=21.10.0
- python >=3.8
- pyyaml
- jinja2
- openpyxl
- requests
- jsonschema

test:
imports:
Expand Down
8 changes: 6 additions & 2 deletions eva_sub_cli/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os.path

from jinja2 import Environment, FileSystemLoader
from minify_html import minify_html

current_dir = os.path.dirname(__file__)

Expand Down Expand Up @@ -30,4 +29,9 @@ def generate_html_report(validation_results, validation_date, project_title=None
validation_results=validation_results,
)

return minify_html.minify(rendered_template, minify_js=True, remove_processing_instructions=True)
try:
# minify-html is not included in conda installation currently
from minify_html import minify_html
return minify_html.minify(rendered_template, minify_js=True, remove_processing_instructions=True)
except ImportError:
return rendered_template

0 comments on commit ff6f649

Please sign in to comment.