-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EEG Browser] Automate viz install process in npm postinstall script (#…
…8263) Integrate the EEG visualization postinstall step into npm-postinstall.js. This simplifies the EEG vis setup by eliminating the need to edit the package.json file. New steps to enable the EEG visualization: - set the new config (GUI/useEEGBrowserVisualizationComponents) to on/off. - make dev or npm install && npm run compile This new config will be used later on the LORIS-MRI side to decide if eeg chunks should be generated or not.
- Loading branch information
Showing
12 changed files
with
196 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ on: | |
- push | ||
- pull_request | ||
|
||
env: | ||
EEG_VIS_ENABLED: 'true' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
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,27 @@ | ||
-- Adds the option to toggle the EEG Browser visualization components (disabled by default). | ||
INSERT INTO ConfigSettings | ||
( | ||
Name, | ||
Description, | ||
Visible, | ||
AllowMultiple, | ||
DataType, | ||
Parent, | ||
Label, | ||
OrderNumber | ||
) | ||
SELECT | ||
'useEEGBrowserVisualizationComponents', | ||
'Whether to enable the visualization components on the EEG Browser module', | ||
1, | ||
0, | ||
'boolean', | ||
ID, | ||
'Enable the EEG Browser components', | ||
4 | ||
FROM | ||
ConfigSettings | ||
WHERE | ||
Name="gui"; | ||
|
||
INSERT INTO Config (ConfigID, Value) SELECT ID, 'false' FROM ConfigSettings WHERE Name="useEEGBrowserVisualizationComponents"; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,20 @@ | ||
#!/usr/bin/env php | ||
<?php declare(strict_types=1); | ||
require_once __DIR__ . "/../vendor/autoload.php"; | ||
require_once __DIR__ . "/generic_includes.php"; | ||
|
||
/** | ||
* This script is used to get configuration settings from LORIS db. | ||
* "Usage: php get_config.php configName" | ||
* | ||
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 | ||
*/ | ||
|
||
const MIN_NUMBER_OF_ARGS = 2; | ||
if (count($argv) < MIN_NUMBER_OF_ARGS) { | ||
throw new Exception('Missing config name'); | ||
} | ||
|
||
$configName = $argv[1]; | ||
$configValue = $config->getSetting($configName); | ||
echo json_encode($configValue, JSON_THROW_ON_ERROR); |
Oops, something went wrong.