Skip to content

Commit

Permalink
Merge branch 'main' into feature/revamp-media-list-blob-uri-loading
Browse files Browse the repository at this point in the history
  • Loading branch information
KaroMourad committed Jul 10, 2023
2 parents 6692831 + 2d7d994 commit 1569fcc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions pkgs/aimstack/asp/boards/audios.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from collections.abc import MutableMapping
from asp import AudioSequence

audios = AudioSequence.filter()
Expand All @@ -9,7 +8,7 @@ def flatten(dictionary, parent_key='', separator='.'):
items = []
for key, value in dictionary.items():
new_key = parent_key + separator + key if parent_key else key
if isinstance(value, MutableMapping):
if isinstance(value, dict):
items.extend(flatten(value, new_key, separator=separator).items())
else:
items.append((new_key, value))
Expand Down
3 changes: 1 addition & 2 deletions pkgs/aimstack/asp/boards/run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from asp import Run, Metric
from itertools import groupby
from collections.abc import MutableMapping
import math

if 'hash' in session_state:
Expand Down Expand Up @@ -30,7 +29,7 @@ def flatten(dictionary, parent_key='', separator='.'):
flattened = {}
for key, value in dictionary.items():
new_key = f"{parent_key}{separator}{key}" if parent_key else key
if isinstance(value, MutableMapping):
if isinstance(value, dict):
flattened.update(flatten(value, new_key, separator=separator))
else:
flattened[new_key] = value
Expand Down
3 changes: 1 addition & 2 deletions pkgs/aimstack/asp/boards/runs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from asp import Run
from collections.abc import MutableMapping

form = ui.form('Search')

Expand All @@ -12,7 +11,7 @@ def flatten(dictionary, parent_key='', separator='.'):
flattened = {}
for key, value in dictionary.items():
new_key = f"{parent_key}{separator}{key}" if parent_key else key
if isinstance(value, MutableMapping):
if isinstance(value, dict):
flattened.update(flatten(value, new_key, separator=separator))
else:
flattened[new_key] = value
Expand Down
4 changes: 2 additions & 2 deletions src/aimcore/web/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"zustand": "^4.1.1"
},
"scripts": {
"start": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/start.js craco --max_old_space_size=4096 start",
"build": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/build.js craco --max_old_space_size=4096 build && gzipper c -i js,css,html ./build && node tasks/index-html-template-generator.js",
"start": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/start.js craco --max_old_space_size=6144 start",
"build": "cross-env SKIP_PREFLIGHT_CHECK=true node --no-deprecation node_modules/react-scripts/scripts/build.js craco --max_old_space_size=6144 build && gzipper c -i js,css,html ./build && node tasks/index-html-template-generator.js",
"test": "cross-env SKIP_PREFLIGHT_CHECK=true craco test ",
"test:coverage": "cross-env SKIP_PREFLIGHT_CHECK=true craco test --collectCoverage",
"test:watch": "cross-env SKIP_PREFLIGHT_CHECK=true craco test --watchAll",
Expand Down
12 changes: 7 additions & 5 deletions src/aimcore/web/ui/src/pages/Board/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ any): React.FunctionComponentElement<React.ReactNode> {
await micropip.install(lib);
} catch (ex) {
// eslint-disable-next-line no-console
console.log(ex);
console.warn(ex);
}
}
}
Expand All @@ -131,7 +131,7 @@ any): React.FunctionComponentElement<React.ReactNode> {
}));
} catch (ex) {
// eslint-disable-next-line no-console
console.log(ex);
console.warn(ex);
}
}
}, [pyodide, pyodideIsLoading, data.code, namespace, registeredPackages]);
Expand All @@ -151,7 +151,9 @@ def set_session_state(state_slice):
`;
for (let queryKey in queryKeysForCacheCleaningRef.current) {
if (queryKeysForCacheCleaningRef.current[queryKey]) {
resetCode += `query_results_cache.pop('${queryKey}', None)
resetCode += `query_results_cache.pop(${JSON.stringify(
queryKey,
)}, None)
`;
queryKeysForCacheCleaningRef.current[queryKey] = false;
}
Expand All @@ -170,7 +172,7 @@ def set_session_state(state_slice):
return;
}
// eslint-disable-next-line no-console
console.log(ex);
console.warn(ex);
setState((s: any) => ({
...s,
error: ex.message,
Expand Down Expand Up @@ -263,7 +265,7 @@ def set_session_state(state_slice):
return;
}
// eslint-disable-next-line no-console
console.error(ex);
console.warn(ex);
}
}, liveUpdateInterval);
}
Expand Down

0 comments on commit 1569fcc

Please sign in to comment.