Skip to content

Commit ba08402

Browse files
Merge pull request #422 from NeurodataWithoutBorders/anomalous-linux-branch
Add instructions to run on unsupported Linux machines
2 parents 7eb406c + 35715c6 commit ba08402

File tree

11 files changed

+63
-71
lines changed

11 files changed

+63
-71
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ Run the `setup.exe` file and follow all instructions.
3737

3838
Run the `.dmg` file and follow all instructions to move the file into your Applications folder.
3939

40-
### Ubuntu - Graphical Interface
40+
### Ubuntu
41+
42+
> **Note:** If you're running the `.AppImage` and the app window clears to a white screen within a few seconds of starting, you will need to follow the [Developer Instructions](#developer-installation) on the [linux-fix](https://github.com/neurodatawithoutborders/nwb-guide/tree/linux-fix) branch of the NWB GUIDE.
43+
44+
#### Graphical Interface
4145

4246
Right-click the `.AppImage` file, navigate to `permissions`, and check any box which mentions 'run as executable'.
4347

44-
### Ubuntu - CLI
48+
#### Ubuntu - CLI
4549

4650
From the terminal, simply type
4751

@@ -57,6 +61,7 @@ Where you are using version `X.Y.Z`; then execute by calling
5761

5862

5963

64+
6065
## Developer Installation
6166

6267
Start by cloning the repository

pyflask/manageNeuroconv/info/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ def resource_path(relative_path):
2929

3030
# Create all nested home folders
3131
STUB_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True)
32-
CONVERSION_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True)
32+
CONVERSION_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True)
3333
TUTORIAL_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True)
34-

pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@ def upload_to_dandi(
460460
):
461461
from neuroconv.tools.data_transfers import automatic_dandi_upload
462462

463-
464463
# CONVERSION_SAVE_FOLDER_PATH.mkdir(exist_ok=True, parents=True) # Ensure base directory exists
465464

466465
os.environ["DANDI_API_KEY"] = api_key # Update API Key

src/preload/preload.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
2-
const electron = require('electron')
1+
const electron = require("electron");
32

43
// Expose ipcRenderer
54
if (process.contextIsolated) {
65
try {
7-
electron.contextBridge.exposeInMainWorld('electron', electron)
6+
electron.contextBridge.exposeInMainWorld("electron", electron);
87
} catch (error) {
9-
console.error(error)
8+
console.error(error);
109
}
11-
} else {
12-
globalThis.electron = electron
13-
}
10+
} else {
11+
globalThis.electron = electron;
12+
}

src/renderer/src/stories/InstanceManager.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,9 @@ export class InstanceManager extends LitElement {
224224

225225
setTimeout(() => {
226226
Object.entries(this.#info).forEach(([id, { status }]) => {
227-
if (status) this.updateState(id, status)
228-
})
229-
}) // NOTE: Why is this not possible without waiting?
230-
231-
227+
if (status) this.updateState(id, status);
228+
});
229+
}); // NOTE: Why is this not possible without waiting?
232230
};
233231

234232
#isCategory(value) {
@@ -272,7 +270,7 @@ export class InstanceManager extends LitElement {
272270
});
273271
}
274272

275-
#ids = {}
273+
#ids = {};
276274
#accordions = {};
277275

278276
#onSelected = () => {
@@ -359,10 +357,9 @@ export class InstanceManager extends LitElement {
359357

360358
return list;
361359
}
362-
363360

364361
render() {
365-
this.#info = {}
362+
this.#info = {};
366363
this.#items = [];
367364

368365
const instances = this.#render();

src/renderer/src/stories/Table.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ export class Table extends LitElement {
6565
onUpdate,
6666
validateEmptyCells,
6767
onStatusChange,
68-
contextMenu
68+
contextMenu,
6969
} = {}) {
7070
super();
7171
this.schema = schema ?? {};
7272
this.data = data ?? [];
7373
this.keyColumn = keyColumn;
7474
this.template = template ?? {};
7575
this.validateEmptyCells = validateEmptyCells ?? true;
76-
this.contextMenu = contextMenu ?? {}
76+
this.contextMenu = contextMenu ?? {};
7777

7878
if (onUpdate) this.onUpdate = onUpdate;
7979
if (validateOnChange) this.validateOnChange = validateOnChange;
@@ -288,25 +288,25 @@ export class Table extends LitElement {
288288
let contextMenu = ["row_below", "remove_row"];
289289
if (this.schema.additionalProperties) contextMenu.push("col_right", "remove_col");
290290

291-
console.log(this.contextMenu)
292-
contextMenu = contextMenu.filter(k => !(this.contextMenu.ignore ?? []).includes(k))
291+
console.log(this.contextMenu);
292+
contextMenu = contextMenu.filter((k) => !(this.contextMenu.ignore ?? []).includes(k));
293293

294-
const descriptionEl = this.querySelector('#description')
294+
const descriptionEl = this.querySelector("#description");
295295
const operations = {
296296
rows: [],
297-
columns: []
298-
}
299-
300-
if (contextMenu.includes('row_below')) operations.rows.push('add')
301-
if (contextMenu.includes('remove_row')) operations.rows.push('remove')
302-
if (contextMenu.includes('col_right')) operations.columns.push('add')
303-
if (contextMenu.includes('remove_col')) operations.columns.push('remove')
304-
const operationSet = new Set(Object.values(operations).flat())
305-
const operationOn = Object.keys(operations).filter(k => operations[k].length)
297+
columns: [],
298+
};
299+
300+
if (contextMenu.includes("row_below")) operations.rows.push("add");
301+
if (contextMenu.includes("remove_row")) operations.rows.push("remove");
302+
if (contextMenu.includes("col_right")) operations.columns.push("add");
303+
if (contextMenu.includes("remove_col")) operations.columns.push("remove");
304+
const operationSet = new Set(Object.values(operations).flat());
305+
const operationOn = Object.keys(operations).filter((k) => operations[k].length);
306306

307307
if (operationSet.size) {
308-
const desc = `Right click to ${Array.from(operationSet).join('/')} ${operationOn.join('and')}.`
309-
descriptionEl.innerText = desc
308+
const desc = `Right click to ${Array.from(operationSet).join("/")} ${operationOn.join("and")}.`;
309+
descriptionEl.innerText = desc;
310310
}
311311

312312
const table = new Handsontable(div, {

src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ const filter = (list, toFilter) => {
2828
});
2929
};
3030

31-
32-
const emptyMessage = 'No issues detected in these files!'
31+
const emptyMessage = "No issues detected in these files!";
3332

3433
export class GuidedInspectorPage extends Page {
3534
constructor(...args) {
@@ -58,11 +57,11 @@ export class GuidedInspectorPage extends Page {
5857

5958
getStatus = (list) => {
6059
return list.reduce((acc, o) => {
61-
const res = getMessageType(o)
62-
if (acc === 'error') return acc
63-
else return res
64-
}, 'valid')
65-
}
60+
const res = getMessageType(o);
61+
if (acc === "error") return acc;
62+
else return res;
63+
}, "valid");
64+
};
6665

6766
render() {
6867
const { globalState } = this.info;
@@ -80,8 +79,6 @@ export class GuidedInspectorPage extends Page {
8079
.flat();
8180
return html` ${until(
8281
(async () => {
83-
84-
8582
if (fileArr.length <= 1) {
8683
const items =
8784
inspector ??
@@ -101,58 +98,54 @@ export class GuidedInspectorPage extends Page {
10198
return truncateFilePaths(report, path);
10299
})();
103100
104-
105101
const _instances = fileArr.map(({ subject, session, info }) => {
102+
const file_path = [`sub-${subject}`, `sub-${subject}_ses-${session}`];
103+
const filtered = removeFilePaths(filter(items, { file_path }));
106104
107-
const file_path = [`sub-${subject}`, `sub-${subject}_ses-${session}`]
108-
const filtered = removeFilePaths(filter(items, { file_path }))
109-
110-
const display = () => new InspectorList({ items: filtered, emptyMessage })
111-
display.status = this.getStatus(filtered)
105+
const display = () => new InspectorList({ items: filtered, emptyMessage });
106+
display.status = this.getStatus(filtered);
112107
113108
return {
114109
subject,
115110
session,
116-
display
111+
display,
117112
};
118113
});
119114
120115
const instances = _instances.reduce((acc, { subject, session, display }) => {
121-
const subLabel = `sub-${subject}`
116+
const subLabel = `sub-${subject}`;
122117
if (!acc[`sub-${subject}`]) acc[subLabel] = {};
123118
acc[subLabel][`ses-${session}`] = display;
124119
return acc;
125120
}, {});
126121
127122
Object.keys(instances).forEach((subLabel) => {
128-
129123
const subItems = filter(items, { file_path: `${subLabel}${nodePath.sep}${subLabel}_ses-` }); // NOTE: This will not run on web-only now
130124
const path = getSharedPath(subItems.map((o) => o.file_path));
131-
const filtered = truncateFilePaths(subItems, path)
125+
const filtered = truncateFilePaths(subItems, path);
132126
133-
const display = () => new InspectorList({ items: filtered, emptyMessage })
134-
display.status = this.getStatus(filtered)
127+
const display = () => new InspectorList({ items: filtered, emptyMessage });
128+
display.status = this.getStatus(filtered);
135129
136130
instances[subLabel] = {
137131
["All Files"]: display,
138132
...instances[subLabel],
139133
};
140134
});
141135
142-
const allDisplay = () => new InspectorList({ items, emptyMessage })
143-
allDisplay.status = this.getStatus(items)
136+
const allDisplay = () => new InspectorList({ items, emptyMessage });
137+
allDisplay.status = this.getStatus(items);
144138
145-
146139
const allInstances = {
147140
["All Files"]: allDisplay,
148141
...instances,
149-
}
142+
};
150143
151144
const manager = new InstanceManager({
152-
instances:allInstances
145+
instances: allInstances,
153146
});
154-
155-
return manager
147+
148+
return manager;
156149
})(),
157150
""
158151
)}`;

src/renderer/src/stories/pages/guided-mode/setup/GuidedSubjects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class GuidedSubjectsPage extends Page {
8888
keyColumn: "subject_id",
8989
validateEmptyCells: false,
9090
contextMenu: {
91-
ignore: ['row_below']
91+
ignore: ["row_below"],
9292
},
9393
onUpdate: () => {
9494
this.unsavedUpdates = true;

src/renderer/src/stories/preview/NWBFilePreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function getSharedPath(array) {
2020
}
2121
});
2222

23-
return shared ? path.normalize(shared.join("/")) : ''; // Convert back to OS-specific path
23+
return shared ? path.normalize(shared.join("/")) : ""; // Convert back to OS-specific path
2424
}
2525

2626
export function truncateFilePaths(items, basepath) {

src/renderer/src/stories/preview/inspector/InspectorList.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class InspectorList extends List {
4242
}
4343

4444
constructor(props) {
45-
const { items } = props
45+
const { items } = props;
4646
const aggregatedItems = Object.values(aggregateMessages(items)).map((items) => {
4747
const aggregate = { ...items.pop() }; // Create a base object for the aggregation
4848
aggregate.files = [aggregate.file_path, ...items.map((o) => o.file_path)];
@@ -57,7 +57,7 @@ export class InspectorList extends List {
5757
const item = new InspectorListItem(o);
5858
item.style.flexGrow = "1";
5959
return { content: item };
60-
})
60+
}),
6161
});
6262
}
6363
}
@@ -133,8 +133,8 @@ export class InspectorListItem extends LitElement {
133133
render() {
134134
this.type = getMessageType({
135135
...this,
136-
type: this.ORIGINAL_TYPE
137-
})
136+
type: this.ORIGINAL_TYPE,
137+
});
138138

139139
this.setAttribute("title", this.message);
140140

0 commit comments

Comments
 (0)