Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/docker/login-action-3
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaStere42 authored Nov 20, 2024
2 parents 332746b + 03dda8d commit 62324c6
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 48 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches:
- main

repository_dispatch:
types: build-trigger

jobs:
devops:
name: Docker image build
Expand All @@ -18,7 +20,7 @@ jobs:

steps:
- uses: actions/checkout@v2
if: github.event_name == 'push'
if: ${{ github.event_name == 'push' || github.event_name =='repository_dispatch'}}
with:
ref: main

Expand All @@ -45,12 +47,11 @@ jobs:
password: ${{ secrets.WBIA_WILDMEBOT_DOCKER_HUB_TOKEN }}

- name: Push to Docker Hub (Latest)
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' || github.event_name =='repository_dispatch' }}
run: |
VERSION=$(echo ${GITHUB_REF} | sed 's#.*/v##')
bash ./publish.sh -t latest ${PUBLISH_IMAGES}
env:
PUBLISH_IMAGES: ${{ matrix.images }} scout



6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ With Scout, you can:

## Installation

For installation and first-time configuration steps, follow our [Server System Setup](https://docs.wildme.org/product-docs/en/scout/system-administrators/server-system-setup/) documentation guide.
For installation and first-time configuration steps, follow our [Server System Setup](https://scout.docs.wildme.org/system-administrators/server-system-setup.html) documentation guide.

**NOTE**: Installation will remove all data and any operating system from the Scout Server laptop. Ubuntu Linux will be installed as the operating system.
**NOTE**: Following full installation instructions will remove all data and any operating system from the Scout Server laptop and Ubuntu Linux will be installed as the operating system. Skip Ubuntu installation to run on a different OS.


## Important Links & Documentation

Use our [Help Documentation](https://docs.wildme.org/product-docs/en/scout/) to learn how to use Scout.
Use our [Help Documentation](https://scout.docs.wildme.org/) to learn how to use Scout.

Visit [Wild Me Professional Services](https://www.wildme.org/services) to view the range of services we can offer.

Expand Down
13 changes: 2 additions & 11 deletions api/controllers/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ module.exports = {
congrats: {
responseType: 'redirect',
description: 'The user is done annotating'
},
removeBack : {
responseType: 'redirect'
}
},

Expand Down Expand Up @@ -80,14 +77,8 @@ module.exports = {
this.req.session.annotationHistory[taskData.id].last = this.req.session.annotationHistory[taskData.id].current;
}
} else {
if(typeof(this.req.session.annotationHistory[taskData.id].last) == 'string'){
this.req.session.annotationHistory[taskData.id].current = this.req.session.annotationHistory[taskData.id].last;
this.req.session.annotationHistory[taskData.id].last = false;
} else {
// They only get here if they try to refresh a page that has a back=true on it
throw { removeBack: '/annotations/'+taskData.id+'/new'};
}

this.req.session.annotationHistory[taskData.id].current = this.req.session.annotationHistory[taskData.id].last;
this.req.session.annotationHistory[taskData.id].last = false;
}

// Find a random queued image for this task, that is currently not annotated
Expand Down
13 changes: 2 additions & 11 deletions api/controllers/ground-truths.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ module.exports = {
congrats: {
responseType: 'redirect',
description: 'The user is done ground-truthing'
},
removeBack : {
responseType: 'redirect'
}
},

Expand Down Expand Up @@ -77,14 +74,8 @@ module.exports = {
this.req.session.gtHistory[taskData.id].last = this.req.session.gtHistory[taskData.id].current;
}
} else {
if(typeof(this.req.session.gtHistory[taskData.id].last) == 'string'){
this.req.session.gtHistory[taskData.id].current = this.req.session.gtHistory[taskData.id].last;
this.req.session.gtHistory[taskData.id].last = false;
} else {
// They only get here if they try to refresh a page that has a back=true on it
throw { removeBack: '/ground-truths/'+taskData.id+'/new'};
}

this.req.session.gtHistory[taskData.id].current = this.req.session.gtHistory[taskData.id].last;
this.req.session.gtHistory[taskData.id].last = false;
}


Expand Down
13 changes: 2 additions & 11 deletions api/controllers/line-divisions.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ module.exports = {
congrats: {
responseType: 'redirect',
description: 'The user is done line-dividing'
},
removeBack : {
responseType: 'redirect'
}
},

Expand Down Expand Up @@ -78,14 +75,8 @@ module.exports = {
this.req.session.ldHistory[taskData.id].last = this.req.session.ldHistory[taskData.id].current;
}
} else {
if(typeof(this.req.session.ldHistory[taskData.id].last) == 'string'){
this.req.session.ldHistory[taskData.id].current = this.req.session.ldHistory[taskData.id].last;
this.req.session.ldHistory[taskData.id].last = false;
} else {
// They only get here if they try to refresh a page that has a back=true on it
throw { removeBack: '/line-divisions/'+taskData.id+'/new'};
}

this.req.session.ldHistory[taskData.id].current = this.req.session.ldHistory[taskData.id].last;
this.req.session.ldHistory[taskData.id].last = false;
}


Expand Down
3 changes: 0 additions & 3 deletions api/controllers/task-images-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ module.exports = {
congrats: {
responseType: 'redirect',
description: 'The user is done ground-truthing'
},
removeBack : {
responseType: 'redirect'
}
},

Expand Down
12 changes: 8 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const repl = async () => {
console.log('Welcome to Scout');
console.log(lineSeparator);

const imageDirectoryQuestion = `Please create a directory on your NAS where you would like to upload your images. Then, enter the absolute path to that directory here. If you are uploading images to several sub-directories, please only list the parent folder. Eg: /nas/images/ or /nas/\n`;
const imageDirectoryQuestion = `Please create a directory on your image store where you would like to upload your images. Then, enter the absolute path to that directory here. If you are uploading images to several sub-directories, please only list the parent folder. Eg: /data/scout/images/\n`;
settings.imageDirectory = readlineSync.question(imageDirectoryQuestion);
console.log(lineSeparator);
return;
Expand Down Expand Up @@ -137,7 +137,7 @@ const validateSettings = async () => {
}


// Try to reach NAS directory
// Try to reach image store directory
try {
let pathToImageDir = resolve(settingsObject.imageDirectory);
let pathToHiddenDir = resolve(settingsObject.imageDirectory+'/'+settingsObject.hiddenDirectory);
Expand Down Expand Up @@ -173,7 +173,7 @@ const validateSettings = async () => {
console.log('Ok, your previous settings have been deleted. Please restart Scout now.');
process.exit(0);
} else {
console.log('Ok, please check to make sure your NAS is plugged in and properly mounted, then restart Scout. The application will now exit.');
console.log('Ok, please check to make sure your image store is properly mounted, then restart Scout. The application will now exit.');
process.exit(0);
}
}
Expand All @@ -183,6 +183,10 @@ const validateSettings = async () => {


const suppressLogs = async () =>{
if (process.env.DEBUG == '1') {
console.log('DEBUG: console messages enabled');
return;
}

// If an IP hasn't been set, then keep logs running
if(typeof(process.env.ENV_IP) == 'undefined'){
Expand Down Expand Up @@ -331,7 +335,7 @@ init();
// Transform to jpg, move to tmp directory, get full path of new file
tempPath = await convertToJpg(ingestionDir+'/'+randomElement,filename);

// Move the old file to unused directory on NAS
// Move the old file to unused directory on image store
let newLocationUnused = resolve(settingsObject.imageDirectory+'/'+settingsObject.hiddenDirectory+'/unused/'+randomElement);
await fs.promises.copyFile(ingestionDir+'/'+randomElement,newLocationUnused);
await fs.promises.unlink(ingestionDir+'/'+randomElement);
Expand Down
3 changes: 2 additions & 1 deletion assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ let getTaskRow = async (task) => {
<tr id="task-row-${task.id}" style="position: relative; height: 5em;">
<th scope="row">${task.displayName}</th>
<td style="text-transform: capitalize">${task.orientation}</td>
<td>${task.randomized == false ? 'seq' : 'rnd'}</td>
<td>${task.randomized == false ? 'Sequential' : 'Random'}</td>
<td>${task.assigneeDiplayName}</td>
<td>${new Date(task.createdAt).toISOString().split('T')[0]}</td>
<td>${Math.floor(task.progressAnnotation * 100)}</td>
Expand Down Expand Up @@ -862,6 +862,7 @@ if(!document.querySelector("#activeLabel")) {
allOptions.push("shft+"+count);
count++;
}
allOptions.sort();
return allOptions;
}

Expand Down

0 comments on commit 62324c6

Please sign in to comment.