From 8b7c2a93375d8087c988279834aa21b57c3a45fb Mon Sep 17 00:00:00 2001 From: Sigfried Gold Date: Tue, 28 Nov 2023 16:51:46 -0500 Subject: [PATCH] - Big refactor of graph stuff. - It should be more correct now - I think it's slower - The first two tests succeed now, but: - With lots of concepts (e.g., 20,000), it takes forever and the whole backend won't respond while it's processing - The problem isn't in connect_nodes anymore, it's in all_paths when it's looking for simple paths to root. Those paths can get long and there can be a lot of them. Maybe a strategy of looking for predecessors would work? - It needs a lot more inline documentation - I may have fixed the duplicate test thing by putting the loop through tests inside the loop through environments rather than other way around. --- .run/backend.run.xml | 3 + backend/api_logger.py | 2 +- backend/db/ddl-19-apirun_groups.jinja.sql | 4 +- backend/db/ddl-20-concept_graph.jinja.sql | 22 +- backend/routes/graph.py | 372 +++++++++++++++--- backend/utils.py | 7 + .../src/components/CsetComparisonPage.jsx | 16 +- frontend/src/state/DataGetter.jsx | 18 +- frontend/tests/README.md | 15 +- frontend/tests/large-cset-handling.test.js | 27 +- frontend/tests/setup-test-environments.js | 3 +- frontend/tests/test-reporter.js | 5 +- 12 files changed, 393 insertions(+), 101 deletions(-) diff --git a/.run/backend.run.xml b/.run/backend.run.xml index 4d8187fa5..0b97d12aa 100644 --- a/.run/backend.run.xml +++ b/.run/backend.run.xml @@ -5,6 +5,9 @@