Skip to content

Commit

Permalink
Merge branch 'feature/custom-database-foundations' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
pverscha committed Feb 24, 2022
2 parents 38d741b + 9f4359d commit d112607
Show file tree
Hide file tree
Showing 82 changed files with 6,830 additions and 7,247 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on: [push]
jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache node modules
uses: actions/cache@v1
with:
Expand Down
23 changes: 21 additions & 2 deletions link_with_web_components_watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const chokidar = require('chokidar');
const fs = require('fs');
const path = require('path');

const directory = './../unipept-web-components/dist'
const distDirectory = './../unipept-web-components/dist'
const typesDirectory = './../unipept-web-components/types';

const errHandler = function(err) {
if (err) {
Expand All @@ -21,7 +22,7 @@ const errHandler = function(err) {
console.log("Watching file system for changes...");

// Watch for changes to the web components directory.
chokidar.watch(directory).on('all', (event, currentPath) => {
chokidar.watch(distDirectory).on('all', (event, currentPath) => {
if (!currentPath.includes('/node_modules') && !currentPath.includes('/.git')) {
const filteredPath = currentPath.replace('../unipept-web-components', './node_modules/unipept-web-components');
const directory = path.dirname(filteredPath);
Expand All @@ -40,3 +41,21 @@ chokidar.watch(directory).on('all', (event, currentPath) => {
console.log(event, currentPath);
}
});

chokidar.watch(typesDirectory).on('all', (event, currentPath) => {
const filteredPath = currentPath.replace('../unipept-web-components', './node_modules/unipept-web-components');
const directory = path.dirname(filteredPath);
switch(event) {
case 'add':
fs.mkdirSync(directory, { recursive: true }, errHandler);
fs.copyFile(currentPath, filteredPath, errHandler);
break;
case 'change':
fs.copyFile(currentPath, filteredPath, errHandler);
break;
case 'unlink':
fs.unlink(filteredPath, errHandler);
break;
}
console.log(event, currentPath);
});
6,885 changes: 1,764 additions & 5,121 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unipept-desktop",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"author": "Unipept Team (Ghent University)",
"description": "A desktop equivalent of unipept.ugent.be. This app aims at high-throughput analysis of metaproteomics samples.",
Expand All @@ -25,6 +25,7 @@
"@babel/preset-env": "^7.6.0",
"@types/async": "^3.2.3",
"@types/better-sqlite3": "^5.4.0",
"@types/dockerode": "^3.2.3",
"@types/electron-devtools-installer": "^2.2.0",
"@types/follow-redirects": "^1.13.0",
"@types/marked": "^2.0.2",
Expand All @@ -39,6 +40,7 @@
"better-sqlite3": "^7.1.2",
"chokidar": "^3.3.1",
"core-js": "^2.6.9",
"dockerode": "^3.3.0",
"electron-devtools-installer": "^3.1.1",
"electron-log": "^4.2.2",
"electron-updater": "4.3.4",
Expand All @@ -49,16 +51,16 @@
"marked": "^2.0.3",
"node-abi": "^2.19.3",
"regenerator-runtime": "^0.13.3",
"shared-memory-datastructures": "0.1.8",
"unipept-web-components": "^1.4.3",
"shared-memory-datastructures": "0.1.9",
"unipept-web-components": "^1.5.0",
"uuid": "^7.0.3",
"vue": "^2.6.12",
"vue-class-component": "^7.1.0",
"vue-fullscreen": "^2.1.5",
"vue-property-decorator": "^8.2.2",
"vue-router": "^3.1.3",
"vue-styleguidist": "^4.2.3",
"vuetify": "^2.1.1",
"vuetify": "^2.5.8",
"vuex": "^3.1.1",
"whatwg-fetch": "^3.0.0",
"yauzl": "^2.10.0"
Expand Down Expand Up @@ -93,7 +95,7 @@
"vue-cli-plugin-styleguidist": "^4.2.3",
"vue-cli-plugin-vuetify": "^0.6.3",
"vue-template-compiler": "^2.6.12",
"vuetify-loader": "^1.2.2",
"vuetify-loader": "^1.7.3",
"worker-loader": "^3.0.2"
},
"eslintConfig": {
Expand Down
28 changes: 10 additions & 18 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<!-- Navigation drawer for managing the currently selected peptides / experiments / etc. Is positioned on
the left side -->
<Toolbar
v-on:activate-dataset="onActivateDataset"
v-on:update:toolbar-width="onToolbarWidthUpdated">
</Toolbar>

Expand Down Expand Up @@ -79,9 +78,11 @@ import {
Assay,
ProteomicsAssay,
NetworkConfiguration,
AssayData,
QueueManager
QueueManager,
AssayAnalysisStatus
} from "unipept-web-components";
import DockerCommunicator from "@/logic/communication/docker/DockerCommunicator";
import BootstrapApplication from "@/logic/application/BootstrapApplication";
const electron = require("electron");
const ipcRenderer = electron.ipcRenderer;
Expand All @@ -101,8 +102,8 @@ const { app } = require("electron").remote;
assaysInProgress: {
get(): Assay[] {
return this.$store.getters.assays
.filter((a: AssayData) => a.analysisMetaData.progress < 1)
.map((a: AssayData) => a.assay);
.filter((a: AssayAnalysisStatus) => !a.analysisReady)
.map((a: AssayAnalysisStatus) => a.assay);
}
},
isMini: {
Expand All @@ -124,6 +125,7 @@ export default class App extends Vue implements ErrorListener {
private updatedColor: string = "info";
private toolbarWidth: number = 210;
// Has this component been initialized before?
private static previouslyInitialized: boolean = false;
Expand Down Expand Up @@ -182,7 +184,7 @@ export default class App extends Vue implements ErrorListener {
electron.remote.BrowserWindow.getAllWindows()[0].setProgressBar(-1);
} else {
const average: number = assays.reduce(
(prev: number, currentAssay: Assay) => prev + this.$store.getters.assayData(currentAssay).analysisMetaData.progress, 0
(prev: number, currentAssay: Assay) => prev + this.$store.getters["assayData"](currentAssay).originalProgress.value, 0
) / assays.length;
electron.remote.BrowserWindow.getAllWindows()[0].setProgressBar(average);
}
Expand All @@ -196,14 +198,8 @@ export default class App extends Vue implements ErrorListener {
this.loading = true;
let configurationManager = new ConfigurationManager();
try {
let config: Configuration = await configurationManager.readConfiguration();
NetworkConfiguration.BASE_URL = config.apiSource;
// Make sure that the old Unipept URL is no longer being used...
if (NetworkConfiguration.BASE_URL === "https://unipept.ugent.be") {
NetworkConfiguration.BASE_URL = "https://api.unipept.ugent.be";
}
NetworkConfiguration.PARALLEL_API_REQUESTS = config.maxParallelRequests;
QueueManager.initializeQueue(config.maxLongRunningTasks);
const appBootstrap = new BootstrapApplication(this.$store);
appBootstrap.loadApplicationComponents();
} catch (err) {
// TODO: show a proper error message to the user in case this happens
console.error(err)
Expand All @@ -218,10 +214,6 @@ export default class App extends Vue implements ErrorListener {
private onToolbarWidthUpdated(newValue: number) {
this.toolbarWidth = newValue;
}
private onActivateDataset(value: ProteomicsAssay) {
this.$store.dispatch("setActiveDataset", value);
}
}
</script>

Expand Down
64 changes: 64 additions & 0 deletions src/assets/images/docker/docker_available.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d112607

Please sign in to comment.