Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

fix(template): Use absolute path of folder to find template #81

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install poetry
poetry install
- name: Lint with black
run: |
black --check .
- name: GitHub Action for pytest
uses: cclauss/GitHub-Action-for-pytest@0.5.0
poetry run black --check .
- name: Run pytest
run: |
poetry run pytest
4 changes: 3 additions & 1 deletion ecoindex_cli/report/report.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

from jinja2 import Environment, FileSystemLoader
from matplotlib import pyplot
from pandas import read_csv
Expand Down Expand Up @@ -65,7 +67,7 @@ def generate_report(
) -> None:
df = read_csv(results_file)
env = Environment(loader=FileSystemLoader("."))
template = env.get_template("ecoindex_cli/report/template.html")
template = env.get_template(f"{Path(__file__).parent.absolute()}/template.html")

create_histogram(
dataframe=df,
Expand Down
Loading