framework-m-studio 0.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.
- framework_m_studio-0.2.2/.gitignore +107 -0
- framework_m_studio-0.2.2/CHANGELOG.md +28 -0
- framework_m_studio-0.2.2/PKG-INFO +65 -0
- framework_m_studio-0.2.2/README.md +41 -0
- framework_m_studio-0.2.2/docs/api/index.md +3 -0
- framework_m_studio-0.2.2/docs/user-guide.md +75 -0
- framework_m_studio-0.2.2/pyproject.toml +138 -0
- framework_m_studio-0.2.2/src/framework_m_studio/__init__.py +16 -0
- framework_m_studio-0.2.2/src/framework_m_studio/app.py +283 -0
- framework_m_studio-0.2.2/src/framework_m_studio/cli.py +247 -0
- framework_m_studio-0.2.2/src/framework_m_studio/codegen/__init__.py +34 -0
- framework_m_studio-0.2.2/src/framework_m_studio/codegen/generator.py +291 -0
- framework_m_studio-0.2.2/src/framework_m_studio/codegen/parser.py +545 -0
- framework_m_studio-0.2.2/src/framework_m_studio/codegen/templates/doctype.py.jinja2 +69 -0
- framework_m_studio-0.2.2/src/framework_m_studio/codegen/templates/test_doctype.py.jinja2 +58 -0
- framework_m_studio-0.2.2/src/framework_m_studio/codegen/test_generator.py +368 -0
- framework_m_studio-0.2.2/src/framework_m_studio/codegen/transformer.py +406 -0
- framework_m_studio-0.2.2/src/framework_m_studio/discovery.py +193 -0
- framework_m_studio-0.2.2/src/framework_m_studio/docs_generator.py +318 -0
- framework_m_studio-0.2.2/src/framework_m_studio/git/__init__.py +1 -0
- framework_m_studio-0.2.2/src/framework_m_studio/git/adapter.py +309 -0
- framework_m_studio-0.2.2/src/framework_m_studio/git/github_provider.py +321 -0
- framework_m_studio-0.2.2/src/framework_m_studio/git/protocol.py +249 -0
- framework_m_studio-0.2.2/src/framework_m_studio/py.typed +0 -0
- framework_m_studio-0.2.2/src/framework_m_studio/routes.py +552 -0
- framework_m_studio-0.2.2/src/framework_m_studio/sdk_generator.py +239 -0
- framework_m_studio-0.2.2/src/framework_m_studio/workspace.py +295 -0
- framework_m_studio-0.2.2/studio_ui/.gitignore +30 -0
- framework_m_studio-0.2.2/studio_ui/.npmrc +2 -0
- framework_m_studio-0.2.2/studio_ui/Dockerfile +37 -0
- framework_m_studio-0.2.2/studio_ui/README.MD +47 -0
- framework_m_studio-0.2.2/studio_ui/eslint.config.js +28 -0
- framework_m_studio-0.2.2/studio_ui/index.html +39 -0
- framework_m_studio-0.2.2/studio_ui/package.json +80 -0
- framework_m_studio-0.2.2/studio_ui/pnpm-lock.yaml +7152 -0
- framework_m_studio-0.2.2/studio_ui/public/favicon.ico +0 -0
- framework_m_studio-0.2.2/studio_ui/src/App.css +21 -0
- framework_m_studio-0.2.2/studio_ui/src/App.test.tsx +16 -0
- framework_m_studio-0.2.2/studio_ui/src/App.tsx +78 -0
- framework_m_studio-0.2.2/studio_ui/src/components/AutoForm.tsx +224 -0
- framework_m_studio-0.2.2/studio_ui/src/components/AutoTable.tsx +258 -0
- framework_m_studio-0.2.2/studio_ui/src/components/CodePreview.tsx +275 -0
- framework_m_studio-0.2.2/studio_ui/src/components/ControllerEditor.tsx +307 -0
- framework_m_studio-0.2.2/studio_ui/src/components/ERDView.tsx +205 -0
- framework_m_studio-0.2.2/studio_ui/src/components/FieldEditor.tsx +433 -0
- framework_m_studio-0.2.2/studio_ui/src/components/LayoutDesigner.tsx +379 -0
- framework_m_studio-0.2.2/studio_ui/src/components/ModuleExplorer.tsx +312 -0
- framework_m_studio-0.2.2/studio_ui/src/components/NestedEditorDrawer.tsx +165 -0
- framework_m_studio-0.2.2/studio_ui/src/components/SandboxPreview.tsx +340 -0
- framework_m_studio-0.2.2/studio_ui/src/components/TableFieldEditor.tsx +281 -0
- framework_m_studio-0.2.2/studio_ui/src/components/breadcrumb/index.tsx +46 -0
- framework_m_studio-0.2.2/studio_ui/src/components/fields/DefaultFieldComponents.tsx +209 -0
- framework_m_studio-0.2.2/studio_ui/src/components/fields/index.ts +23 -0
- framework_m_studio-0.2.2/studio_ui/src/components/fields/resolveFieldComponent.ts +37 -0
- framework_m_studio-0.2.2/studio_ui/src/components/layout/index.tsx +80 -0
- framework_m_studio-0.2.2/studio_ui/src/components/menu/index.tsx +57 -0
- framework_m_studio-0.2.2/studio_ui/src/index.css +102 -0
- framework_m_studio-0.2.2/studio_ui/src/index.tsx +14 -0
- framework_m_studio-0.2.2/studio_ui/src/pages/doctypes/edit.tsx +606 -0
- framework_m_studio-0.2.2/studio_ui/src/pages/doctypes/index.ts +6 -0
- framework_m_studio-0.2.2/studio_ui/src/pages/doctypes/list.tsx +363 -0
- framework_m_studio-0.2.2/studio_ui/src/pages/index.ts +5 -0
- framework_m_studio-0.2.2/studio_ui/src/providers/ThemeContext.ts +15 -0
- framework_m_studio-0.2.2/studio_ui/src/providers/constants.ts +34 -0
- framework_m_studio-0.2.2/studio_ui/src/providers/data.ts +103 -0
- framework_m_studio-0.2.2/studio_ui/src/providers/theme.tsx +60 -0
- framework_m_studio-0.2.2/studio_ui/src/providers/useTheme.ts +16 -0
- framework_m_studio-0.2.2/studio_ui/src/registry/defaultComponents.ts +34 -0
- framework_m_studio-0.2.2/studio_ui/src/registry/fieldComponents.ts +133 -0
- framework_m_studio-0.2.2/studio_ui/src/registry/index.ts +14 -0
- framework_m_studio-0.2.2/studio_ui/src/setupTests.ts +15 -0
- framework_m_studio-0.2.2/studio_ui/src/utils/mockDataGenerator.ts +193 -0
- framework_m_studio-0.2.2/studio_ui/src/vite-env.d.ts +1 -0
- framework_m_studio-0.2.2/studio_ui/tsconfig.json +21 -0
- framework_m_studio-0.2.2/studio_ui/tsconfig.node.json +21 -0
- framework_m_studio-0.2.2/studio_ui/vite.config.ts +20 -0
- framework_m_studio-0.2.2/studio_ui/vitest.config.ts +13 -0
- framework_m_studio-0.2.2/tests/__init__.py +1 -0
- framework_m_studio-0.2.2/tests/conftest.py +17 -0
- framework_m_studio-0.2.2/tests/test_api_routes.py +53 -0
- framework_m_studio-0.2.2/tests/test_cli.py +159 -0
- framework_m_studio-0.2.2/tests/test_discovery.py +212 -0
- framework_m_studio-0.2.2/tests/test_docs_generator.py +236 -0
- framework_m_studio-0.2.2/tests/test_generator.py +185 -0
- framework_m_studio-0.2.2/tests/test_git_adapter.py +365 -0
- framework_m_studio-0.2.2/tests/test_git_protocol.py +156 -0
- framework_m_studio-0.2.2/tests/test_github_provider.py +243 -0
- framework_m_studio-0.2.2/tests/test_parser.py +203 -0
- framework_m_studio-0.2.2/tests/test_sdk_generator.py +172 -0
- framework_m_studio-0.2.2/tests/test_transformer.py +176 -0
- framework_m_studio-0.2.2/tests/test_workspace.py +297 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
.history/
|
|
23
|
+
# static/ - removed generic ignore, specific ignores added below
|
|
24
|
+
|
|
25
|
+
# Virtual environments
|
|
26
|
+
.venv/
|
|
27
|
+
venv/
|
|
28
|
+
ENV/
|
|
29
|
+
env/
|
|
30
|
+
|
|
31
|
+
# UV
|
|
32
|
+
.uv/
|
|
33
|
+
uv.lock
|
|
34
|
+
|
|
35
|
+
# IDE
|
|
36
|
+
.idea/
|
|
37
|
+
.vscode/
|
|
38
|
+
*.swp
|
|
39
|
+
*.swo
|
|
40
|
+
*~
|
|
41
|
+
|
|
42
|
+
# Testing
|
|
43
|
+
.pytest_cache/
|
|
44
|
+
.coverage
|
|
45
|
+
htmlcov/
|
|
46
|
+
.tox/
|
|
47
|
+
.nox/
|
|
48
|
+
coverage.xml
|
|
49
|
+
|
|
50
|
+
# Type checking
|
|
51
|
+
.mypy_cache/
|
|
52
|
+
.dmypy.json
|
|
53
|
+
dmypy.json
|
|
54
|
+
|
|
55
|
+
# Ruff
|
|
56
|
+
.ruff_cache/
|
|
57
|
+
|
|
58
|
+
# OS
|
|
59
|
+
.DS_Store
|
|
60
|
+
Thumbs.db
|
|
61
|
+
|
|
62
|
+
# Logs
|
|
63
|
+
*.log
|
|
64
|
+
|
|
65
|
+
# Local config
|
|
66
|
+
.env
|
|
67
|
+
.env.local
|
|
68
|
+
|
|
69
|
+
# Docker
|
|
70
|
+
docker-compose.override.yml
|
|
71
|
+
|
|
72
|
+
# SQLite databases
|
|
73
|
+
*.db
|
|
74
|
+
*.sqlite
|
|
75
|
+
*.sqlite3
|
|
76
|
+
|
|
77
|
+
# Studio UI built assets
|
|
78
|
+
apps/studio/src/framework_m_studio/static/
|
|
79
|
+
|
|
80
|
+
#doctypes
|
|
81
|
+
doctypes/*.py
|
|
82
|
+
apps/studio/src/doctypes/*.py
|
|
83
|
+
|
|
84
|
+
# Node.js / Frontend
|
|
85
|
+
node_modules/
|
|
86
|
+
.pnpm-store/
|
|
87
|
+
*.tsbuildinfo
|
|
88
|
+
|
|
89
|
+
# Frontend build outputs
|
|
90
|
+
frontend/dist/
|
|
91
|
+
frontend/.vite/
|
|
92
|
+
apps/*/studio_ui/dist/
|
|
93
|
+
apps/*/studio_ui/.vite/
|
|
94
|
+
frontend/playwright-report
|
|
95
|
+
frontend/test-results
|
|
96
|
+
apps/studio/studio_ui/node_modules/
|
|
97
|
+
|
|
98
|
+
# Logs
|
|
99
|
+
npm-debug.log*
|
|
100
|
+
pnpm-debug.log*
|
|
101
|
+
yarn-debug.log*
|
|
102
|
+
yarn-error.log*
|
|
103
|
+
|
|
104
|
+
# Editor directories
|
|
105
|
+
.idea/
|
|
106
|
+
*.sublime-project
|
|
107
|
+
*.sublime-workspace
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## framework-m-studio v0.2.2
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- add badges to readme (012333b)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## framework-m-studio v0.2.1
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- modernize aesthetics (300cdda)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## framework-m-studio 0.2.0
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- implement path prefix architecture for UI/API separation (7a8d2d2)
|
|
22
|
+
- add cloud workspace & git adapter, controller scaffolding and sandbox (a7a4a3e)
|
|
23
|
+
- implement Studio backend and frontend (abf5d03)
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
- include static files in package for PyPI publishing (565bcb8)
|
|
28
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: framework-m-studio
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: Framework M Studio - Visual DocType Builder & Developer Tools
|
|
5
|
+
Project-URL: Homepage, https://gitlab.com/castlecraft/framework-m
|
|
6
|
+
Project-URL: Documentation, https://gitlab.com/castlecraft/framework-m#readme
|
|
7
|
+
Project-URL: Repository, https://gitlab.com/castlecraft/framework-m
|
|
8
|
+
Author: Framework M Contributors
|
|
9
|
+
License: MIT
|
|
10
|
+
Keywords: codegen,developer-tools,doctype,framework,studio
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Framework :: AsyncIO
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.12
|
|
20
|
+
Requires-Dist: framework-m
|
|
21
|
+
Requires-Dist: jinja2>=3.1.0
|
|
22
|
+
Requires-Dist: libcst>=1.0.0
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# Framework M Studio
|
|
26
|
+
|
|
27
|
+
Visual DocType builder and developer tools for Framework M.
|
|
28
|
+
|
|
29
|
+
[](https://badge.fury.io/py/framework-m-studio)
|
|
30
|
+
[](https://gitlab.com/castlecraft/framework-m/-/pipelines)
|
|
31
|
+
|
|
32
|
+
## Overview
|
|
33
|
+
|
|
34
|
+
`framework-m-studio` provides development-time tools that are NOT included in the production runtime:
|
|
35
|
+
|
|
36
|
+
- **Studio UI**: Visual DocType builder (React + Vite)
|
|
37
|
+
- **Code Generators**: LibCST-based Python code generation
|
|
38
|
+
- **DevTools CLI**: `m codegen`, `m docs:generate`
|
|
39
|
+
|
|
40
|
+
> **Note:** Studio is for developers to build DocTypes. The **Desk** (end-user data management UI) is a separate frontend that connects to the Framework M backend.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Add to your project's dev dependencies
|
|
46
|
+
uv add --dev framework-m-studio
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Start Studio UI
|
|
53
|
+
m studio
|
|
54
|
+
|
|
55
|
+
# Generate TypeScript client from OpenAPI
|
|
56
|
+
m codegen client --lang ts --out ./frontend/src/api
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Development
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd apps/studio
|
|
63
|
+
uv sync
|
|
64
|
+
uv run pytest
|
|
65
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Framework M Studio
|
|
2
|
+
|
|
3
|
+
Visual DocType builder and developer tools for Framework M.
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/py/framework-m-studio)
|
|
6
|
+
[](https://gitlab.com/castlecraft/framework-m/-/pipelines)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
`framework-m-studio` provides development-time tools that are NOT included in the production runtime:
|
|
11
|
+
|
|
12
|
+
- **Studio UI**: Visual DocType builder (React + Vite)
|
|
13
|
+
- **Code Generators**: LibCST-based Python code generation
|
|
14
|
+
- **DevTools CLI**: `m codegen`, `m docs:generate`
|
|
15
|
+
|
|
16
|
+
> **Note:** Studio is for developers to build DocTypes. The **Desk** (end-user data management UI) is a separate frontend that connects to the Framework M backend.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Add to your project's dev dependencies
|
|
22
|
+
uv add --dev framework-m-studio
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Start Studio UI
|
|
29
|
+
m studio
|
|
30
|
+
|
|
31
|
+
# Generate TypeScript client from OpenAPI
|
|
32
|
+
m codegen client --lang ts --out ./frontend/src/api
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Development
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd apps/studio
|
|
39
|
+
uv sync
|
|
40
|
+
uv run pytest
|
|
41
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Studio User Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Framework-M Studio is a visual development environment for creating and managing DocTypes.
|
|
6
|
+
|
|
7
|
+
## Starting Studio
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Start Studio server
|
|
11
|
+
uv run m studio
|
|
12
|
+
|
|
13
|
+
# Or with a specific port
|
|
14
|
+
uv run m studio --port 8000
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Then open http://localhost:8000/studio in your browser.
|
|
18
|
+
|
|
19
|
+
## Creating a DocType
|
|
20
|
+
|
|
21
|
+
1. **Navigate to DocTypes** - Click "DocTypes" in the sidebar
|
|
22
|
+
2. **Click "Create"** - Opens the DocType editor
|
|
23
|
+
3. **Enter Name** - Use PascalCase (e.g., `SalesOrder`)
|
|
24
|
+
4. **Add Fields** - Click "Add Field" and configure each field
|
|
25
|
+
5. **Save** - Click "Save" to generate the Python file
|
|
26
|
+
|
|
27
|
+
## Adding Fields
|
|
28
|
+
|
|
29
|
+
Each field has:
|
|
30
|
+
- **Name** - Python identifier (snake_case)
|
|
31
|
+
- **Type** - Select from: Text, Integer, Float, Boolean, Date, etc.
|
|
32
|
+
- **Required** - Whether the field is mandatory
|
|
33
|
+
- **Default** - Optional default value
|
|
34
|
+
- **Validators** - Min/max length, pattern, min/max value
|
|
35
|
+
|
|
36
|
+
## Configuring Permissions
|
|
37
|
+
|
|
38
|
+
Permissions are defined in the DocType's Config class:
|
|
39
|
+
- Enable in the Properties panel
|
|
40
|
+
- Set `is_submittable = True` for workflow-enabled docs
|
|
41
|
+
|
|
42
|
+
## Using Git Mode
|
|
43
|
+
|
|
44
|
+
**Viewing Status:**
|
|
45
|
+
1. Click the Git icon in the sidebar
|
|
46
|
+
2. See current branch, modified files, and commit history
|
|
47
|
+
|
|
48
|
+
**Committing Changes:**
|
|
49
|
+
1. Make changes to DocTypes
|
|
50
|
+
2. Open Git panel
|
|
51
|
+
3. Enter commit message
|
|
52
|
+
4. Click "Commit"
|
|
53
|
+
|
|
54
|
+
**Pushing to Remote:**
|
|
55
|
+
1. Commit your changes first
|
|
56
|
+
2. Click "Push" to upload to GitHub
|
|
57
|
+
|
|
58
|
+
## Sandbox Mode
|
|
59
|
+
|
|
60
|
+
Test DocTypes without saving:
|
|
61
|
+
1. Open a DocType
|
|
62
|
+
2. Switch to "Sandbox" tab
|
|
63
|
+
3. Use auto-generated mock data
|
|
64
|
+
4. Test CRUD operations
|
|
65
|
+
5. Verify validation rules
|
|
66
|
+
|
|
67
|
+
## Controller Hooks
|
|
68
|
+
|
|
69
|
+
Available lifecycle hooks:
|
|
70
|
+
- `validate` - Before save validation
|
|
71
|
+
- `before_save` - Pre-persistence logic
|
|
72
|
+
- `after_save` - Post-save side effects
|
|
73
|
+
- `before_delete` - Pre-delete cleanup
|
|
74
|
+
|
|
75
|
+
Edit in the "Controller" tab.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "framework-m-studio"
|
|
3
|
+
version = "0.2.2"
|
|
4
|
+
description = "Framework M Studio - Visual DocType Builder & Developer Tools"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = { text = "MIT" }
|
|
7
|
+
requires-python = ">=3.12"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Framework M Contributors" }
|
|
10
|
+
]
|
|
11
|
+
keywords = ["framework", "studio", "doctype", "codegen", "developer-tools"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 3 - Alpha",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Programming Language :: Python :: 3.13",
|
|
19
|
+
"Framework :: AsyncIO",
|
|
20
|
+
"Typing :: Typed",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
dependencies = [
|
|
24
|
+
"framework-m",
|
|
25
|
+
# Code generation
|
|
26
|
+
"libcst>=1.0.0",
|
|
27
|
+
"jinja2>=3.1.0",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[dependency-groups]
|
|
31
|
+
dev = [
|
|
32
|
+
"pytest>=8.0.0",
|
|
33
|
+
"pytest-asyncio>=0.23.0",
|
|
34
|
+
"pytest-cov>=4.1.0",
|
|
35
|
+
"mypy>=1.8.0",
|
|
36
|
+
"ruff>=0.3.0",
|
|
37
|
+
"httpx>=0.27.0",
|
|
38
|
+
# Release tools
|
|
39
|
+
"python-semantic-release>=9.0.0",
|
|
40
|
+
"build>=1.0.0",
|
|
41
|
+
"twine>=5.0.0",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.entry-points."framework_m.cli_commands"]
|
|
45
|
+
# These commands override/extend base CLI when framework-m-studio is installed
|
|
46
|
+
codegen = "framework_m_studio.cli:codegen_app"
|
|
47
|
+
studio = "framework_m_studio.cli:studio_app"
|
|
48
|
+
docs = "framework_m_studio.cli:docs_app"
|
|
49
|
+
|
|
50
|
+
[project.urls]
|
|
51
|
+
Homepage = "https://gitlab.com/castlecraft/framework-m"
|
|
52
|
+
Documentation = "https://gitlab.com/castlecraft/framework-m#readme"
|
|
53
|
+
Repository = "https://gitlab.com/castlecraft/framework-m"
|
|
54
|
+
|
|
55
|
+
[build-system]
|
|
56
|
+
requires = ["hatchling"]
|
|
57
|
+
build-backend = "hatchling.build"
|
|
58
|
+
|
|
59
|
+
[tool.hatch.build.targets.sdist]
|
|
60
|
+
exclude = [
|
|
61
|
+
".venv",
|
|
62
|
+
".pytest_cache",
|
|
63
|
+
".mypy_cache",
|
|
64
|
+
".ruff_cache",
|
|
65
|
+
"__pycache__",
|
|
66
|
+
"studio_ui/node_modules",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[tool.hatch.build.targets.wheel]
|
|
70
|
+
packages = ["src/framework_m_studio"]
|
|
71
|
+
# static/ is included automatically since it's under src/framework_m_studio/
|
|
72
|
+
|
|
73
|
+
[tool.pytest.ini_options]
|
|
74
|
+
asyncio_mode = "auto"
|
|
75
|
+
testpaths = ["tests"]
|
|
76
|
+
addopts = "-v --tb=short"
|
|
77
|
+
|
|
78
|
+
[tool.coverage.run]
|
|
79
|
+
source = ["src/framework_m_studio"]
|
|
80
|
+
branch = true
|
|
81
|
+
|
|
82
|
+
[tool.mypy]
|
|
83
|
+
python_version = "3.12"
|
|
84
|
+
strict = true
|
|
85
|
+
warn_return_any = true
|
|
86
|
+
warn_unused_ignores = true
|
|
87
|
+
disallow_untyped_defs = true
|
|
88
|
+
mypy_path = "src"
|
|
89
|
+
explicit_package_bases = true
|
|
90
|
+
exclude = [
|
|
91
|
+
"tests/",
|
|
92
|
+
".venv/",
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[[tool.mypy.overrides]]
|
|
96
|
+
module = "framework_m.core.fields.registry"
|
|
97
|
+
ignore_missing_imports = true
|
|
98
|
+
|
|
99
|
+
[tool.ruff]
|
|
100
|
+
line-length = 88
|
|
101
|
+
target-version = "py312"
|
|
102
|
+
|
|
103
|
+
[tool.ruff.lint]
|
|
104
|
+
select = ["E", "F", "I", "UP", "B", "SIM", "C4", "PTH", "RUF"]
|
|
105
|
+
ignore = ["E501", "B008"]
|
|
106
|
+
|
|
107
|
+
[tool.ruff.format]
|
|
108
|
+
quote-style = "double"
|
|
109
|
+
indent-style = "space"
|
|
110
|
+
|
|
111
|
+
[tool.ruff.lint.isort]
|
|
112
|
+
known-first-party = ["framework_m_studio", "framework_m"]
|
|
113
|
+
|
|
114
|
+
# =============================================================================
|
|
115
|
+
# Semantic Release Configuration
|
|
116
|
+
# =============================================================================
|
|
117
|
+
|
|
118
|
+
[tool.semantic_release]
|
|
119
|
+
version_toml = ["pyproject.toml:project.version"]
|
|
120
|
+
branch = "main"
|
|
121
|
+
tag_format = "studio-v{version}"
|
|
122
|
+
major_on_zero = false # Keep 0.x.y versions (breaking changes bump minor, not major)
|
|
123
|
+
build_command = """
|
|
124
|
+
python -m build --sdist --wheel --outdir dist/
|
|
125
|
+
git add pyproject.toml CHANGELOG.md
|
|
126
|
+
"""
|
|
127
|
+
commit_message = "chore(release): framework-m-studio v{version}"
|
|
128
|
+
|
|
129
|
+
[tool.semantic_release.changelog]
|
|
130
|
+
changelog_file = "CHANGELOG.md"
|
|
131
|
+
|
|
132
|
+
[tool.semantic_release.remote]
|
|
133
|
+
type = "gitlab"
|
|
134
|
+
token = { env = "GITLAB_TOKEN" }
|
|
135
|
+
|
|
136
|
+
[tool.semantic_release.publish]
|
|
137
|
+
upload_to_vcs_release = true
|
|
138
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Framework M Studio - Visual DocType Builder & Developer Tools.
|
|
2
|
+
|
|
3
|
+
This package provides development-time tools for Framework M:
|
|
4
|
+
- Visual DocType builder (Studio UI)
|
|
5
|
+
- LibCST-based code generators
|
|
6
|
+
- Extended CLI commands (codegen, docs)
|
|
7
|
+
|
|
8
|
+
This package is separated from framework-m core to keep the
|
|
9
|
+
runtime lightweight. Install as a dev dependency.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
__version__ = "0.1.0"
|
|
15
|
+
|
|
16
|
+
__all__ = ["__version__"]
|