cycls 0.0.2.47__tar.gz → 0.0.2.48__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycls
3
- Version: 0.0.2.47
3
+ Version: 0.0.2.48
4
4
  Summary: Cycls SDK
5
5
  Author: Mohammed J. AlRujayi
6
6
  Author-email: mj@cycls.com
@@ -30,7 +30,7 @@ class Agent:
30
30
  def decorator(f):
31
31
  self.registered_functions.append({
32
32
  "func": f,
33
- "config": ["public", False, self.org, self.api_token, header, intro, title, auth],
33
+ "config": ["theme", False, self.org, self.api_token, header, intro, title, auth],
34
34
  # "name": name,
35
35
  "name": name or (f.__name__).replace('_', '-'),
36
36
  "domain": domain or f"{name}.cycls.ai",
@@ -65,9 +65,9 @@ class Agent:
65
65
 
66
66
  i["config"][1] = False
67
67
 
68
- copy={str(self.theme):"public", str(cycls_path)+"/web.py":"web.py"}
68
+ copy={str(self.theme):"theme", str(cycls_path)+"/web.py":"web.py"}
69
69
  copy.update({i:i for i in self.copy})
70
- copy.update({i:f"a/{i}" for i in self.copy_public})
70
+ copy.update({i:f"public/{i}" for i in self.copy_public})
71
71
 
72
72
  def runner(port):
73
73
  import uvicorn, logging
@@ -93,10 +93,15 @@ class Agent:
93
93
  image = (modal.Image.debian_slim()
94
94
  .pip_install("fastapi[standard]", "pyjwt", "cryptography", *self.pip)
95
95
  .apt_install(*self.apt)
96
- .add_local_dir(self.theme, "/root/public")
96
+ .add_local_dir(self.theme, "/root/theme")
97
97
  .add_local_file(str(cycls_path)+"/web.py", "/root/web.py"))
98
+
98
99
  for item in self.copy:
99
100
  image = image.add_local_file(item, f"/root/{item}") if "." in item else image.add_local_dir(item, f'/root/{item}')
101
+
102
+ for item in self.copy_public:
103
+ image = image.add_local_file(item, f"/root/public/{item}") if "." in item else image.add_local_dir(item, f'/root/public/{item}')
104
+
100
105
  self.app = modal.App("development", image=image)
101
106
 
102
107
  if not self.registered_functions:
@@ -119,8 +119,8 @@ def web(func, public_path="", prod=False, org=None, api_token=None, header="", i
119
119
  pk_test="pk_test_c2VsZWN0LXNsb3RoLTU4LmNsZXJrLmFjY291bnRzLmRldiQ"
120
120
  )
121
121
 
122
- if Path("a").is_dir():
123
- app.mount("/a", StaticFiles(directory="a", html=True))
122
+ if Path("public").is_dir():
123
+ app.mount("/public", StaticFiles(directory="public", html=True))
124
124
  app.mount("/", StaticFiles(directory=public_path, html=True))
125
125
 
126
126
  return app
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cycls"
3
- version = "0.0.2.47"
3
+ version = "0.0.2.48"
4
4
 
5
5
  packages = [{ include = "cycls" }]
6
6
  include = ["cycls/theme/**/*"]
File without changes
File without changes
File without changes