synapse-sdk 1.0.0a15__tar.gz → 1.0.0a16__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.
Potentially problematic release.
This version of synapse-sdk might be problematic. Click here for more details.
- {synapse_sdk-1.0.0a15/synapse_sdk.egg-info → synapse_sdk-1.0.0a16}/PKG-INFO +1 -1
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/base.py +4 -4
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/base.py +9 -7
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/file.py +55 -2
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16/synapse_sdk.egg-info}/PKG-INFO +1 -1
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/.github/workflows/lint.yml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/.github/workflows/pypi-publish.yml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/.gitignore +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/.pre-commit-config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/LICENSE +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/README.md +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/locale/en/LC_MESSAGES/messages.mo +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/locale/en/LC_MESSAGES/messages.po +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/locale/ko/LC_MESSAGES/messages.mo +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/locale/ko/LC_MESSAGES/messages.po +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/pyproject.toml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/requirements.txt +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/setup.cfg +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/cli/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/cli/create_plugin.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/agent/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/agent/core.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/agent/ray.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/agent/service.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/backend/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/backend/annotation.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/backend/dataset.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/backend/integration.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/backend/ml.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/exceptions.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/ray/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/ray/core.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/ray/serve.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/clients/utils.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/i18n.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/loggers.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/data_validation/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/data_validation/actions/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/data_validation/actions/validation.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/data_validation/templates/config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/data_validation/templates/plugin/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/data_validation/templates/plugin/validation.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/decorators.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/export/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/export/actions/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/export/actions/export.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/import/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/import/actions/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/import/actions/import.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/actions/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/actions/deployment.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/actions/inference.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/actions/test.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/actions/train.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/templates/config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/templates/plugin/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/templates/plugin/inference.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/templates/plugin/test.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/templates/plugin/train.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/post_annotation/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/post_annotation/actions/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/post_annotation/actions/post_annotation.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/post_annotation/templates/config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/post_annotation/templates/plugin/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/post_annotation/templates/plugin/post_annotation.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/pre_annotation/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/pre_annotation/actions/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/pre_annotation/actions/pre_annotation.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/pre_annotation/templates/config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/pre_annotation/templates/plugin/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/pre_annotation/templates/plugin/pre_annotation.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/registry.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/smart_tool/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/smart_tool/actions/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/smart_tool/actions/auto_label.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/smart_tool/templates/config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/smart_tool/templates/plugin/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/smart_tool/templates/plugin/auto_label.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/templates.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/cli/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/cli/publish.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/cli/run.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/enums.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/exceptions.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/models.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/cookiecutter.json +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/hooks/post_gen_project.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/hooks/pre_prompt.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/.env +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/.env.dist +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/.gitignore +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/.pre-commit-config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/README.md +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/config.yaml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/main.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/plugin/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/pyproject.toml +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/requirements.txt +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/upload.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/utils.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/shared/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/shared/enums.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/debug.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/module_loading.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/pydantic/__init__.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/pydantic/config.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/pydantic/errors.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/pydantic/validators.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/storage.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/utils/string.py +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk.egg-info/SOURCES.txt +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk.egg-info/dependency_links.txt +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk.egg-info/entry_points.txt +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk.egg-info/requires.txt +0 -0
- {synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk.egg-info/top_level.txt +0 -0
|
@@ -62,7 +62,7 @@ class BaseClient:
|
|
|
62
62
|
response = self._request('get', path, **kwargs)
|
|
63
63
|
if url_conversion:
|
|
64
64
|
if url_conversion['is_list']:
|
|
65
|
-
files_url_to_path_from_objs(response['results'], **url_conversion)
|
|
65
|
+
files_url_to_path_from_objs(response['results'], **url_conversion, is_async=True)
|
|
66
66
|
else:
|
|
67
67
|
files_url_to_path_from_objs(response, **url_conversion)
|
|
68
68
|
return response
|
|
@@ -80,14 +80,14 @@ class BaseClient:
|
|
|
80
80
|
return self._request('delete', path, **kwargs)
|
|
81
81
|
|
|
82
82
|
def _list(self, path, url_conversion=None, list_all=False, **kwargs):
|
|
83
|
-
response = self._get(path,
|
|
83
|
+
response = self._get(path, **kwargs)
|
|
84
84
|
if list_all:
|
|
85
85
|
return self._list_all(path, url_conversion, **kwargs), response['count']
|
|
86
86
|
else:
|
|
87
87
|
return response
|
|
88
88
|
|
|
89
|
-
def _list_all(self, path, url_conversion=None, **kwargs):
|
|
90
|
-
response = self._get(path, url_conversion, **kwargs)
|
|
89
|
+
def _list_all(self, path, url_conversion=None, params=None, **kwargs):
|
|
90
|
+
response = self._get(path, url_conversion, params=params, **kwargs)
|
|
91
91
|
yield from response['results']
|
|
92
92
|
if response['next']:
|
|
93
93
|
yield from self._list_all(response['next'], url_conversion, **kwargs)
|
|
@@ -92,13 +92,15 @@ class Action:
|
|
|
92
92
|
@property
|
|
93
93
|
def debug_modules(self):
|
|
94
94
|
debug_modules = []
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
if self.envs.get('SYNAPSE_DEBUG_MODULES'):
|
|
96
|
+
for module_path in self.envs['SYNAPSE_DEBUG_MODULES'].split(','):
|
|
97
|
+
# TODO ray에서 지원하는 remote uri 형식 (https, s3, gs) 모두 지원
|
|
98
|
+
if module_path.startswith('https://'):
|
|
99
|
+
module_url = module_path
|
|
100
|
+
else:
|
|
101
|
+
module_url = build_and_upload(module_path, self.plugin_storage_url)
|
|
102
|
+
debug_modules.append(module_url)
|
|
103
|
+
self.envs['SYNAPSE_DEBUG_MODULES'] = ','.join(debug_modules)
|
|
102
104
|
return debug_modules
|
|
103
105
|
|
|
104
106
|
def get_run(self):
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
import hashlib
|
|
2
3
|
import json
|
|
3
4
|
import operator
|
|
@@ -6,6 +7,7 @@ from functools import reduce
|
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
from urllib.parse import urlparse
|
|
8
9
|
|
|
10
|
+
import aiohttp
|
|
9
11
|
import requests
|
|
10
12
|
import yaml
|
|
11
13
|
|
|
@@ -38,18 +40,69 @@ def files_url_to_path(files, coerce=None):
|
|
|
38
40
|
files[file_name]['path'] = download_file(files[file_name].pop('url'), path_download, coerce=coerce)
|
|
39
41
|
|
|
40
42
|
|
|
41
|
-
def files_url_to_path_from_objs(objs, files_fields, coerce=None, is_list=False):
|
|
43
|
+
def files_url_to_path_from_objs(objs, files_fields, coerce=None, is_list=False, is_async=False):
|
|
44
|
+
if is_async:
|
|
45
|
+
asyncio.run(afiles_url_to_path_from_objs(objs, files_fields, coerce=coerce, is_list=is_list))
|
|
46
|
+
else:
|
|
47
|
+
if not is_list:
|
|
48
|
+
objs = [objs]
|
|
49
|
+
|
|
50
|
+
for obj in objs:
|
|
51
|
+
for files_field in files_fields:
|
|
52
|
+
try:
|
|
53
|
+
files = reduce(operator.getitem, files_field.split('.'), obj)
|
|
54
|
+
files_url_to_path(files, coerce=coerce)
|
|
55
|
+
except KeyError:
|
|
56
|
+
pass
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
async def adownload_file(url, path_download, name=None, coerce=None):
|
|
60
|
+
if name:
|
|
61
|
+
name += Path(url).suffix
|
|
62
|
+
else:
|
|
63
|
+
name = Path(url).name
|
|
64
|
+
|
|
65
|
+
name = urlparse(name).path
|
|
66
|
+
path = Path(path_download) / name
|
|
67
|
+
if not path.is_file():
|
|
68
|
+
async with aiohttp.ClientSession() as session:
|
|
69
|
+
async with session.get(url) as response:
|
|
70
|
+
with open(str(path), 'wb') as file:
|
|
71
|
+
while chunk := await response.content.read(1024 * 64):
|
|
72
|
+
file.write(chunk)
|
|
73
|
+
|
|
74
|
+
if coerce:
|
|
75
|
+
path = coerce(path)
|
|
76
|
+
|
|
77
|
+
return path
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
async def afiles_url_to_path(files, coerce=None):
|
|
81
|
+
path_download = Path('/tmp/datamaker') / 'media'
|
|
82
|
+
path_download.mkdir(parents=True, exist_ok=True)
|
|
83
|
+
for file_name in files:
|
|
84
|
+
if isinstance(files[file_name], str):
|
|
85
|
+
files[file_name] = await adownload_file(files[file_name], path_download, coerce=coerce)
|
|
86
|
+
else:
|
|
87
|
+
files[file_name]['path'] = await adownload_file(files[file_name].pop('url'), path_download, coerce=coerce)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
async def afiles_url_to_path_from_objs(objs, files_fields, coerce=None, is_list=False):
|
|
42
91
|
if not is_list:
|
|
43
92
|
objs = [objs]
|
|
44
93
|
|
|
94
|
+
tasks = []
|
|
95
|
+
|
|
45
96
|
for obj in objs:
|
|
46
97
|
for files_field in files_fields:
|
|
47
98
|
try:
|
|
48
99
|
files = reduce(operator.getitem, files_field.split('.'), obj)
|
|
49
|
-
|
|
100
|
+
tasks.append(afiles_url_to_path(files, coerce=coerce))
|
|
50
101
|
except KeyError:
|
|
51
102
|
pass
|
|
52
103
|
|
|
104
|
+
await asyncio.gather(*tasks)
|
|
105
|
+
|
|
53
106
|
|
|
54
107
|
def get_dict_from_file(file_path):
|
|
55
108
|
if isinstance(file_path, str):
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/export/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/import/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/neural_net/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/categories/smart_tool/__init__.py
RENAMED
|
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
|
{synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/cookiecutter.json
RENAMED
|
File without changes
|
|
File without changes
|
{synapse_sdk-1.0.0a15 → synapse_sdk-1.0.0a16}/synapse_sdk/plugins/templates/hooks/pre_prompt.py
RENAMED
|
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
|
|
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
|