Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Merging Griffin's changes (NCATS-Tangerine#118) * Adds support for concept identifiers in auto completion. Fixes small messup with setError message dialog in autocompletion * Adds query string parameter q/query to specify a TranQL query. Adds URL with query param to import/export interface for sharing. Fixes a couple css problems. * Adds barebones interactive shell implementation. Overhauls find tool in favor of a Elasticlunr prototype * Heavily extends on the functionality of the interactive shell. Adds intermediary prototype to shell for two-way communication. Adds basic functionality to intermediary, such as importing external modules and reading promises synchronously. * Adds rudimentary multiline capability in shell thorugh the usage of \n. Adds some functionality to the shell intermediary. * Adds an editor mode to the interactive shell for use with more complex programs * Adds program tabs to script editor * Minor changes to shell * Adds resizing to overflowing tabs in script editor. Adds python syntax highlighting to script editor * Basic (semifunctional) elasticlunr find tool searching * Adds ability to use custom functions in where clause + unit test * Ensures proper parsing of functions and lists + extends relevant units tests * Adds named/keyword arguments to functions + adds corresponding unit test * UDFs added .Refactor CustomFuntion (now CustomFunctions) * Refactoring TranQL pyodide into module * UDF format modified to be more expressive. Major refactor of App modals. A couple other things I'm forgetting * Added promise utility to TranQLApp. Added graph operations to KnowledgeGraph. Pyodide loading and stuff does not occur until the shell is opened * Quick fix to TranQLApp->render * Adds variable support to lists. Fixes bug in expand_nodes where if a concept had multiple nodes and its first node was a variable, it would only generate questions for the variable * Adds ability to use vars as function arguments * Fixes commit to wrong branch * Adds promise wrapper to pyodide_module * adds (semi-functoinal) manifest for pip and reverts change to tranql_ast expand_nodes for now * Removes interactive shell/pyodide * Changes find tool to expand tokens for better results * Lots of changes to find tool * adds highlighting to find tool * Remove context menu & add hover styles to find tool * Adds github pages? * test pages * Adds more to pages * Hopefully fixes pages theme * Adds things to GitHub pages * Adds example notebook directly into pages * Adds UDFs info/comments & more functions * Adds example docs to GitHub Pages. Adds __init__.py to tranql which never got committed * Adds function docs to GitHub Pages * Fixes error modal typo * Adds history viewer prototype. Might be better to just sort cache viewer by timestamp. * Adds ONTO sibling function * Adds comment for failing unit test documenting a known bug which the test aims to prevent * Changes expand_nodes to fix bug/unit test (NCATS-Tangerine#122). * Set theme jekyll-theme-time-machine * Adds documentation on how to add a function in udfs.py * Set theme jekyll-theme-cayman * Adds documentation on how to add a function in udfs.py. Changes jekyll theme in config back to just-the-docs * Fixes some issues with the find tool. Comments out the history viewer. Co-authored-by: frostyfan109 <[email protected]> Co-authored-by: frostyfan109 <[email protected]> Co-authored-by: frostyfan109 <[email protected]> * when using schema the expand nodes function fails to set starting nodes, and hence causing all graph grabbing, this was overlooked in initial merge. * Udfs functions for parents and sibilings looking up wrong keys fix * Error modal not closing properly fix * docker image version bump for new dev image * Update for planner, to fail iff no results can be found after trying all capable KPs. * docker version bump * Varnish docker image to slim debian version * Trapi updates (NCATS-Tangerine#122) * Backplane overhaul to enable centrizied of configuration and conversion between trapi versions * Backplane overhaul to enable centrizied of configuration and conversion between trapi versions * Addition of roger, update tranql frontend to talk to backplane always to ensure trapi configs are universal. Updating tests to those changes * docker image version bump * gnbr and indigo * Tests were that were using local server to use mock servers * icees update to latest bl lookup changes * update tests to match biolink:PascalConceptType in tests * Trapi 1.0 (NCATS-Tangerine#126) * Trapi 1.0 overhaul * Trapi 1.0 schema update. * update unit test files to Trapi 1.0 * Dependency corrections * Web prefix (NCATS-Tangerine#129) * adding web_prefix conf for web api * adding web_prefix conf for web api * minor version added * Convert renciorg refs to helxplatform refs. * Web prefix (NCATS-Tangerine#133) * adding web_prefix conf for web api * adding web_prefix conf for web api * minor version added * bumping plater version * Add UI conversion from TRAPI 1.0 to TRAPI 0.9. * Web prefix for UI (NCATS-Tangerine#139) * ui web prefix jinja way. and adds reasoner to redis results. * changes window.origin to window.href as root location of tranql to play well with prefixed proxy deployments. * Parameterizes docker file to support building a branch for CI/CD. Allows npm to build index file as a jinja template to web_prefix for static assets is allowed when serving from flask. (This has no effect on local development) * Update Dockerfile * Parameterizes docker file to support building a branch for CI/CD. (NCATS-Tangerine#145) - tranql app image should base off of tranql-base image that is build for a specific branch. In CI these two images are built in seq, and tranql-base for develop will checkout develop , - by default tranql-base is built for master and tranql-app will build off of tranql-base:latest. * Configure message not being called filters out important nodes. (NCATS-Tangerine#147) * skip and limit additions for cypher queries * plater lib version bump * test for skip and limit options on redis * fixes test , upgrades plater * strips / from main url (NCATS-Tangerine#154) * Adding db to schema so it shows up on UI auto complete * Refactoring merge endpoint. Using config for faster parsing instead of a new tranql object * Modify schema factory sending tranql config so its able to resolve redis password * Parsing tweaks for 1. Suggesting concepts only base on context, i.e considering start and end nodes , 2. sometimes numeric values cause errors , so tree.toString ensures that doesn't happen * merge for trapi 1.0 * test overhaul for merge and schema supporting redis * Score as summation of publication counts on each edge * score test disable * Support for max connections * fixing api test for score * Adding Makefile, Jenkinsfile, consolidated Docker, tranql src dir * Makefile and Jenkinsfile * Starting to organize & cleanup tests * Makefile * Test cleanup * Bumping version * Makefile * Testing jenkins file * Temp changing jenkins control flow * Update Dockerfile * Structural changes for simplified deployment * Jenkins and Makefile * using first message query graph fixed, now questions are also merged. * root question as query graph for merged answers when using schema on from clause . Redis timeout placed * schema to updated dynamically after redis is populated, and some tests * test for empty schema tweak * import at top * plater version bump * when grabbing trapi option, if tranql query parser does not set it, set to empty dict * Fixing merge conflicts * bump plater version * requirements to fix tests * Removing travis file * - Update requirements.txt , just the required libs - Dockerfile , need to override some conf on the chart so doing install makes dir location hard. for instance we mount tranql/conf/schema.yaml with redis server info, locating that in site-packages is hard * upgrade bmt concept model, and tests to remove chemical substance * upgrade bmt concept model, and tests to remove chemical substance (#6) Co-authored-by: Yaphetkg <[email protected]> * Updates schema.yaml to be redis dependent. Adds make commands for local development * Make schema.yaml path configurable via env var * Feature/local development (#7) * upgrade bmt concept model, and tests to remove chemical substance * Updates schema.yaml to be redis dependent. Adds make commands for local development * Make schema.yaml path configurable via env var Co-authored-by: Yaphetkg <[email protected]> * Updates number of major web dependencies. Notes a bug in App.js Upgrades React, react-force-graph, react-bootstrap, react-codemirror2, classnames, & qs. * Updates numerous web dependencies Upgrades react-filepond/filepond, react-icons, react-split-pane, recharts, & json5 * Removes a few unused dependencies * Adds boilerplate jest testing and sample test Fills/mocks unsupported features required by the TranQL app in jsdom. Adds a basic test that should never fail as an example. * Replaces domjs with Puppeteer testing Replaces domjs jest testing in feature/dependency-updates with end-to-end testing using Puppeteer driver. Adds two temporary tests for prototyping * Small change to App in order ot make it easier to resolve API url outside of React (i.e. in unit tests * Downgrades react-force-graph to fix dependency conflict Resolves bezier-js dependency conflict between CRA and react-force-graph. See issue #282 in react-force-graph. * Undo react-force-graph downgrade beacuse it only causes more errors * Adds schema testing, request mocking, test setup/env * Adds graph testing * Polishes aspects of schema/graph unit tests and tidies things up * Fixes non-mocked tests. Verifies that non-mocked tests work correctly. * Adds web tests to makefile * Updates API/backplane to use Flask-RESTX * Updates graph unit test to throughly check node/edge existence in Three graph * Adds legend unit test * Adds simple autocompletion test and slightly restructures tests to use a globally-specified website URL * Adds more comprehensive request mocking utility and fixes autocomplete test * Restructures autocomplete unit test so that it can test multiple types of completions. Adds an autocomplete tests for context-aware select prediction. Polishes mocking system * Fixes a bug that made it so that mocking didn't work properly in autocompletion test * Slight syntactic change to testUtil * Remove test block that was accidentally left in * Modularizes and refactors various parts of App Moves lengthy autocompletion logic into its own file. Moves main toolbar initialization data into AppToolbar under Toolbar.js. Moves settings modal into SettingsModal.js. Moves example queries used by help modal into static file. * Moves bulky table viewer initialization into AppTableViewer under TableViewer.js * Fixes error in Makefile test.npm * Makes sure Jenkins installs package.json before running tests * setupTests.js will load environment variables when cnofiguring test vars. Jenkins sets web testing env variables. make test.npm runs tests a single time (without watching). * Fixes environment directive under test stage * Fixes Jenkinsfile environment directive? * Wrap after all in try block to see if it fixes Jenkins build * Removes web build from web test installation * Stops jenkins from building production build. Hopefully fixes puppeteer running in Jenkins. * Hopefully fixes Jenkins puppeteer browser launch * Jenkins list chrome dpeendnecies * Another change to see if browser is being properly initialized * Hopefully locates chromium executable on Jenkins * Adds find_chromium to makefile * Adds test_puppeteer to get error information on browser installation in Jenkins * fixes typo in test_puppeteer * Fix bug in test_puppeteer * Should fix Jenkins Puppeteer by installing chrome dependencies * Should fix Puppeteer problem in Jenkins * Fixes improper quotes/apostrophes in Jenkinsfile * Adds test_puppeteer back for additional debugging * Adds env variable/option to disable chromium sandboxing * Tests will launch webserver prior to launching Puppeteer * Fixes merge conflict? * Jenkinks should now launch webserver in background * Changes wget to curl in Jenkinsfile. Adds brief comment of what it's doing. * Remove null output of curl * Adds wget back * Kill webserver after testing is complete * Changes lsof to npx kill-port since lsof is not installed on the build * Fix bug that stopped app from being served on root path * Adds embeddable functionality with qs arg "embed" and adds try catch around getReasonerURLs Query string arg ?embed=true or just ?embed will now has special functionality for embeddeding. This changes how the app renders, as well as specific behaviors such as disabling local storage/Dexie caching. This also adds a try catch block around the getReasonerURLs method which would previously throw an error if the API was down/unavailable. * Adds empty state to embedded graph when a query returns no results. Removes window.localStorage when embedded so that the embedded App cannot make localStorage modifications * Adds EmbedMode enum that allows embedding to either be simple (just the graph) or more complete (with banner, run button, and codemirror. * More changes to how embedding works. Adds debounced query auto-execution on simple embedding (without run button). * Replaces old Robokop answer viewer with gamma-viewer-web component. Adds answer viewer into embedded page as well. * Moves embedded tranql rendering to inside a hook. Changes the way answer viewer works inside of embedded version (component instead of modal now). * Fixes repo-wide dependency conflict bug * Fixes Dockerfile and Makefile to be up to date with develop This branch branches off from feature/local-development accidentally, so some test-related files are out of date * Remove extraneous console log & bump debounce on codemirror query from 250ms -> 1000ms. * Fixes styling on Gamma Viewer inside Bootstrap modal * Adds check for ?embed=false * Update _version.py (#12) * add heap size for build (#13) Co-authored-by: Yaphetkg <[email protected]> * add publish to (#14) * Fixes tranqlURL parsing on production env (#15) * Where statement autocomplete, TranQLIncompleteParser unit tests, and curie-to-English-name codemirror tooltips (#16) * Updates grammar to parse incomplete where clauses * Fixes strange behavior of quotedString in grammar * Adds v1 functionality to where autocompletion. * Adds tooltips for autocompleted curies in where values * Curies typed into the codemirror will now automatically be resolved into their English identifiers in the background and shown as tooltips * Fixes bugs caused by not handling stale autocomplete calls. * Fix whitespace bug with spaces in autocompletion * Updates make test.python to use src/tranql rather than locally-installed pip tranql package. Adds test for parsing where clause for autocompletion * Adds extensive unit testing for all of the TranQLIncompleteParser * Changes node norm resolution into a single request instead of one for each curie. * Bump allowed results from name-resolutions from 50 -> 250. Properly catch node-norm fetch in case of failure within codemirror onChange method Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> * Update _version.py * Update _version.py Using numbers instead due to PEP 440 mandate * HeLx-UI/TranQL Integration Iteration 2 and Autocompletion Improvements (#17) * Fix minor bug in automatic English curie name resolution * Relocate codemirror update logic into the _updateCode method. Fix small bug where English curie name resolution didn't work on the initial query loaded with ?query param * Quick fix to minor bug in debounce query execution caused by moving update logic to * Updates embedded TranQL window to only use 100vh (no overflow) instead of header + 100vh graph. * Re-enables navigation tools on embedded mode now that embedded window does not have overflow * Add query param ?answer_viewer for use when embedded param is true, automatically showing the answer viewer instead of the force graph in embedded mode * Removes ?answer_viewer for ?use_last_view. Adds embeddedLocalStorage for explicitly using localStorage while embedded. Adds ?use_last_view, which will show answer viewer/force graph as the default view when embedded, depending on which was last used * Fixes significant bug with _translateGraph that caused numerous issues with the UI. Fixes bug that was previously noted in a comment. Caused the Show Graph button to display the schema if no actual graph had been loaded yet. Also created a bug in which a race condition could cause the schemaMessage to be misconfigured and subsequently break the answer viewer component. * Delete spurious logs added in debugging for previous commit * Adds sorting for concept->concept suggestions based on edge count between concepts * Add sorting of predicate suggestions in autocomplete based on edge scoring. Removes the redundant concept hints on predicate suggestions. Note that edge scoring is not yet implemented in tranql_schema.py, so this sorting will not be apparent. * Adds prototype scoring mechanism to edges provided by redis reasoner * Updates the way that scoring data is obtained in decorate_schema * Update plater graph interface mock to have an empty field. * Fix typo in tranql_schema * Adds rudimentary localStorage cache for curie-to-english-name resolution * Update requirements.txt Updating plater version for summary fix Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: YaphetKG <[email protected]> * Update _version.py * New autocomplete changes (#18) * Fix minor bug in automatic English curie name resolution * Relocate codemirror update logic into the _updateCode method. Fix small bug where English curie name resolution didn't work on the initial query loaded with ?query param * Quick fix to minor bug in debounce query execution caused by moving update logic to * Updates embedded TranQL window to only use 100vh (no overflow) instead of header + 100vh graph. * Re-enables navigation tools on embedded mode now that embedded window does not have overflow * Add query param ?answer_viewer for use when embedded param is true, automatically showing the answer viewer instead of the force graph in embedded mode * Removes ?answer_viewer for ?use_last_view. Adds embeddedLocalStorage for explicitly using localStorage while embedded. Adds ?use_last_view, which will show answer viewer/force graph as the default view when embedded, depending on which was last used * Fixes significant bug with _translateGraph that caused numerous issues with the UI. Fixes bug that was previously noted in a comment. Caused the Show Graph button to display the schema if no actual graph had been loaded yet. Also created a bug in which a race condition could cause the schemaMessage to be misconfigured and subsequently break the answer viewer component. * Delete spurious logs added in debugging for previous commit * Adds sorting for concept->concept suggestions based on edge count between concepts * Add sorting of predicate suggestions in autocomplete based on edge scoring. Removes the redundant concept hints on predicate suggestions. Note that edge scoring is not yet implemented in tranql_schema.py, so this sorting will not be apparent. * Adds prototype scoring mechanism to edges provided by redis reasoner * Updates the way that scoring data is obtained in decorate_schema * Update plater graph interface mock to have an empty field. * Fix typo in tranql_schema * Adds rudimentary localStorage cache for curie-to-english-name resolution * Memoize _resolveIdentifiersFromConcept (full caching functionality for where clause/English name resolution. Note that currently the cached objects are extremely large (memoizing a single value of _resolveIdentifiersFromConcept could potentially cache as upwards of 200kB in localStorage) * Cut down on storage used in caching _resolveIdentifiersFromConcept/Curie. Fix results returned from caching of aforementioned. Add abort controller to name-resolution for expired requests. Remove superfluous values in results from _resolveIdentifiersFromConcept/Curie to cut down on cache size. Limit the number of results cached per query to number that will actually be displayed .Change caching on _resolveIdentifiersFromConcept to return precise results from args. Add abort controller to name-resolution-sri calls for stale autocomplete calls. * Fix issue with caching where overlapping results from different search terms weren't properly handled * Gracefully exit autocomplete on failure rather than displaying an error message. * Remove import of async-retry Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> * use latest plater with connection fix (#19) * use latest plater with connection fix * remove redis graph dep Co-authored-by: Yaphetkg <[email protected]> * Update _version.py version bump * Bmt version fix (#20) * bump bmt to fixed version * add version for test image * revert version * fix bmt and flask deps * linkml and linkml related things pinned * Update _version.py * Update _version.py Co-authored-by: frostyfan109 <[email protected]> Co-authored-by: frostyfan109 <[email protected]> Co-authored-by: frostyfan109 <[email protected]> Co-authored-by: yaphetkg <[email protected]> Co-authored-by: Chuck Bennett <[email protected]> Co-authored-by: cnbennett3 <[email protected]> Co-authored-by: Steven <[email protected]> Co-authored-by: Carl Schreep <[email protected]> Co-authored-by: Yaphetkg <[email protected]> Co-authored-by: Carl Schreep <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]> Co-authored-by: Griffin Roupe <[email protected]>
- Loading branch information