cycls 0.0.2.88__tar.gz → 0.0.2.89__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cycls-0.0.2.88 → cycls-0.0.2.89}/PKG-INFO +1 -1
- {cycls-0.0.2.88 → cycls-0.0.2.89}/cycls/app.py +2 -0
- {cycls-0.0.2.88 → cycls-0.0.2.89}/cycls/function.py +6 -3
- cycls-0.0.2.89/cycls/themes/default/assets/index-C2r4Daz3.js +435 -0
- cycls-0.0.2.89/cycls/themes/default/assets/index-DWGS8zpa.css +1 -0
- cycls-0.0.2.89/cycls/themes/default/index.html +28 -0
- {cycls-0.0.2.88 → cycls-0.0.2.89}/cycls/web.py +23 -9
- {cycls-0.0.2.88 → cycls-0.0.2.89}/pyproject.toml +1 -1
- {cycls-0.0.2.88 → cycls-0.0.2.89}/.gitignore +0 -0
- {cycls-0.0.2.88 → cycls-0.0.2.89}/README.md +0 -0
- {cycls-0.0.2.88 → cycls-0.0.2.89}/cycls/__init__.py +0 -0
- {cycls-0.0.2.88 → cycls-0.0.2.89}/cycls/auth.py +0 -0
- {cycls-0.0.2.88 → cycls-0.0.2.89}/cycls/cli.py +0 -0
- {cycls-0.0.2.88/cycls/themes/default → cycls-0.0.2.89/cycls/themes/defaultN}/assets/index-DOmNqb-2.js +0 -0
- {cycls-0.0.2.88/cycls/themes/default → cycls-0.0.2.89/cycls/themes/defaultN}/assets/index-oGkkm3Z8.css +0 -0
- {cycls-0.0.2.88/cycls/themes/default → cycls-0.0.2.89/cycls/themes/defaultN}/index.html +0 -0
- {cycls-0.0.2.88 → cycls-0.0.2.89}/cycls/themes/dev/index.html +0 -0
|
@@ -51,6 +51,7 @@ class App(Function):
|
|
|
51
51
|
|
|
52
52
|
def _prepare_func(self, prod):
|
|
53
53
|
self.config.set_prod(prod)
|
|
54
|
+
self.config.debug = not prod # debug=True in local mode
|
|
54
55
|
self.config.public_path = f"cycls/themes/{self.theme}"
|
|
55
56
|
user_func, config, name = self.user_func, self.config, self.name
|
|
56
57
|
self.func = lambda port: __import__("cycls").web.serve(user_func, config, name, port)
|
|
@@ -60,6 +61,7 @@ class App(Function):
|
|
|
60
61
|
print(f"Starting local server at localhost:{port}")
|
|
61
62
|
self.config.public_path = str(CYCLS_PATH.joinpath(f"themes/{self.theme}"))
|
|
62
63
|
self.config.set_prod(False)
|
|
64
|
+
self.config.debug = True
|
|
63
65
|
uvicorn.run(web(self.user_func, self.config), host="0.0.0.0", port=port)
|
|
64
66
|
|
|
65
67
|
def local(self, port=8080, watch=True):
|
|
@@ -12,14 +12,17 @@ import tarfile
|
|
|
12
12
|
|
|
13
13
|
os.environ["DOCKER_BUILDKIT"] = "1"
|
|
14
14
|
|
|
15
|
-
ENTRYPOINT_PY = '''import
|
|
15
|
+
ENTRYPOINT_PY = '''import sys
|
|
16
|
+
sys.path.insert(0, '/app')
|
|
17
|
+
import cloudpickle
|
|
16
18
|
with open("/app/function.pkl", "rb") as f:
|
|
17
19
|
func, args, kwargs = cloudpickle.load(f)
|
|
18
20
|
func(*args, **kwargs)
|
|
19
21
|
'''
|
|
20
22
|
|
|
21
|
-
RUNNER_PY = '''import
|
|
22
|
-
|
|
23
|
+
RUNNER_PY = '''import sys
|
|
24
|
+
sys.path.insert(0, '/app')
|
|
25
|
+
import cloudpickle
|
|
23
26
|
import traceback
|
|
24
27
|
from pathlib import Path
|
|
25
28
|
|