Skip to content

Commit d921820

Browse files
Merge branch 'release/23.4.3'
* release/23.4.3: bump version distinct, just in case new build complement of /current put in str mypy stuff and expand calibrations to include pioreactor_unit update view for new calibrations API update view for new calibrations API
2 parents f158851 + a2a0f40 commit d921820

21 files changed

+213
-71
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
# https://flake8.pycqa.org/en/latest/user/error-codes.html
3030
- "--ignore=E203,E266,E501,W503,E402,E401"
3131
- repo: https://github.com/pre-commit/mirrors-mypy
32-
rev: 'v0.971' # Use the sha / tag you want to point at
32+
rev: 'v1.1.1' # Use the sha / tag you want to point at
3333
hooks:
3434
- id: mypy
3535

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### 23.4.3
2+
- Backend work to complete calibrations utilities:
3+
- Edits to the `calibrations` table in the database require a full drop and recreation.
4+
- New API endpoints on the webserver to store calibrations, get calibrations, set as current, etc.
5+
- add robots.txt that disallows crawlers
6+
17
### 23.3.20
28
- New route `/api/installed_plugins/<filename>` for getting back specific Python files in the plugins folder. Later, this will be generalized to getting entry_point plugins, too.
39
- Python files in `plugins/` folder on leader are viewable on the /plugins page in the UI.

app.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import logging
66
import socket
77
import sqlite3
8+
import typing as t
89
from datetime import datetime
910
from datetime import timezone
1011
from logging import handlers
@@ -52,7 +53,7 @@
5253
## UTILS
5354

5455

55-
def msg_to_JSON(msg, task, level):
56+
def msg_to_JSON(msg: str, task: str, level: str) -> str:
5657
return json.dumps(
5758
{
5859
"message": msg.strip(),
@@ -64,19 +65,19 @@ def msg_to_JSON(msg, task, level):
6465
)
6566

6667

67-
def publish_to_log(msg, task, level="DEBUG"):
68+
def publish_to_log(msg: str, task: str, level="DEBUG") -> None:
6869
client.publish(LOG_TOPIC, msg_to_JSON(msg, task, level))
6970

7071

71-
def publish_to_error_log(msg, task):
72+
def publish_to_error_log(msg, task: str) -> None:
7273
logger.error(msg)
7374
if isinstance(msg, str):
7475
publish_to_log(msg, task, "ERROR")
7576
else:
7677
publish_to_log(json.dumps(msg), task, "ERROR")
7778

7879

79-
def _make_dicts(cursor, row):
80+
def _make_dicts(cursor, row) -> dict:
8081
return dict((cursor.description[idx][0], value) for idx, value in enumerate(row))
8182

8283

@@ -89,18 +90,20 @@ def _get_db_connection():
8990
return db
9091

9192

92-
def query_db(query, args=(), one=False):
93+
def query_db(
94+
query: str, args=(), one: bool = False
95+
) -> t.Optional[list[dict[str, t.Any]] | dict[str, t.Any]]:
9396
cur = _get_db_connection().execute(query, args)
9497
rv = cur.fetchall()
9598
cur.close()
9699
return (rv[0] if rv else None) if one else rv
97100

98101

99-
def insert_into_db(insert_smt, args=()):
102+
def modify_db(statement: str, args=()) -> None:
100103
con = _get_db_connection()
101104
cur = con.cursor()
102105
try:
103-
cur.execute(insert_smt, args)
106+
cur.execute(statement, args)
104107
con.commit()
105108
except Exception as e:
106109
con.rollback() # TODO: test

asset-manifest.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.a57f1396.chunk.css",
4-
"main.js": "/static/js/main.7e925e66.chunk.js",
5-
"main.js.map": "/static/js/main.7e925e66.chunk.js.map",
4+
"main.js": "/static/js/main.fdc0c364.chunk.js",
5+
"main.js.map": "/static/js/main.fdc0c364.chunk.js.map",
66
"runtime-main.js": "/static/js/runtime-main.f68a15a8.js",
77
"runtime-main.js.map": "/static/js/runtime-main.f68a15a8.js.map",
88
"static/css/2.5f916d0c.chunk.css": "/static/css/2.5f916d0c.chunk.css",
9-
"static/js/2.b41ab541.chunk.js": "/static/js/2.b41ab541.chunk.js",
10-
"static/js/2.b41ab541.chunk.js.map": "/static/js/2.b41ab541.chunk.js.map",
9+
"static/js/2.57de9325.chunk.js": "/static/js/2.57de9325.chunk.js",
10+
"static/js/2.57de9325.chunk.js.map": "/static/js/2.57de9325.chunk.js.map",
1111
"index.html": "/index.html",
12-
"precache-manifest.fedfa718fba758d238dbd8356a33f936.js": "/precache-manifest.fedfa718fba758d238dbd8356a33f936.js",
12+
"precache-manifest.648ff42b3699e4c6f2f4defe9e8ecd1d.js": "/precache-manifest.648ff42b3699e4c6f2f4defe9e8ecd1d.js",
1313
"service-worker.js": "/service-worker.js",
1414
"static/css/2.5f916d0c.chunk.css.map": "/static/css/2.5f916d0c.chunk.css.map",
1515
"static/css/main.a57f1396.chunk.css.map": "/static/css/main.a57f1396.chunk.css.map",
16-
"static/js/2.b41ab541.chunk.js.LICENSE.txt": "/static/js/2.b41ab541.chunk.js.LICENSE.txt",
17-
"static/js/main.7e925e66.chunk.js.LICENSE.txt": "/static/js/main.7e925e66.chunk.js.LICENSE.txt",
16+
"static/js/2.57de9325.chunk.js.LICENSE.txt": "/static/js/2.57de9325.chunk.js.LICENSE.txt",
17+
"static/js/main.fdc0c364.chunk.js.LICENSE.txt": "/static/js/main.fdc0c364.chunk.js.LICENSE.txt",
1818
"static/media/300.css": "/static/media/roboto-vietnamese-300-normal.48c684d9.woff2",
1919
"static/media/400.css": "/static/media/roboto-vietnamese-400-normal.ca3b09b6.woff2",
2020
"static/media/500.css": "/static/media/roboto-vietnamese-500-normal.7cda2cfe.woff2",
@@ -23,8 +23,8 @@
2323
"entrypoints": [
2424
"static/js/runtime-main.f68a15a8.js",
2525
"static/css/2.5f916d0c.chunk.css",
26-
"static/js/2.b41ab541.chunk.js",
26+
"static/js/2.57de9325.chunk.js",
2727
"static/css/main.a57f1396.chunk.css",
28-
"static/js/main.7e925e66.chunk.js"
28+
"static/js/main.fdc0c364.chunk.js"
2929
]
3030
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link href="/static/css/2.5f916d0c.chunk.css" rel="stylesheet"><link href="/static/css/main.a57f1396.chunk.css" rel="stylesheet"></head><body><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var f=t[l];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/";var l=this.webpackJsonpui=this.webpackJsonpui||[],f=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var p=f;t()}([])</script><script src="/static/js/2.b41ab541.chunk.js"></script><script src="/static/js/main.7e925e66.chunk.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link href="/static/css/2.5f916d0c.chunk.css" rel="stylesheet"><link href="/static/css/main.a57f1396.chunk.css" rel="stylesheet"></head><body><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var f=t[l];0!==o[f]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/";var l=this.webpackJsonpui=this.webpackJsonpui||[],f=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var p=f;t()}([])</script><script src="/static/js/2.57de9325.chunk.js"></script><script src="/static/js/main.fdc0c364.chunk.js"></script></body></html>

pioreactor_icon.svg

Lines changed: 2 additions & 2 deletions
Loading

precache-manifest.fedfa718fba758d238dbd8356a33f936.js renamed to precache-manifest.648ff42b3699e4c6f2f4defe9e8ecd1d.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
self.__precacheManifest = (self.__precacheManifest || []).concat([
22
{
3-
"revision": "c81e789da9557a47c8d5c56595e583f2",
3+
"revision": "985fa32e5ff87b0ad4a40b08f646b50b",
44
"url": "/index.html"
55
},
66
{
7-
"revision": "6a8548c39a30589737b2",
7+
"revision": "62f4cbbae6691348a795",
88
"url": "/static/css/2.5f916d0c.chunk.css"
99
},
1010
{
11-
"revision": "dedba7ef8f550c771263",
11+
"revision": "328be7c5b26b0abbd9d7",
1212
"url": "/static/css/main.a57f1396.chunk.css"
1313
},
1414
{
15-
"revision": "6a8548c39a30589737b2",
16-
"url": "/static/js/2.b41ab541.chunk.js"
15+
"revision": "62f4cbbae6691348a795",
16+
"url": "/static/js/2.57de9325.chunk.js"
1717
},
1818
{
1919
"revision": "2d98c9923b33447912a2bf9f7c6aec66",
20-
"url": "/static/js/2.b41ab541.chunk.js.LICENSE.txt"
20+
"url": "/static/js/2.57de9325.chunk.js.LICENSE.txt"
2121
},
2222
{
23-
"revision": "dedba7ef8f550c771263",
24-
"url": "/static/js/main.7e925e66.chunk.js"
23+
"revision": "328be7c5b26b0abbd9d7",
24+
"url": "/static/js/main.fdc0c364.chunk.js"
2525
},
2626
{
2727
"revision": "4e0e34f265fae8f33b01b27ae29d9d6f",
28-
"url": "/static/js/main.7e925e66.chunk.js.LICENSE.txt"
28+
"url": "/static/js/main.fdc0c364.chunk.js.LICENSE.txt"
2929
},
3030
{
3131
"revision": "659899e3f6ae725ab589",

robots.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# https://www.robotstxt.org/robotstxt.html
22
User-agent: *
3-
Disallow:
3+
Disallow: /

service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
1515

1616
importScripts(
17-
"/precache-manifest.fedfa718fba758d238dbd8356a33f936.js"
17+
"/precache-manifest.648ff42b3699e4c6f2f4defe9e8ecd1d.js"
1818
);
1919

2020
self.addEventListener('message', (event) => {

static/js/2.57de9325.chunk.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)