synapse-sdk 1.0.0a59__py3-none-any.whl → 1.0.0a60__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.

Potentially problematic release.


This version of synapse-sdk might be problematic. Click here for more details.

Files changed (85) hide show
  1. synapse_sdk/cli/__init__.py +246 -5
  2. synapse_sdk/cli/alias/utils.py +1 -1
  3. synapse_sdk/cli/config.py +339 -0
  4. synapse_sdk/cli/devtools.py +61 -0
  5. synapse_sdk/cli/plugin/publish.py +3 -4
  6. synapse_sdk/clients/agent/__init__.py +7 -2
  7. synapse_sdk/clients/agent/ray.py +37 -6
  8. synapse_sdk/clients/backend/__init__.py +5 -9
  9. synapse_sdk/clients/backend/annotation.py +4 -0
  10. synapse_sdk/clients/base.py +42 -3
  11. synapse_sdk/devtools/__init__.py +0 -0
  12. synapse_sdk/devtools/config.py +94 -0
  13. synapse_sdk/devtools/docs/.gitignore +20 -0
  14. synapse_sdk/devtools/docs/README.md +41 -0
  15. synapse_sdk/devtools/docs/blog/2019-05-28-first-blog-post.md +12 -0
  16. synapse_sdk/devtools/docs/blog/2019-05-29-long-blog-post.md +44 -0
  17. synapse_sdk/devtools/docs/blog/2021-08-01-mdx-blog-post.mdx +24 -0
  18. synapse_sdk/devtools/docs/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  19. synapse_sdk/devtools/docs/blog/2021-08-26-welcome/index.md +29 -0
  20. synapse_sdk/devtools/docs/blog/authors.yml +25 -0
  21. synapse_sdk/devtools/docs/blog/tags.yml +19 -0
  22. synapse_sdk/devtools/docs/docusaurus.config.ts +138 -0
  23. synapse_sdk/devtools/docs/package-lock.json +17455 -0
  24. synapse_sdk/devtools/docs/package.json +47 -0
  25. synapse_sdk/devtools/docs/sidebars.ts +36 -0
  26. synapse_sdk/devtools/docs/src/components/HomepageFeatures/index.tsx +71 -0
  27. synapse_sdk/devtools/docs/src/components/HomepageFeatures/styles.module.css +11 -0
  28. synapse_sdk/devtools/docs/src/css/custom.css +30 -0
  29. synapse_sdk/devtools/docs/src/pages/index.module.css +23 -0
  30. synapse_sdk/devtools/docs/src/pages/index.tsx +21 -0
  31. synapse_sdk/devtools/docs/src/pages/markdown-page.md +7 -0
  32. synapse_sdk/devtools/docs/static/.nojekyll +0 -0
  33. synapse_sdk/devtools/docs/static/img/docusaurus-social-card.jpg +0 -0
  34. synapse_sdk/devtools/docs/static/img/docusaurus.png +0 -0
  35. synapse_sdk/devtools/docs/static/img/favicon.ico +0 -0
  36. synapse_sdk/devtools/docs/static/img/logo.png +0 -0
  37. synapse_sdk/devtools/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
  38. synapse_sdk/devtools/docs/static/img/undraw_docusaurus_react.svg +170 -0
  39. synapse_sdk/devtools/docs/static/img/undraw_docusaurus_tree.svg +40 -0
  40. synapse_sdk/devtools/docs/tsconfig.json +8 -0
  41. synapse_sdk/devtools/models.py +55 -0
  42. synapse_sdk/devtools/server.py +829 -0
  43. synapse_sdk/devtools/web/.gitignore +2 -0
  44. synapse_sdk/devtools/web/README.md +34 -0
  45. synapse_sdk/devtools/web/dist/index.html +17 -0
  46. synapse_sdk/devtools/web/index.html +16 -0
  47. synapse_sdk/devtools/web/jsconfig.json +15 -0
  48. synapse_sdk/devtools/web/package-lock.json +2609 -0
  49. synapse_sdk/devtools/web/package.json +27 -0
  50. synapse_sdk/devtools/web/pnpm-lock.yaml +1055 -0
  51. synapse_sdk/devtools/web/src/App.jsx +14 -0
  52. synapse_sdk/devtools/web/src/App.module.css +33 -0
  53. synapse_sdk/devtools/web/src/assets/favicon.ico +0 -0
  54. synapse_sdk/devtools/web/src/components/Breadcrumbs.jsx +42 -0
  55. synapse_sdk/devtools/web/src/components/Layout.jsx +12 -0
  56. synapse_sdk/devtools/web/src/components/LogViewer.jsx +266 -0
  57. synapse_sdk/devtools/web/src/components/MessageViewer.jsx +150 -0
  58. synapse_sdk/devtools/web/src/components/NavigationSidebar.jsx +137 -0
  59. synapse_sdk/devtools/web/src/components/ServerStatusBar.jsx +245 -0
  60. synapse_sdk/devtools/web/src/components/icons.jsx +325 -0
  61. synapse_sdk/devtools/web/src/index.css +470 -0
  62. synapse_sdk/devtools/web/src/index.jsx +15 -0
  63. synapse_sdk/devtools/web/src/logo.svg +1 -0
  64. synapse_sdk/devtools/web/src/router.jsx +34 -0
  65. synapse_sdk/devtools/web/src/utils/api.js +425 -0
  66. synapse_sdk/devtools/web/src/views/ApplicationDetailView.jsx +241 -0
  67. synapse_sdk/devtools/web/src/views/ApplicationsView.jsx +224 -0
  68. synapse_sdk/devtools/web/src/views/HomeView.jsx +197 -0
  69. synapse_sdk/devtools/web/src/views/JobDetailView.jsx +310 -0
  70. synapse_sdk/devtools/web/src/views/PluginView.jsx +914 -0
  71. synapse_sdk/devtools/web/vite.config.js +13 -0
  72. synapse_sdk/plugins/categories/neural_net/actions/tune.py +1 -1
  73. synapse_sdk/plugins/categories/pre_annotation/actions/to_task.py +236 -64
  74. synapse_sdk/plugins/categories/pre_annotation/templates/config.yaml +14 -2
  75. synapse_sdk/plugins/templates/plugin-config-schema.json +409 -0
  76. synapse_sdk/plugins/templates/schema.json +484 -0
  77. synapse_sdk/utils/converters/__init__.py +145 -0
  78. synapse_sdk/utils/converters/coco/__init__.py +0 -0
  79. synapse_sdk/utils/converters/coco/from_dm.py +269 -0
  80. {synapse_sdk-1.0.0a59.dist-info → synapse_sdk-1.0.0a60.dist-info}/METADATA +9 -22
  81. {synapse_sdk-1.0.0a59.dist-info → synapse_sdk-1.0.0a60.dist-info}/RECORD +85 -17
  82. {synapse_sdk-1.0.0a59.dist-info → synapse_sdk-1.0.0a60.dist-info}/WHEEL +0 -0
  83. {synapse_sdk-1.0.0a59.dist-info → synapse_sdk-1.0.0a60.dist-info}/entry_points.txt +0 -0
  84. {synapse_sdk-1.0.0a59.dist-info → synapse_sdk-1.0.0a60.dist-info}/licenses/LICENSE +0 -0
  85. {synapse_sdk-1.0.0a59.dist-info → synapse_sdk-1.0.0a60.dist-info}/top_level.txt +0 -0
@@ -11,8 +11,13 @@ class AgentClient(CoreClientMixin, RayClientMixin, ServiceClientMixin):
11
11
  tenant = None
12
12
  long_poll_handler = None
13
13
 
14
- def __init__(self, base_url, agent_token, user_token=None, tenant=None, long_poll_handler=None):
15
- super().__init__(base_url)
14
+ def __init__(self, base_url, agent_token, user_token=None, tenant=None, long_poll_handler=None, timeout=None):
15
+ # Use shorter timeouts for agent connections for better UX
16
+ agent_timeout = timeout or {
17
+ 'connect': 3, # Connection timeout: 3 seconds
18
+ 'read': 10, # Read timeout: 10 seconds
19
+ }
20
+ super().__init__(base_url, timeout=agent_timeout)
16
21
  self.agent_token = agent_token
17
22
  self.user_token = user_token
18
23
  self.tenant = tenant
@@ -1,3 +1,5 @@
1
+ import requests
2
+
1
3
  from synapse_sdk.clients.base import BaseClient
2
4
  from synapse_sdk.clients.exceptions import ClientError
3
5
 
@@ -15,19 +17,48 @@ class RayClientMixin(BaseClient):
15
17
  path = f'jobs/{pk}/logs/'
16
18
  return self._get(path)
17
19
 
18
- def tail_job_logs(self, pk):
20
+ def tail_job_logs(self, pk, stream_timeout=10):
19
21
  if self.long_poll_handler:
20
22
  raise ClientError(400, '"tail_job_logs" does not support long polling')
21
23
 
22
24
  path = f'jobs/{pk}/tail_logs/'
23
-
24
25
  url = self._get_url(path)
25
26
  headers = self._get_headers()
26
27
 
27
- response = self.requests_session.get(url, headers=headers, stream=True)
28
- for line in response.iter_lines(decode_unicode=True):
29
- if line:
30
- yield f'{line}\n'
28
+ try:
29
+ # Use shorter timeout for streaming to prevent hanging
30
+ response = self.requests_session.get(
31
+ url, headers=headers, stream=True, timeout=(self.timeout['connect'], stream_timeout)
32
+ )
33
+ response.raise_for_status()
34
+
35
+ # Set up streaming with timeout handling
36
+ try:
37
+ for line in response.iter_lines(decode_unicode=True, chunk_size=1024):
38
+ if line:
39
+ yield f'{line}\n'
40
+ except requests.exceptions.ChunkedEncodingError:
41
+ # Connection was interrupted during streaming
42
+ raise ClientError(503, f'Log stream for job {pk} was interrupted')
43
+ except requests.exceptions.ReadTimeout:
44
+ # Read timeout during streaming
45
+ raise ClientError(408, f'Log stream for job {pk} timed out after {stream_timeout}s')
46
+
47
+ except requests.exceptions.ConnectTimeout:
48
+ raise ClientError(
49
+ 408, f'Failed to connect to log stream for job {pk} (timeout: {self.timeout["connect"]}s)'
50
+ )
51
+ except requests.exceptions.ReadTimeout:
52
+ raise ClientError(408, f'Log stream for job {pk} read timeout ({stream_timeout}s)')
53
+ except requests.exceptions.ConnectionError as e:
54
+ if 'Connection refused' in str(e):
55
+ raise ClientError(503, f'Agent connection refused for job {pk}')
56
+ else:
57
+ raise ClientError(503, f'Agent connection error for job {pk}: {str(e)[:100]}')
58
+ except requests.exceptions.HTTPError as e:
59
+ raise ClientError(e.response.status_code, f'HTTP error streaming logs for job {pk}: {e}')
60
+ except Exception as e:
61
+ raise ClientError(500, f'Unexpected error streaming logs for job {pk}: {str(e)[:100]}')
31
62
 
32
63
  def get_node(self, pk):
33
64
  path = f'nodes/{pk}/'
@@ -15,22 +15,18 @@ class BackendClient(
15
15
  HITLClientMixin,
16
16
  ):
17
17
  name = 'Backend'
18
- token = None
19
- tenant = None
18
+ access_token = None
20
19
  agent_token = None
21
20
 
22
- def __init__(self, base_url, token=None, tenant=None, agent_token=None):
21
+ def __init__(self, base_url, access_token=None, agent_token=None, **kwargs):
23
22
  super().__init__(base_url)
24
- self.token = token
25
- self.tenant = tenant
23
+ self.access_token = access_token
26
24
  self.agent_token = agent_token
27
25
 
28
26
  def _get_headers(self):
29
27
  headers = {}
30
- if self.token:
31
- headers['Authorization'] = f'Token {self.token}'
32
- if self.tenant:
33
- headers['SYNAPSE-Tenant'] = f'Token {self.tenant}'
28
+ if self.access_token:
29
+ headers['Synapse-Access-Token'] = f'Token {self.access_token}'
34
30
  if self.agent_token:
35
31
  headers['SYNAPSE-Agent'] = f'Token {self.agent_token}'
36
32
  return headers
@@ -11,6 +11,10 @@ class AnnotationClientMixin(BaseClient):
11
11
  path = f'tasks/{pk}/'
12
12
  return self._get(path, params=params)
13
13
 
14
+ def annotate_task_data(self, pk, data):
15
+ path = f'tasks/{pk}/annotate_task_data/'
16
+ return self._put(path, data=data)
17
+
14
18
  def patch_task(self, pk, data):
15
19
  path = f'tasks/{pk}/'
16
20
  return self._patch(path, data=data)
@@ -3,6 +3,8 @@ import os
3
3
  from pathlib import Path
4
4
 
5
5
  import requests
6
+ from requests.adapters import HTTPAdapter
7
+ from urllib3.util.retry import Retry
6
8
 
7
9
  from synapse_sdk.clients.exceptions import ClientError
8
10
  from synapse_sdk.utils.file import files_url_to_path_from_objs
@@ -13,9 +15,29 @@ class BaseClient:
13
15
  base_url = None
14
16
  page_size = 100
15
17
 
16
- def __init__(self, base_url):
18
+ def __init__(self, base_url, timeout=None):
17
19
  self.base_url = base_url
20
+ # Set reasonable default timeouts for better UX
21
+ self.timeout = timeout or {
22
+ 'connect': 5, # Connection timeout: 5 seconds
23
+ 'read': 15, # Read timeout: 15 seconds
24
+ }
25
+
26
+ # Create session with retry strategy
18
27
  requests_session = requests.Session()
28
+
29
+ # Configure retry strategy for transient failures
30
+ retry_strategy = Retry(
31
+ total=3, # Total retries
32
+ backoff_factor=1, # Backoff factor between retries
33
+ status_forcelist=[502, 503, 504], # HTTP status codes to retry
34
+ allowed_methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
35
+ )
36
+
37
+ adapter = HTTPAdapter(max_retries=retry_strategy)
38
+ requests_session.mount('http://', adapter)
39
+ requests_session.mount('https://', adapter)
40
+
19
41
  self.requests_session = requests_session
20
42
 
21
43
  def _get_url(self, path):
@@ -41,6 +63,10 @@ class BaseClient:
41
63
  headers = self._get_headers()
42
64
  headers.update(kwargs.pop('headers', {}))
43
65
 
66
+ # Set timeout if not provided in kwargs
67
+ if 'timeout' not in kwargs:
68
+ kwargs['timeout'] = (self.timeout['connect'], self.timeout['read'])
69
+
44
70
  # List to store opened files to close after request
45
71
  opened_files = []
46
72
 
@@ -71,8 +97,21 @@ class BaseClient:
71
97
  raise ClientError(
72
98
  response.status_code, response.json() if response.status_code == 400 else response.reason
73
99
  )
74
- except requests.ConnectionError:
75
- raise ClientError(408, f'{self.name} is not responding')
100
+ except requests.exceptions.ConnectTimeout:
101
+ raise ClientError(408, f'{self.name} connection timeout (>{self.timeout["connect"]}s)')
102
+ except requests.exceptions.ReadTimeout:
103
+ raise ClientError(408, f'{self.name} read timeout (>{self.timeout["read"]}s)')
104
+ except requests.exceptions.ConnectionError as e:
105
+ # More specific error handling for different connection issues
106
+ if 'Name or service not known' in str(e) or 'nodename nor servname provided' in str(e):
107
+ raise ClientError(503, f'{self.name} host unreachable')
108
+ elif 'Connection refused' in str(e):
109
+ raise ClientError(503, f'{self.name} connection refused')
110
+ else:
111
+ raise ClientError(503, f'{self.name} connection error: {str(e)[:100]}')
112
+ except requests.exceptions.RequestException as e:
113
+ # Catch all other requests exceptions
114
+ raise ClientError(500, f'{self.name} request failed: {str(e)[:100]}')
76
115
 
77
116
  # Close all opened files
78
117
  for opened_file in opened_files:
File without changes
@@ -0,0 +1,94 @@
1
+ import json
2
+ from pathlib import Path
3
+ from typing import Dict, Optional
4
+
5
+ CONFIG_DIR = Path.home() / '.config' / 'synapse'
6
+ DEVTOOLS_CONFIG_FILE = CONFIG_DIR / 'devtools.json'
7
+
8
+
9
+ def ensure_config_dir():
10
+ """Ensure the config directory exists"""
11
+ CONFIG_DIR.mkdir(parents=True, exist_ok=True)
12
+
13
+
14
+ def load_devtools_config() -> Dict:
15
+ """Load devtools configuration from file"""
16
+ ensure_config_dir()
17
+
18
+ # Handle both Path and string types for testing
19
+ config_file = Path(DEVTOOLS_CONFIG_FILE) if isinstance(DEVTOOLS_CONFIG_FILE, str) else DEVTOOLS_CONFIG_FILE
20
+
21
+ if not config_file.exists():
22
+ return {}
23
+
24
+ try:
25
+ with open(config_file, 'r') as f:
26
+ return json.load(f)
27
+ except (json.JSONDecodeError, IOError):
28
+ return {}
29
+
30
+
31
+ def save_devtools_config(config: Dict):
32
+ """Save devtools configuration to file"""
33
+ ensure_config_dir()
34
+
35
+ # Handle both Path and string types for testing
36
+ config_file = Path(DEVTOOLS_CONFIG_FILE) if isinstance(DEVTOOLS_CONFIG_FILE, str) else DEVTOOLS_CONFIG_FILE
37
+
38
+ try:
39
+ with open(config_file, 'w') as f:
40
+ json.dump(config, f, indent=2)
41
+ except IOError:
42
+ pass
43
+
44
+
45
+ def get_backend_config() -> Optional[Dict]:
46
+ """Get backend configuration (host and token)"""
47
+ config = load_devtools_config()
48
+ backend = config.get('backend', {})
49
+
50
+ host = backend.get('host')
51
+ token = backend.get('token')
52
+
53
+ if host and token:
54
+ return {'host': host, 'token': token}
55
+
56
+ return None
57
+
58
+
59
+ def set_backend_config(host: str, token: str):
60
+ """Set backend configuration"""
61
+ config = load_devtools_config()
62
+ config['backend'] = {'host': host, 'token': token}
63
+ save_devtools_config(config)
64
+
65
+
66
+ def clear_backend_config():
67
+ """Clear backend configuration"""
68
+ config = load_devtools_config()
69
+ if 'backend' in config:
70
+ del config['backend']
71
+ save_devtools_config(config)
72
+
73
+
74
+ def get_server_config() -> Dict:
75
+ """Get server configuration (host and port)"""
76
+ config = load_devtools_config()
77
+ server = config.get('server', {})
78
+
79
+ return {'host': server.get('host', '127.0.0.1'), 'port': server.get('port', 8080)}
80
+
81
+
82
+ def set_server_config(host: str = None, port: int = None):
83
+ """Set server configuration"""
84
+ config = load_devtools_config()
85
+
86
+ if 'server' not in config:
87
+ config['server'] = {}
88
+
89
+ if host is not None:
90
+ config['server']['host'] = host
91
+ if port is not None:
92
+ config['server']['port'] = port
93
+
94
+ save_devtools_config(config)
@@ -0,0 +1,20 @@
1
+ # Dependencies
2
+ /node_modules
3
+
4
+ # Production
5
+ /build
6
+
7
+ # Generated files
8
+ .docusaurus
9
+ .cache-loader
10
+
11
+ # Misc
12
+ .DS_Store
13
+ .env.local
14
+ .env.development.local
15
+ .env.test.local
16
+ .env.production.local
17
+
18
+ npm-debug.log*
19
+ yarn-debug.log*
20
+ yarn-error.log*
@@ -0,0 +1,41 @@
1
+ # Website
2
+
3
+ This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn
9
+ ```
10
+
11
+ ## Local Development
12
+
13
+ ```bash
14
+ yarn start
15
+ ```
16
+
17
+ This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18
+
19
+ ## Build
20
+
21
+ ```bash
22
+ yarn build
23
+ ```
24
+
25
+ This command generates static content into the `build` directory and can be served using any static contents hosting service.
26
+
27
+ ## Deployment
28
+
29
+ Using SSH:
30
+
31
+ ```bash
32
+ USE_SSH=true yarn deploy
33
+ ```
34
+
35
+ Not using SSH:
36
+
37
+ ```bash
38
+ GIT_USER=<Your GitHub username> yarn deploy
39
+ ```
40
+
41
+ If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
@@ -0,0 +1,12 @@
1
+ ---
2
+ slug: first-blog-post
3
+ title: First Blog Post
4
+ authors: [slorber, yangshun]
5
+ tags: [hola, docusaurus]
6
+ ---
7
+
8
+ Lorem ipsum dolor sit amet...
9
+
10
+ <!-- truncate -->
11
+
12
+ ...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
@@ -0,0 +1,44 @@
1
+ ---
2
+ slug: long-blog-post
3
+ title: Long Blog Post
4
+ authors: yangshun
5
+ tags: [hello, docusaurus]
6
+ ---
7
+
8
+ This is the summary of a very long blog post,
9
+
10
+ Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
11
+
12
+ <!-- truncate -->
13
+
14
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
15
+
16
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
17
+
18
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
19
+
20
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
21
+
22
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
23
+
24
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
25
+
26
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
27
+
28
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
29
+
30
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
31
+
32
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
33
+
34
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
35
+
36
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
37
+
38
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
39
+
40
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
41
+
42
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
43
+
44
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
@@ -0,0 +1,24 @@
1
+ ---
2
+ slug: mdx-blog-post
3
+ title: MDX Blog Post
4
+ authors: [slorber]
5
+ tags: [docusaurus]
6
+ ---
7
+
8
+ Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
9
+
10
+ :::tip
11
+
12
+ Use the power of React to create interactive blog posts.
13
+
14
+ :::
15
+
16
+ {/* truncate */}
17
+
18
+ For example, use JSX to create an interactive button:
19
+
20
+ ```js
21
+ <button onClick={() => alert('button clicked!')}>Click me!</button>
22
+ ```
23
+
24
+ <button onClick={() => alert('button clicked!')}>Click me!</button>
@@ -0,0 +1,29 @@
1
+ ---
2
+ slug: welcome
3
+ title: Welcome
4
+ authors: [slorber, yangshun]
5
+ tags: [facebook, hello, docusaurus]
6
+ ---
7
+
8
+ [Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
9
+
10
+ Here are a few tips you might find useful.
11
+
12
+ <!-- truncate -->
13
+
14
+ Simply add Markdown files (or folders) to the `blog` directory.
15
+
16
+ Regular blog authors can be added to `authors.yml`.
17
+
18
+ The blog post date can be extracted from filenames, such as:
19
+
20
+ - `2019-05-30-welcome.md`
21
+ - `2019-05-30-welcome/index.md`
22
+
23
+ A blog post folder can be convenient to co-locate blog post images:
24
+
25
+ ![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)
26
+
27
+ The blog supports tags as well!
28
+
29
+ **And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
@@ -0,0 +1,25 @@
1
+ yangshun:
2
+ name: Yangshun Tay
3
+ title: Ex-Meta Staff Engineer, Co-founder GreatFrontEnd
4
+ url: https://linkedin.com/in/yangshun
5
+ image_url: https://github.com/yangshun.png
6
+ page: true
7
+ socials:
8
+ x: yangshunz
9
+ linkedin: yangshun
10
+ github: yangshun
11
+ newsletter: https://www.greatfrontend.com
12
+
13
+ slorber:
14
+ name: Sébastien Lorber
15
+ title: Docusaurus maintainer
16
+ url: https://sebastienlorber.com
17
+ image_url: https://github.com/slorber.png
18
+ page:
19
+ # customize the url of the author page at /blog/authors/<permalink>
20
+ permalink: '/all-sebastien-lorber-articles'
21
+ socials:
22
+ x: sebastienlorber
23
+ linkedin: sebastienlorber
24
+ github: slorber
25
+ newsletter: https://thisweekinreact.com
@@ -0,0 +1,19 @@
1
+ facebook:
2
+ label: Facebook
3
+ permalink: /facebook
4
+ description: Facebook tag description
5
+
6
+ hello:
7
+ label: Hello
8
+ permalink: /hello
9
+ description: Hello tag description
10
+
11
+ docusaurus:
12
+ label: Docusaurus
13
+ permalink: /docusaurus
14
+ description: Docusaurus tag description
15
+
16
+ hola:
17
+ label: Hola
18
+ permalink: /hola
19
+ description: Hola tag description
@@ -0,0 +1,138 @@
1
+ // ./docs/docusaurus.config.ts
2
+ import {themes as prismThemes} from 'prism-react-renderer';
3
+ import type {Config} from '@docusaurus/types';
4
+ import type * as Preset from '@docusaurus/preset-classic';
5
+ import path from 'path';
6
+
7
+ const config: Config = {
8
+ title: 'Synapse SDK',
9
+ tagline: 'Build ML and data processing plugins',
10
+ favicon: 'img/favicon.ico',
11
+
12
+ // Set the production url of your site here
13
+ url: 'https://www.synapse.sh',
14
+ baseUrl: '/',
15
+
16
+ organizationName: 'datamaker',
17
+ projectName: 'synapse-sdk',
18
+
19
+ onBrokenLinks: 'throw',
20
+ onBrokenMarkdownLinks: 'warn',
21
+
22
+ i18n: {
23
+ defaultLocale: 'en',
24
+ locales: ['en', 'ko'],
25
+ localeConfigs: {
26
+ en: {
27
+ label: 'English',
28
+ direction: 'ltr',
29
+ htmlLang: 'en-US',
30
+ calendar: 'gregory',
31
+ path: 'en',
32
+ },
33
+ ko: {
34
+ label: '한국어',
35
+ direction: 'ltr',
36
+ htmlLang: 'ko-KR',
37
+ calendar: 'gregory',
38
+ path: 'ko',
39
+ },
40
+ },
41
+ },
42
+
43
+ presets: [
44
+ [
45
+ 'classic',
46
+ {
47
+ docs: {
48
+ path: path.resolve(__dirname, '../../../docs/'),
49
+ sidebarPath: './sidebars.ts',
50
+ routeBasePath: '/', // Serve docs from root
51
+ },
52
+ blog: false, // Disable blog
53
+ theme: {
54
+ customCss: './src/css/custom.css',
55
+ },
56
+ } satisfies Preset.Options,
57
+ ],
58
+ ],
59
+
60
+ themeConfig: {
61
+ navbar: {
62
+ title: 'Synapse SDK',
63
+ logo: {
64
+ alt: 'Synapse SDK Logo',
65
+ src: 'img/logo.png',
66
+ },
67
+ items: [
68
+ {
69
+ type: 'docSidebar',
70
+ sidebarId: 'tutorialSidebar',
71
+ position: 'left',
72
+ label: 'Documentation',
73
+ },
74
+ {
75
+ type: 'localeDropdown',
76
+ position: 'right',
77
+ },
78
+ {
79
+ href: 'https://github.com/datamaker-kr/synapse-sdk',
80
+ label: 'GitHub',
81
+ position: 'right',
82
+ },
83
+ ],
84
+ },
85
+ footer: {
86
+ style: 'dark',
87
+ links: [
88
+ {
89
+ title: 'Docs',
90
+ items: [
91
+ {
92
+ label: 'Introduction',
93
+ to: '/',
94
+ },
95
+ {
96
+ label: 'Quickstart',
97
+ to: '/quickstart',
98
+ },
99
+ {
100
+ label: 'API Reference',
101
+ to: '/api',
102
+ },
103
+ ],
104
+ },
105
+ {
106
+ title: 'Community',
107
+ items: [
108
+ {
109
+ label: 'GitHub',
110
+ href: 'https://github.com/datamaker-kr/synapse-sdk',
111
+ },
112
+ ],
113
+ },
114
+ {
115
+ title: 'More',
116
+ items: [
117
+ {
118
+ label: 'Blog',
119
+ href: 'https://www.datamaker.io/blog',
120
+ },
121
+ {
122
+ label: 'Datamaker',
123
+ href: 'https://www.datamaker.io',
124
+ },
125
+ ],
126
+ },
127
+ ],
128
+ copyright: `Copyright © ${new Date().getFullYear()} Datamaker. Built with Docusaurus.`,
129
+ },
130
+ prism: {
131
+ theme: prismThemes.github,
132
+ darkTheme: prismThemes.dracula,
133
+ additionalLanguages: ['python', 'bash'],
134
+ },
135
+ } satisfies Preset.ThemeConfig,
136
+ };
137
+
138
+ export default config;