arcade-core 2.2.1__tar.gz → 2.2.2__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.
- {arcade_core-2.2.1 → arcade_core-2.2.2}/PKG-INFO +1 -1
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/toolkit.py +28 -21
- {arcade_core-2.2.1 → arcade_core-2.2.2}/pyproject.toml +1 -1
- {arcade_core-2.2.1 → arcade_core-2.2.2}/.gitignore +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/README.md +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/__init__.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/annotations.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/auth.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/catalog.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/config.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/config_model.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/errors.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/executor.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/output.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/parse.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/py.typed +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/schema.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/telemetry.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/utils.py +0 -0
- {arcade_core-2.2.1 → arcade_core-2.2.2}/arcade_core/version.py +0 -0
|
@@ -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
|
|
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
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|