arcade-core 2.2.1__py3-none-any.whl → 2.3.0__py3-none-any.whl

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.
arcade_core/auth.py CHANGED
@@ -51,6 +51,15 @@ class Atlassian(OAuth2):
51
51
  super().__init__(id=id, scopes=scopes)
52
52
 
53
53
 
54
+ class ClickUp(OAuth2):
55
+ """Marks a tool as requiring ClickUp authorization."""
56
+
57
+ provider_id: str = "clickup"
58
+
59
+ def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
60
+ super().__init__(id=id, scopes=scopes)
61
+
62
+
54
63
  class Discord(OAuth2):
55
64
  """Marks a tool as requiring Discord authorization."""
56
65
 
arcade_core/toolkit.py CHANGED
@@ -221,7 +221,7 @@ class Toolkit(BaseModel):
221
221
  """
222
222
  # Get all python files in the package directory
223
223
  try:
224
- modules = [f for f in package_dir.glob("**/*.py") if f.is_file() and valid_path(f)]
224
+ modules = [f for f in package_dir.glob("**/*.py") if f.is_file() and Validate.path(f)]
225
225
  except OSError as e:
226
226
  raise ToolkitLoadError(
227
227
  f"Failed to locate Python files in package directory for '{package_name}'."
@@ -289,23 +289,30 @@ def get_package_directory(package_name: str) -> str:
289
289
  raise ImportError(f"Package {package_name} does not have a file path associated with it")
290
290
 
291
291
 
292
- def valid_path(path: str) -> bool:
293
- """
294
- Validate if a path is valid to be served or deployed.
295
- """
296
- # Check both POSIX and Windows interpretations
297
- posix_path = PurePosixPath(path)
298
- windows_path = PureWindowsPath(path)
299
-
300
- # Get all possible parts from both interpretations
301
- all_parts = set(posix_path.parts) | set(windows_path.parts)
302
-
303
- for part in all_parts:
304
- if part.startswith("."):
305
- return False
306
- if part in {"dist", "build", "__pycache__", "venv", "coverage.xml"}:
307
- return False
308
- if part.endswith(".lock"):
309
- return False
310
-
311
- return True
292
+ class Validate:
293
+ warn = True
294
+
295
+ @classmethod
296
+ def path(cls, path: str | Path) -> bool:
297
+ """
298
+ Validate if a path is valid to be served or deployed.
299
+ """
300
+ # Check both POSIX and Windows interpretations
301
+ posix_path = PurePosixPath(path)
302
+ windows_path = PureWindowsPath(path)
303
+
304
+ # Get all possible parts from both interpretations
305
+ all_parts = set(posix_path.parts) | set(windows_path.parts)
306
+
307
+ for part in all_parts:
308
+ if (part == "venv" or part.startswith(".")) and cls.warn:
309
+ print(
310
+ f"⚠️ Your package may contain a venv directory or hidden files. We suggest moving these out of the toolkit directory to avoid deployment issues: {path}"
311
+ )
312
+ cls.warn = False
313
+ if part in {"dist", "build", "__pycache__", "coverage.xml"}:
314
+ return False
315
+ if part.endswith(".lock"):
316
+ return False
317
+
318
+ return True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arcade-core
3
- Version: 2.2.1
3
+ Version: 2.3.0
4
4
  Summary: Arcade Core - Core library for Arcade platform
5
5
  Author-email: Arcade <dev@arcade.dev>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  arcade_core/__init__.py,sha256=1heu3AROAjpistehPzY2H-2nkj_IjQEh-vVlVOCRF1E,88
2
2
  arcade_core/annotations.py,sha256=Nst6aejLWXlpTu7GwzWETu1gQCG1XVAUR_qcFbNvyRc,198
3
- arcade_core/auth.py,sha256=-x7NipXciB6ASMjH_iTCdOl86s-R0JzQKeWkhDg1aDI,5613
3
+ arcade_core/auth.py,sha256=On9sJPOxvHjKBxgKC1yqp7oijF6KYBsG6fG8KUw-9OY,5882
4
4
  arcade_core/catalog.py,sha256=WVSTuJN2euY7PR6FBFADTR79teeetBJPFG06O-ohYjs,39492
5
5
  arcade_core/config.py,sha256=e98XQAkYySGW9T_yrJg54BB8Wuq06GPVHp7xqe2d1vU,572
6
6
  arcade_core/config_model.py,sha256=GYO37yKi7ih6EYKPpX1Kl-K1XwM2JyEJguyaJ7j9TY8,4260
@@ -11,9 +11,9 @@ arcade_core/parse.py,sha256=gIo9w0iaKU_FpR9pFbUOxRfCK-cizg9SacoQC_jmgCc,1855
11
11
  arcade_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  arcade_core/schema.py,sha256=ldgw2GYIhdVMM_fbrvbtAWQYbtr23g3z71F0kt5SnH0,14666
13
13
  arcade_core/telemetry.py,sha256=qDv8T-wO8nFi0Qh93WKaPH1b6asfoJoyyfA7ZOxPnbA,5566
14
- arcade_core/toolkit.py,sha256=set7Tre8HYbghaykNiZKqjvX5U8UvjomgOJ1RKmcfLY,10734
14
+ arcade_core/toolkit.py,sha256=O-e8Pq6AKk78d78c16TPhEjufNuCjM_AWfLknpQvmy0,11108
15
15
  arcade_core/utils.py,sha256=anzEqj7Q_3dko-oY8U2QcH62rmQE7Y4fQBm0WjwLlIE,2980
16
16
  arcade_core/version.py,sha256=CpXi3jGlx23RvRyU7iytOMZrnspdWw4yofS8lpP1AJU,18
17
- arcade_core-2.2.1.dist-info/METADATA,sha256=k3XSQA0sq8_1MLjaJ1DDwPXkXPeYkgdjJD1uBVD-2Oo,2557
18
- arcade_core-2.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
- arcade_core-2.2.1.dist-info/RECORD,,
17
+ arcade_core-2.3.0.dist-info/METADATA,sha256=ATPlHUuYQF9nADX0j2AjfiJ000H_HHXhbvsiBJEjtV0,2557
18
+ arcade_core-2.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
+ arcade_core-2.3.0.dist-info/RECORD,,