Skip to content

Commit

Permalink
Merge branch 'download-gin-data-for-tests' of https://github.com/Neur…
Browse files Browse the repository at this point in the history
…odataWithoutBorders/nwb-guide into download-gin-data-for-tests
  • Loading branch information
garrettmflynn committed May 28, 2024
2 parents 7a33def + 110ecbc commit ca70bad
Show file tree
Hide file tree
Showing 126 changed files with 94,682 additions and 94,676 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/example_data_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
os: [ubuntu-latest, macos-latest, macos-13, windows-latest]

steps:

- name: Get ephy_testing_data current head hash
id: ephys
run: echo "::set-output name=HASH_EPHY_DATASET::$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)"
Expand All @@ -33,7 +34,6 @@ jobs:
with:
path: ~/NWB_GUIDE/test-data/GIN/ephy_testing_data
key: ephys-datasets-${{ matrix.os }}-${{ steps.ephys.outputs.HASH_EPHY_DATASET }}

- name: Get ophys_testing_data current head hash
id: ophys
run: echo "::set-output name=HASH_OPHYS_DATASET::$(git ls-remote https://gin.g-node.org/CatalystNeuro/ophys_testing_data.git HEAD | cut -f1)"
Expand All @@ -43,7 +43,6 @@ jobs:
with:
path: ~/NWB_GUIDE/test-data/GIN/ophys_testing_data
key: ophys-datasets-${{ matrix.os }}-${{ steps.ophys.outputs.HASH_OPHYS_DATASET }}

- name: Get behavior_testing_data current head hash
id: behavior
run: echo "::set-output name=HASH_BEHAVIOR_DATASET::$(git ls-remote https://gin.g-node.org/CatalystNeuro/behavior_testing_data.git HEAD | cut -f1)"
Expand All @@ -60,12 +59,19 @@ jobs:
pip install awscli
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- if: steps.cache-ephys-datasets.outputs.cache-hit != 'true'
name: Download ephys dataset from S3
run: aws s3 cp --recursive --region=us-east-2 ${{ secrets.S3_GIN_BUCKET }}/ephy_testing_data ~/NWB_GUIDE/test-data/GIN/ephy_testing_data
run: |
mkdir -p ~/NWB_GUIDE/test-data/GIN/ephy_testing_data
aws s3 cp --region=us-east-2 ${{ secrets.S3_GIN_BUCKET }}/ephy_testing_data ~/NWB_GUIDE/test-data/GIN/ephy_testing_data --recursive
- if: steps.cache-ophys-datasets.outputs.cache-hit != 'true'
name: Download ophys dataset from S3
run: aws s3 cp --recursive --region=us-east-2 ${{ secrets.S3_GIN_BUCKET }}/ophys_testing_data ~/NWB_GUIDE/test-data/GIN/ophys_testing_data
run: |
mkdir -p ~/NWB_GUIDE/test-data/GIN/ophys_testing_data
aws s3 cp --region=us-east-2 ${{ secrets.S3_GIN_BUCKET }}/ophys_testing_data ~/NWB_GUIDE/test-data/GIN/ophys_testing_data --recursive
- if: steps.cache-behavior-datasets.outputs.cache-hit != 'true'
name: Download behavior dataset from S3
run: aws s3 cp --recursive --region=us-east-2 ${{ secrets.S3_GIN_BUCKET }}/behavior_testing_data ~/NWB_GUIDE/test-data/GIN/behavior_testing_data
run: |
mkdir -p ~/NWB_GUIDE/test-data/GIN/behavior_testing_data
aws s3 cp --region=us-east-2 ${{ secrets.S3_GIN_BUCKET }}/behavior_testing_data ~/NWB_GUIDE/test-data/GIN/behavior_testing_data --recursive
52 changes: 26 additions & 26 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// .storybook/manager.js

import { addons } from "@storybook/addons";

addons.setConfig({
isFullscreen: false,
showNav: true,
showPanel: true,
panelPosition: "bottom",
enableShortcuts: false,
showToolbar: true,
theme: undefined,
selectedPanel: undefined,
initialActive: "sidebar",
sidebar: {
showRoots: false,
collapsedRoots: ["other"],
},
toolbar: {
title: { hidden: false },
zoom: { hidden: false },
eject: { hidden: false },
copy: { hidden: false },
fullscreen: { hidden: false },
},
});
// .storybook/manager.js

import { addons } from "@storybook/addons";

addons.setConfig({
isFullscreen: false,
showNav: true,
showPanel: true,
panelPosition: "bottom",
enableShortcuts: false,
showToolbar: true,
theme: undefined,
selectedPanel: undefined,
initialActive: "sidebar",
sidebar: {
showRoots: false,
collapsedRoots: ["other"],
},
toolbar: {
title: { hidden: false },
zoom: { hidden: false },
eject: { hidden: false },
copy: { hidden: false },
fullscreen: { hidden: false },
},
});
36 changes: 18 additions & 18 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/** @type { import('@storybook/web-components').Preview } */
const preview = {
parameters: {
chromatic: { disableSnapshot: true },
backgrounds: {
default: "light",
},
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};

export default preview;
/** @type { import('@storybook/web-components').Preview } */
const preview = {
parameters: {
chromatic: { disableSnapshot: true },
backgrounds: {
default: "light",
},
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};

export default preview;
66 changes: 33 additions & 33 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
/* Improve spacing */
.version-switcher__container.dropdown {
margin-left: 10px;
}

button.btn.version-switcher__button {
margin-bottom: 0px;
}

/* Show on hover */
.version-switcher__container.dropdown:hover .dropdown-menu {
display: block;
left: 0;
margin-top: var(--bs-dropdown-spacer);
top: 100%;
}

.dropdown-menu.show {
display: none;
}

/* Remove underline and borders */
button.btn.version-switcher__button:hover {
text-decoration: none;
}

.version-switcher__menu a.list-group-item {
border: none !important;
}

.version-switcher__menu a.list-group-item:hover {
text-decoration: none !important;
}
/* Improve spacing */
.version-switcher__container.dropdown {
margin-left: 10px;
}

button.btn.version-switcher__button {
margin-bottom: 0px;
}

/* Show on hover */
.version-switcher__container.dropdown:hover .dropdown-menu {
display: block;
left: 0;
margin-top: var(--bs-dropdown-spacer);
top: 100%;
}

.dropdown-menu.show {
display: none;
}

/* Remove underline and borders */
button.btn.version-switcher__button:hover {
text-decoration: none;
}

.version-switcher__menu a.list-group-item {
border: none !important;
}

.version-switcher__menu a.list-group-item:hover {
text-decoration: none !important;
}
84 changes: 42 additions & 42 deletions electron.vite.config.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import { defineConfig } from "electron-vite";

import ViteYaml from "@modyfi/vite-plugin-yaml";

import { resolve } from "path";

const htmlRoot = "src/electron/renderer";

export default defineConfig({
main: {
build: {
rollupOptions: {
input: {
index: resolve(__dirname, "src/electron/main/main.ts"),
},
},
},
},
preload: {
build: {
rollupOptions: {
input: {
index: resolve(__dirname, "src/electron/preload/preload.js"),
},
},
},
},
renderer: {
root: `./${htmlRoot}`,
plugins: [ViteYaml()],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, htmlRoot, "index.html"),
},
output: {
dir: resolve(__dirname, "build", "renderer"),
},
},
},
},
});
import { defineConfig } from "electron-vite";

import ViteYaml from "@modyfi/vite-plugin-yaml";

import { resolve } from "path";

const htmlRoot = "src/electron/renderer";

export default defineConfig({
main: {
build: {
rollupOptions: {
input: {
index: resolve(__dirname, "src/electron/main/main.ts"),
},
},
},
},
preload: {
build: {
rollupOptions: {
input: {
index: resolve(__dirname, "src/electron/preload/preload.js"),
},
},
},
},
renderer: {
root: `./${htmlRoot}`,
plugins: [ViteYaml()],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, htmlRoot, "index.html"),
},
output: {
dir: resolve(__dirname, "build", "renderer"),
},
},
},
},
});
70 changes: 35 additions & 35 deletions notarize.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
const fs = require("fs");
const path = require("path");
require("dotenv").config();
var electron_notarize = require("@electron/notarize");

module.exports = async function (params) {
// Only notarize the app on Mac OS only.
if (process.platform !== "darwin") {
console.log("No notarization needed for current platform. This process is only intended for macOS.");
return;
}

// Same appId in electron-builder.
let appId = "com.catalystneuro.nwbguide";

let appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`);
if (!fs.existsSync(appPath)) {
throw new Error(`Cannot find application at: ${appPath}`);
}

console.log(`Notarizing ${appId} found at ${appPath}`);

try {
await electron_notarize.notarize({
teamId: process.env.teamId,
appPath: appPath,
appleId: process.env.appleId,
appleIdPassword: process.env.appleIdPassword,
});
} catch (error) {
console.error(error);
}

console.log(`Done notarizing ${appId}`);
};
const fs = require("fs");
const path = require("path");
require("dotenv").config();
var electron_notarize = require("@electron/notarize");

module.exports = async function (params) {
// Only notarize the app on Mac OS only.
if (process.platform !== "darwin") {
console.log("No notarization needed for current platform. This process is only intended for macOS.");
return;
}

// Same appId in electron-builder.
let appId = "com.catalystneuro.nwbguide";

let appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`);
if (!fs.existsSync(appPath)) {
throw new Error(`Cannot find application at: ${appPath}`);
}

console.log(`Notarizing ${appId} found at ${appPath}`);

try {
await electron_notarize.notarize({
teamId: process.env.teamId,
appPath: appPath,
appleId: process.env.appleId,
appleIdPassword: process.env.appleIdPassword,
});
} catch (error) {
console.error(error);
}

console.log(`Done notarizing ${appId}`);
};
32 changes: 16 additions & 16 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module.exports = {
arrowParens: "always",
bracketSameLine: false,
bracketSpacing: true,
embeddedLanguageFormatting: "auto",
endOfLine: "auto",
htmlWhitespaceSensitivity: "css",
printWidth: 120, // to match black
quoteProps: "as-needed",
semi: true,
singleQuote: false,
tabWidth: 4, // to match Python
trailingComma: "es5",
useTabs: false,
vueIndentScriptAndStyle: false,
};
module.exports = {
arrowParens: "always",
bracketSameLine: false,
bracketSpacing: true,
embeddedLanguageFormatting: "auto",
endOfLine: "crlf",
htmlWhitespaceSensitivity: "css",
printWidth: 120, // to match black
quoteProps: "as-needed",
semi: true,
singleQuote: false,
tabWidth: 4, // to match Python
trailingComma: "es5",
useTabs: false,
vueIndentScriptAndStyle: false,
};
Loading

0 comments on commit ca70bad

Please sign in to comment.