@@ -33,7 +33,6 @@ function IfUrlLink({ name, url, color }) {
3333 return (
3434 < MaterialUI . Typography
3535 sx = { { display : "inline" } }
36- component = "span"
3736 variant = "body2"
3837 color = { color }
3938 component = "a"
@@ -94,7 +93,7 @@ function Results(props) {
9493 variant = "body2"
9594 color = "text.disabled"
9695 >
97- { " [skipped]" }
96+ { ` [skipped] ${ result . skip_reason } ` }
9897 </ MaterialUI . Typography >
9998 ) ;
10099 const msg = (
@@ -192,14 +191,16 @@ function MyThemeProvider(props) {
192191class App extends React . Component {
193192 constructor ( props ) {
194193 super ( props ) ;
195- const deps_str = props . deps . join ( " " ) ;
194+ const inner_deps_str = props . deps . join ( "\n" ) ;
195+ const deps_str = `<pre><code>${ inner_deps_str } </code></pre>` ;
196196 this . state = {
197197 results : [ ] ,
198198 repo : urlParams . get ( "repo" ) || "" ,
199199 branch : urlParams . get ( "branch" ) || "" ,
200- msg : `${ DEFAULT_MSG } Packages: ${ deps_str } ` ,
200+ msg : `<p> ${ DEFAULT_MSG } </p><h4> Packages:</h4> ${ deps_str } ` ,
201201 progress : false ,
202202 err_msg : "" ,
203+ skip_reason : "" ,
203204 url : "" ,
204205 } ;
205206 this . pyodide_promise = prepare_pyodide ( props . deps ) ;
@@ -229,20 +230,19 @@ class App extends React.Component {
229230 var families_checks ;
230231 try {
231232 families_checks = pyodide . runPython ( `
232- from pyodide.http import open_url
233233 from repo_review.processor import process, md_as_html
234234 from repo_review.ghpath import GHPath
235-
236- GHPath.open_url = staticmethod(open_url)
235+ from dataclasses import replace
237236
238237 package = GHPath(repo="${ state . repo } ", branch="${ state . branch } ")
239- result = process(package)
238+ families, checks = process(package)
240239
241- for v in result[0] .values():
240+ for v in families .values():
242241 if v.get("description"):
243242 v["description"] = md_as_html(v["description"])
243+ checks = [res.md_as_html() for res in checks]
244244
245- result
245+ (families, checks)
246246 ` ) ;
247247 } catch ( e ) {
248248 if ( e . message . includes ( "KeyError: 'tree'" ) ) {
@@ -279,8 +279,9 @@ class App extends React.Component {
279279 name : val . name . toString ( ) ,
280280 description : val . description . toString ( ) ,
281281 state : val . result ,
282- err_msg : val . err_as_html ( ) . toString ( ) ,
282+ err_msg : val . err_msg . toString ( ) ,
283283 url : val . url . toString ( ) ,
284+ skip_reason : val . skip_reason . toString ( ) ,
284285 } ) ;
285286 }
286287
@@ -366,7 +367,7 @@ class App extends React.Component {
366367 < MaterialUI . Paper elevation = { 3 } >
367368 < MaterialUI . Box sx = { { p : 2 } } >
368369 < MaterialUI . Typography variant = "body1" component = "div" >
369- { this . state . msg }
370+ < span dangerouslySetInnerHTML = { { __html : this . state . msg } } />
370371 </ MaterialUI . Typography >
371372 { this . state . progress && < MaterialUI . LinearProgress /> }
372373 { this . state . err_msg && (
0 commit comments