Merge branch 'master-versionbump' into stage-calibration

This commit is contained in:
Richard Bowman 2020-03-26 16:19:19 +00:00
commit 2847fa9ab5
28 changed files with 11101 additions and 56 deletions

View file

@ -2,7 +2,9 @@
from gevent import monkey
# Patch most system modules. Leave threads untouched so we can still use them normally if needed.
monkey.patch_all(thread=False)
print("Monkey patching with Gevenet")
monkey.patch_all()
print("Monkey patching successful")
import time
import atexit
@ -177,4 +179,4 @@ if __name__ == "__main__":
from labthings.server.wsgi import Server
server = Server(app)
server.run(host="0.0.0.0", port=5000, debug=False)
server.run(host="0.0.0.0", port=5000, debug=True, zeroconf=True)

View file

@ -359,7 +359,7 @@ class FastAutofocusAPI(View):
autofocus_extension_v2 = BaseExtension(
"org.openflexure.autofocus", version="2.0.0-beta.1"
"org.openflexure.autofocus", version="2.0.0"
)
autofocus_extension_v2.add_method(fast_autofocus, "fast_autofocus")

View file

@ -88,7 +88,7 @@ class AutostorageExtension(BaseExtension):
BaseExtension.__init__(
self,
"org.openflexure.autostorage",
version="2.0.0-beta.1",
version="2.0.0",
description="Handle switching capture storage devices",
)

View file

@ -354,6 +354,6 @@ class TileScanAPI(View):
return task
scan_extension_v2 = BaseExtension("org.openflexure.scan", version="2.0.0-beta.1")
scan_extension_v2 = BaseExtension("org.openflexure.scan", version="2.0.0")
scan_extension_v2.add_view(TileScanAPI, "/tile")

View file

@ -202,7 +202,7 @@ class ZipGetterAPIView(View):
zip_extension_v2 = BaseExtension(
"org.openflexure.zipbuilder",
version="2.0.0-beta.1",
version="2.0.0",
description="Build and download capture collections as ZIP files",
)

View file

@ -26,7 +26,7 @@ class CustomElementExtension(BaseExtension):
self,
"org.openflexure.customelement",
description="Testing HTML components in an extension",
static_folder=path_relative_to(__file__, "static"),
static_folder=path_relative_to(__file__, "static", "dist"),
)
# Register the on_microscope function to run when the microscope is attached

View file

@ -0,0 +1,2 @@
> 1%
last 2 versions

View file

@ -0,0 +1 @@
dist/* filter=lfs diff=lfs merge=lfs -text

View file

@ -0,0 +1,23 @@
.DS_Store
node_modules
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# Override and include dist
!/dist

View file

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:18020f0209272ab81d01b2d68da517fcff98dd07d2ad7fe738c66df75003f7cf
size 197

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:94cc5b4e5b3ddb8c6b94ef9b81b49060c582935aedf6c7d1626f4166c1827442
size 288006

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba98b02d051bf6f7d2d4302154512a72ae6ddc1eff261e171fd92a067e1bdf84
size 92018

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
{
"name": "vue-web-component-project",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "vue-cli-service build --target wc --inline-vue --name my-custom-element ./src/components/VueWebComponent.vue"
},
"dependencies": {
"axios": "^0.19.2",
"core-js": "^3.4.4",
"vue": "^2.6.10"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"vue-template-compiler": "^2.6.10"
}
}

View file

@ -0,0 +1,71 @@
<template>
<div class="my-component-class">
<h1>My Vue Web Component</h1>
<div>Base URL: {{ componentBaseURL }}</div>
<p>Host microscope name: {{ hostDeviceName }}</p>
<p>{{ message }}</p>
<br />
<p>This cheeky little counter has all of its logic contained in a server-side component:</p>
<button type="button" v-on:click="decrement()">-</button>
<span>{{ value }}</span>
<button type="button" v-on:click="increment()">+</button>
</div>
</template>
<script>
import axios from 'axios';
export default {
props: {
'componentBaseURL': {
required: false,
default: null,
type: String
}
},
data: function() {
return {
value: 0,
message: "",
hostDeviceName: null
};
},
mounted () {
if (this.componentBaseURL){
axios
.get(`${this.componentBaseURL}`)
.then(response => {
console.log(response.data)
this.hostDeviceName = response.data.title
})
.catch(function(error) {
console.log("Error reading test json, probabl because of cors or something")
})
}
else {
this.message = "No componentBaseURL given"
}
},
methods: {
decrement: function() {
this.value = this.value -1
},
increment: function() {
this.value = this.value +1
}
}
}
</script>
<style scoped>
.my-component-class {
text-align: center;
}
</style>

View file

@ -0,0 +1,7 @@
import Vue from 'vue';
import wrap from '@vue/web-component-wrapper';
import VueWebComponent from './components/VueWebComponent';
const CustomElement = wrap(Vue, VueWebComponent);
window.customElements.define('my-custom-element', CustomElement);

View file

@ -0,0 +1,3 @@
module.exports = {
productionSourceMap: false
};

View file

@ -531,6 +531,7 @@ class PiCameraStreamer(BaseCamera):
# Set resolution and stop stream recording if necessary
if not use_video_port:
self.stop_stream_recording()
time.sleep(0.1)
self.camera.capture(
target,
@ -540,6 +541,7 @@ class PiCameraStreamer(BaseCamera):
bayer=(not use_video_port) and bayer,
use_video_port=use_video_port,
)
time.sleep(0.1)
# Set resolution and start stream recording if necessary
if not use_video_port: