-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): new reporting view for linting errors
Builds upon the existing report view but now includes the html part of the figures that have linting violations. Further there was an issue with showing a limited amount of linting errors. The functionality that should show a list of linting errors, was iterating through the list of parsed figures and appending its linting errors. This means that tables that are not being parsed by error or otherwise would not be shown. Now It iterates through the errors and show that.
- Loading branch information
1 parent
ce46cdd
commit f9c0ee0
Showing
8 changed files
with
310 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from pathlib import Path | ||
from typing import Dict, List | ||
|
||
import lxml | ||
import lxml.etree | ||
|
||
from spex.xml import XmlUtils, Xpath, etree | ||
|
||
|
||
def get_erroneous_figures(figures: List[str], html_doc: Path) -> Dict[str, str]: | ||
doc = etree.parse(html_doc) | ||
_err_figures: Dict[str, str] = {} | ||
for figure in figures: | ||
figure_id = figure.split("_")[0] | ||
try: | ||
p = Xpath.elem_first(doc, f"./body/table[@id={figure_id}]") | ||
if p is not None: | ||
_err_figures[figure] = XmlUtils.fmt(p) | ||
except lxml.etree.XPathEvalError: | ||
... | ||
|
||
return _err_figures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.flex { | ||
display: flex; | ||
} | ||
|
||
.justify-between { | ||
justify-content: space-between; | ||
} | ||
|
||
.filter_selected { | ||
color: #fff; | ||
background-color: #a2b1bd; | ||
} | ||
|
||
.bold { | ||
font-weight: bold; | ||
} | ||
|
||
.no-select { | ||
user-select: none; | ||
} |
Oops, something went wrong.