codeplain 0.1.0__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.
- codeplain-0.1.0/LICENSE +21 -0
- codeplain-0.1.0/PKG-INFO +142 -0
- codeplain-0.1.0/README.md +93 -0
- codeplain-0.1.0/codeplain.egg-info/PKG-INFO +142 -0
- codeplain-0.1.0/codeplain.egg-info/SOURCES.txt +54 -0
- codeplain-0.1.0/codeplain.egg-info/dependency_links.txt +1 -0
- codeplain-0.1.0/codeplain.egg-info/entry_points.txt +2 -0
- codeplain-0.1.0/codeplain.egg-info/requires.txt +34 -0
- codeplain-0.1.0/codeplain.egg-info/top_level.txt +36 -0
- codeplain-0.1.0/codeplain_REST_api.py +370 -0
- codeplain-0.1.0/config/__init__.py +2 -0
- codeplain-0.1.0/config/system_config.yaml +27 -0
- codeplain-0.1.0/file_utils.py +316 -0
- codeplain-0.1.0/git_utils.py +304 -0
- codeplain-0.1.0/hash_key.py +29 -0
- codeplain-0.1.0/plain2code.py +218 -0
- codeplain-0.1.0/plain2code_arguments.py +286 -0
- codeplain-0.1.0/plain2code_console.py +107 -0
- codeplain-0.1.0/plain2code_exceptions.py +45 -0
- codeplain-0.1.0/plain2code_nodes.py +108 -0
- codeplain-0.1.0/plain2code_read_config.py +74 -0
- codeplain-0.1.0/plain2code_state.py +75 -0
- codeplain-0.1.0/plain2code_utils.py +56 -0
- codeplain-0.1.0/plain_spec.py +360 -0
- codeplain-0.1.0/pyproject.toml +164 -0
- codeplain-0.1.0/render_machine/actions/analyze_specification_ambiguity.py +50 -0
- codeplain-0.1.0/render_machine/actions/base_action.py +19 -0
- codeplain-0.1.0/render_machine/actions/commit_conformance_tests_changes.py +46 -0
- codeplain-0.1.0/render_machine/actions/commit_implementation_code_changes.py +22 -0
- codeplain-0.1.0/render_machine/actions/create_dist.py +26 -0
- codeplain-0.1.0/render_machine/actions/exit_with_error.py +22 -0
- codeplain-0.1.0/render_machine/actions/fix_conformance_test.py +121 -0
- codeplain-0.1.0/render_machine/actions/fix_unit_tests.py +57 -0
- codeplain-0.1.0/render_machine/actions/prepare_repositories.py +50 -0
- codeplain-0.1.0/render_machine/actions/prepare_testing_environment.py +30 -0
- codeplain-0.1.0/render_machine/actions/refactor_code.py +48 -0
- codeplain-0.1.0/render_machine/actions/render_conformance_tests.py +169 -0
- codeplain-0.1.0/render_machine/actions/render_functional_requirement.py +69 -0
- codeplain-0.1.0/render_machine/actions/run_conformance_tests.py +44 -0
- codeplain-0.1.0/render_machine/actions/run_unit_tests.py +38 -0
- codeplain-0.1.0/render_machine/actions/summarize_conformance_tests.py +34 -0
- codeplain-0.1.0/render_machine/code_renderer.py +50 -0
- codeplain-0.1.0/render_machine/conformance_test_helpers.py +68 -0
- codeplain-0.1.0/render_machine/implementation_code_helpers.py +20 -0
- codeplain-0.1.0/render_machine/render_context.py +280 -0
- codeplain-0.1.0/render_machine/render_types.py +36 -0
- codeplain-0.1.0/render_machine/render_utils.py +92 -0
- codeplain-0.1.0/render_machine/state_machine_config.py +408 -0
- codeplain-0.1.0/render_machine/states.py +52 -0
- codeplain-0.1.0/render_machine/triggers.py +27 -0
- codeplain-0.1.0/setup.cfg +4 -0
- codeplain-0.1.0/standard_template_library/__init__.py +1 -0
- codeplain-0.1.0/standard_template_library/golang-console-app-template.plain +36 -0
- codeplain-0.1.0/standard_template_library/python-console-app-template.plain +32 -0
- codeplain-0.1.0/standard_template_library/typescript-react-app-template.plain +22 -0
- codeplain-0.1.0/system_config.py +49 -0
codeplain-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Codeplain.ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
codeplain-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codeplain
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Transform plain language specifications into working code
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: python-liquid2==0.3.0
|
|
16
|
+
Requires-Dist: mistletoe==1.3.0
|
|
17
|
+
Requires-Dist: langchain==1.0.8
|
|
18
|
+
Requires-Dist: langchain-core==1.2.3
|
|
19
|
+
Requires-Dist: langchain-openai==1.0.3
|
|
20
|
+
Requires-Dist: langchain-anthropic==1.1.0
|
|
21
|
+
Requires-Dist: langchain-aws==1.0.0
|
|
22
|
+
Requires-Dist: langchain-cerebras==0.8.0
|
|
23
|
+
Requires-Dist: langchain-google-genai==4.1.2
|
|
24
|
+
Requires-Dist: langchain-ollama==1.0.0
|
|
25
|
+
Requires-Dist: requests==2.32.3
|
|
26
|
+
Requires-Dist: langsmith==0.4.4
|
|
27
|
+
Requires-Dist: rich==14.2.0
|
|
28
|
+
Requires-Dist: tiktoken==0.12.0
|
|
29
|
+
Requires-Dist: PyYAML==6.0.2
|
|
30
|
+
Requires-Dist: gitpython==3.1.42
|
|
31
|
+
Requires-Dist: lizard==1.18.0
|
|
32
|
+
Requires-Dist: textual==1.0.0
|
|
33
|
+
Requires-Dist: SQLAlchemy==2.0.36
|
|
34
|
+
Requires-Dist: psycopg2==2.9.10
|
|
35
|
+
Requires-Dist: python-dotenv==1.1.0
|
|
36
|
+
Requires-Dist: transitions==0.9.3
|
|
37
|
+
Requires-Dist: cryptography==46.0.1
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest==8.3.5; extra == "dev"
|
|
40
|
+
Requires-Dist: flake8==7.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: black==24.2.0; extra == "dev"
|
|
42
|
+
Requires-Dist: isort==5.13.2; extra == "dev"
|
|
43
|
+
Requires-Dist: flake8-bugbear==24.12.12; extra == "dev"
|
|
44
|
+
Requires-Dist: flake8-unused-arguments==0.0.13; extra == "dev"
|
|
45
|
+
Requires-Dist: flake8-eradicate==1.5.0; extra == "dev"
|
|
46
|
+
Requires-Dist: pep8-naming==0.15.1; extra == "dev"
|
|
47
|
+
Requires-Dist: mypy==1.11.2; extra == "dev"
|
|
48
|
+
Dynamic: license-file
|
|
49
|
+
|
|
50
|
+
# Codeplain plain2code renderer
|
|
51
|
+
|
|
52
|
+
Render ***plain source to software code using the Codeplain API.
|
|
53
|
+
|
|
54
|
+
## Codeplain.ai - Code Generation as a Service
|
|
55
|
+
|
|
56
|
+
Codeplain is a platform that generates software code using large language models based on requirements you specify in ***plain specification language.
|
|
57
|
+
|
|
58
|
+
Schematic overview of the Codeplain's code generation service
|
|
59
|
+
|
|
60
|
+
<img src="resources/codeplain_overview.png">
|
|
61
|
+
|
|
62
|
+
### Abstracting Away Code Generation Complexity with ***plain
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
***plain is a novel specification language that helps abstracting away complexity of using large language models for code generation.
|
|
66
|
+
|
|
67
|
+
An example application in ***plain
|
|
68
|
+
|
|
69
|
+
<img src="resources/plain_example.png" width="70%" height="70%">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Getting started
|
|
73
|
+
|
|
74
|
+
### Prerequisites
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
#### System requirements
|
|
78
|
+
|
|
79
|
+
To run the plain2code client, you need Python 3.11 or a later version.
|
|
80
|
+
|
|
81
|
+
**Windows users:** Please install WSL (Windows Subsystem for Linux) as this is currently the supported environment for running plain code on Windows.
|
|
82
|
+
|
|
83
|
+
#### Authorization - Codeplain API Key
|
|
84
|
+
|
|
85
|
+
We are using Codeplain API Key to authorize requests to the Codeplain API. To get your Codeplain API Key, please contact Codeplain.ai support at support@codeplain.ai.
|
|
86
|
+
|
|
87
|
+
In order to generate code, you need to export the following environment variable:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
export CODEPLAIN_API_KEY="your_actual_api_key_here"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Installation Steps
|
|
94
|
+
|
|
95
|
+
1. Clone this repository
|
|
96
|
+
2. Set your Codeplain API key as an environment variable:
|
|
97
|
+
```
|
|
98
|
+
export CODEPLAIN_API_KEY=your_api_key_here
|
|
99
|
+
```
|
|
100
|
+
3. (Recommended) Create and activate a virtual environment:
|
|
101
|
+
```bash
|
|
102
|
+
python -m venv .venv
|
|
103
|
+
source .venv/bin/activate
|
|
104
|
+
```
|
|
105
|
+
4. Install required libraries
|
|
106
|
+
```
|
|
107
|
+
pip install -r requirements.txt
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Quick Start
|
|
111
|
+
|
|
112
|
+
After completing the installation steps above, you can immediately test the system with a simple "Hello World" example:
|
|
113
|
+
|
|
114
|
+
- Change to the example folder and run the example:
|
|
115
|
+
```
|
|
116
|
+
cd examples/example_hello_world_python
|
|
117
|
+
python ../../plain2code.py hello_world_python.plain
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
*Note: Rendering will take a few minutes to complete.*
|
|
121
|
+
|
|
122
|
+
- The system will generate a Python application in the `build` directory. You can run it with:
|
|
123
|
+
```
|
|
124
|
+
cd build
|
|
125
|
+
python hello_world.py
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Additional Resources
|
|
129
|
+
|
|
130
|
+
### Examples and Sample Projects
|
|
131
|
+
|
|
132
|
+
- See the [examples](examples) folder for sample projects in Golang, Python, and React.
|
|
133
|
+
- For example application how to implement task manager in ***plain see [example-task-manager](https://github.com/Codeplain-ai/example-task-manager) repository.
|
|
134
|
+
- For example application how to implement SaaS connectors in ***plain see [example-saas-connectors](https://github.com/Codeplain-ai/example-saas-connectors) repository.
|
|
135
|
+
|
|
136
|
+
### Documentation
|
|
137
|
+
|
|
138
|
+
- For more details on the ***plain format, see the [***plain language specification](docs/plain_language_specification.md).
|
|
139
|
+
- For step-by-step instructions for creating your first ***plain project see the [Kickstart your ***plain project](docs/starting_a_plain_project_from_scratch.md).
|
|
140
|
+
- For complete CLI documentation and usage examples, see [plain2code CLI documentation](docs/plain2code_cli.md).
|
|
141
|
+
|
|
142
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Codeplain plain2code renderer
|
|
2
|
+
|
|
3
|
+
Render ***plain source to software code using the Codeplain API.
|
|
4
|
+
|
|
5
|
+
## Codeplain.ai - Code Generation as a Service
|
|
6
|
+
|
|
7
|
+
Codeplain is a platform that generates software code using large language models based on requirements you specify in ***plain specification language.
|
|
8
|
+
|
|
9
|
+
Schematic overview of the Codeplain's code generation service
|
|
10
|
+
|
|
11
|
+
<img src="resources/codeplain_overview.png">
|
|
12
|
+
|
|
13
|
+
### Abstracting Away Code Generation Complexity with ***plain
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
***plain is a novel specification language that helps abstracting away complexity of using large language models for code generation.
|
|
17
|
+
|
|
18
|
+
An example application in ***plain
|
|
19
|
+
|
|
20
|
+
<img src="resources/plain_example.png" width="70%" height="70%">
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Getting started
|
|
24
|
+
|
|
25
|
+
### Prerequisites
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#### System requirements
|
|
29
|
+
|
|
30
|
+
To run the plain2code client, you need Python 3.11 or a later version.
|
|
31
|
+
|
|
32
|
+
**Windows users:** Please install WSL (Windows Subsystem for Linux) as this is currently the supported environment for running plain code on Windows.
|
|
33
|
+
|
|
34
|
+
#### Authorization - Codeplain API Key
|
|
35
|
+
|
|
36
|
+
We are using Codeplain API Key to authorize requests to the Codeplain API. To get your Codeplain API Key, please contact Codeplain.ai support at support@codeplain.ai.
|
|
37
|
+
|
|
38
|
+
In order to generate code, you need to export the following environment variable:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
export CODEPLAIN_API_KEY="your_actual_api_key_here"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Installation Steps
|
|
45
|
+
|
|
46
|
+
1. Clone this repository
|
|
47
|
+
2. Set your Codeplain API key as an environment variable:
|
|
48
|
+
```
|
|
49
|
+
export CODEPLAIN_API_KEY=your_api_key_here
|
|
50
|
+
```
|
|
51
|
+
3. (Recommended) Create and activate a virtual environment:
|
|
52
|
+
```bash
|
|
53
|
+
python -m venv .venv
|
|
54
|
+
source .venv/bin/activate
|
|
55
|
+
```
|
|
56
|
+
4. Install required libraries
|
|
57
|
+
```
|
|
58
|
+
pip install -r requirements.txt
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Quick Start
|
|
62
|
+
|
|
63
|
+
After completing the installation steps above, you can immediately test the system with a simple "Hello World" example:
|
|
64
|
+
|
|
65
|
+
- Change to the example folder and run the example:
|
|
66
|
+
```
|
|
67
|
+
cd examples/example_hello_world_python
|
|
68
|
+
python ../../plain2code.py hello_world_python.plain
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
*Note: Rendering will take a few minutes to complete.*
|
|
72
|
+
|
|
73
|
+
- The system will generate a Python application in the `build` directory. You can run it with:
|
|
74
|
+
```
|
|
75
|
+
cd build
|
|
76
|
+
python hello_world.py
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Additional Resources
|
|
80
|
+
|
|
81
|
+
### Examples and Sample Projects
|
|
82
|
+
|
|
83
|
+
- See the [examples](examples) folder for sample projects in Golang, Python, and React.
|
|
84
|
+
- For example application how to implement task manager in ***plain see [example-task-manager](https://github.com/Codeplain-ai/example-task-manager) repository.
|
|
85
|
+
- For example application how to implement SaaS connectors in ***plain see [example-saas-connectors](https://github.com/Codeplain-ai/example-saas-connectors) repository.
|
|
86
|
+
|
|
87
|
+
### Documentation
|
|
88
|
+
|
|
89
|
+
- For more details on the ***plain format, see the [***plain language specification](docs/plain_language_specification.md).
|
|
90
|
+
- For step-by-step instructions for creating your first ***plain project see the [Kickstart your ***plain project](docs/starting_a_plain_project_from_scratch.md).
|
|
91
|
+
- For complete CLI documentation and usage examples, see [plain2code CLI documentation](docs/plain2code_cli.md).
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codeplain
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Transform plain language specifications into working code
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: python-liquid2==0.3.0
|
|
16
|
+
Requires-Dist: mistletoe==1.3.0
|
|
17
|
+
Requires-Dist: langchain==1.0.8
|
|
18
|
+
Requires-Dist: langchain-core==1.2.3
|
|
19
|
+
Requires-Dist: langchain-openai==1.0.3
|
|
20
|
+
Requires-Dist: langchain-anthropic==1.1.0
|
|
21
|
+
Requires-Dist: langchain-aws==1.0.0
|
|
22
|
+
Requires-Dist: langchain-cerebras==0.8.0
|
|
23
|
+
Requires-Dist: langchain-google-genai==4.1.2
|
|
24
|
+
Requires-Dist: langchain-ollama==1.0.0
|
|
25
|
+
Requires-Dist: requests==2.32.3
|
|
26
|
+
Requires-Dist: langsmith==0.4.4
|
|
27
|
+
Requires-Dist: rich==14.2.0
|
|
28
|
+
Requires-Dist: tiktoken==0.12.0
|
|
29
|
+
Requires-Dist: PyYAML==6.0.2
|
|
30
|
+
Requires-Dist: gitpython==3.1.42
|
|
31
|
+
Requires-Dist: lizard==1.18.0
|
|
32
|
+
Requires-Dist: textual==1.0.0
|
|
33
|
+
Requires-Dist: SQLAlchemy==2.0.36
|
|
34
|
+
Requires-Dist: psycopg2==2.9.10
|
|
35
|
+
Requires-Dist: python-dotenv==1.1.0
|
|
36
|
+
Requires-Dist: transitions==0.9.3
|
|
37
|
+
Requires-Dist: cryptography==46.0.1
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest==8.3.5; extra == "dev"
|
|
40
|
+
Requires-Dist: flake8==7.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: black==24.2.0; extra == "dev"
|
|
42
|
+
Requires-Dist: isort==5.13.2; extra == "dev"
|
|
43
|
+
Requires-Dist: flake8-bugbear==24.12.12; extra == "dev"
|
|
44
|
+
Requires-Dist: flake8-unused-arguments==0.0.13; extra == "dev"
|
|
45
|
+
Requires-Dist: flake8-eradicate==1.5.0; extra == "dev"
|
|
46
|
+
Requires-Dist: pep8-naming==0.15.1; extra == "dev"
|
|
47
|
+
Requires-Dist: mypy==1.11.2; extra == "dev"
|
|
48
|
+
Dynamic: license-file
|
|
49
|
+
|
|
50
|
+
# Codeplain plain2code renderer
|
|
51
|
+
|
|
52
|
+
Render ***plain source to software code using the Codeplain API.
|
|
53
|
+
|
|
54
|
+
## Codeplain.ai - Code Generation as a Service
|
|
55
|
+
|
|
56
|
+
Codeplain is a platform that generates software code using large language models based on requirements you specify in ***plain specification language.
|
|
57
|
+
|
|
58
|
+
Schematic overview of the Codeplain's code generation service
|
|
59
|
+
|
|
60
|
+
<img src="resources/codeplain_overview.png">
|
|
61
|
+
|
|
62
|
+
### Abstracting Away Code Generation Complexity with ***plain
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
***plain is a novel specification language that helps abstracting away complexity of using large language models for code generation.
|
|
66
|
+
|
|
67
|
+
An example application in ***plain
|
|
68
|
+
|
|
69
|
+
<img src="resources/plain_example.png" width="70%" height="70%">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Getting started
|
|
73
|
+
|
|
74
|
+
### Prerequisites
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
#### System requirements
|
|
78
|
+
|
|
79
|
+
To run the plain2code client, you need Python 3.11 or a later version.
|
|
80
|
+
|
|
81
|
+
**Windows users:** Please install WSL (Windows Subsystem for Linux) as this is currently the supported environment for running plain code on Windows.
|
|
82
|
+
|
|
83
|
+
#### Authorization - Codeplain API Key
|
|
84
|
+
|
|
85
|
+
We are using Codeplain API Key to authorize requests to the Codeplain API. To get your Codeplain API Key, please contact Codeplain.ai support at support@codeplain.ai.
|
|
86
|
+
|
|
87
|
+
In order to generate code, you need to export the following environment variable:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
export CODEPLAIN_API_KEY="your_actual_api_key_here"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Installation Steps
|
|
94
|
+
|
|
95
|
+
1. Clone this repository
|
|
96
|
+
2. Set your Codeplain API key as an environment variable:
|
|
97
|
+
```
|
|
98
|
+
export CODEPLAIN_API_KEY=your_api_key_here
|
|
99
|
+
```
|
|
100
|
+
3. (Recommended) Create and activate a virtual environment:
|
|
101
|
+
```bash
|
|
102
|
+
python -m venv .venv
|
|
103
|
+
source .venv/bin/activate
|
|
104
|
+
```
|
|
105
|
+
4. Install required libraries
|
|
106
|
+
```
|
|
107
|
+
pip install -r requirements.txt
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Quick Start
|
|
111
|
+
|
|
112
|
+
After completing the installation steps above, you can immediately test the system with a simple "Hello World" example:
|
|
113
|
+
|
|
114
|
+
- Change to the example folder and run the example:
|
|
115
|
+
```
|
|
116
|
+
cd examples/example_hello_world_python
|
|
117
|
+
python ../../plain2code.py hello_world_python.plain
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
*Note: Rendering will take a few minutes to complete.*
|
|
121
|
+
|
|
122
|
+
- The system will generate a Python application in the `build` directory. You can run it with:
|
|
123
|
+
```
|
|
124
|
+
cd build
|
|
125
|
+
python hello_world.py
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Additional Resources
|
|
129
|
+
|
|
130
|
+
### Examples and Sample Projects
|
|
131
|
+
|
|
132
|
+
- See the [examples](examples) folder for sample projects in Golang, Python, and React.
|
|
133
|
+
- For example application how to implement task manager in ***plain see [example-task-manager](https://github.com/Codeplain-ai/example-task-manager) repository.
|
|
134
|
+
- For example application how to implement SaaS connectors in ***plain see [example-saas-connectors](https://github.com/Codeplain-ai/example-saas-connectors) repository.
|
|
135
|
+
|
|
136
|
+
### Documentation
|
|
137
|
+
|
|
138
|
+
- For more details on the ***plain format, see the [***plain language specification](docs/plain_language_specification.md).
|
|
139
|
+
- For step-by-step instructions for creating your first ***plain project see the [Kickstart your ***plain project](docs/starting_a_plain_project_from_scratch.md).
|
|
140
|
+
- For complete CLI documentation and usage examples, see [plain2code CLI documentation](docs/plain2code_cli.md).
|
|
141
|
+
|
|
142
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
codeplain_REST_api.py
|
|
4
|
+
file_utils.py
|
|
5
|
+
git_utils.py
|
|
6
|
+
hash_key.py
|
|
7
|
+
plain2code.py
|
|
8
|
+
plain2code_arguments.py
|
|
9
|
+
plain2code_console.py
|
|
10
|
+
plain2code_exceptions.py
|
|
11
|
+
plain2code_nodes.py
|
|
12
|
+
plain2code_read_config.py
|
|
13
|
+
plain2code_state.py
|
|
14
|
+
plain2code_utils.py
|
|
15
|
+
plain_spec.py
|
|
16
|
+
pyproject.toml
|
|
17
|
+
system_config.py
|
|
18
|
+
codeplain.egg-info/PKG-INFO
|
|
19
|
+
codeplain.egg-info/SOURCES.txt
|
|
20
|
+
codeplain.egg-info/dependency_links.txt
|
|
21
|
+
codeplain.egg-info/entry_points.txt
|
|
22
|
+
codeplain.egg-info/requires.txt
|
|
23
|
+
codeplain.egg-info/top_level.txt
|
|
24
|
+
config/__init__.py
|
|
25
|
+
config/system_config.yaml
|
|
26
|
+
render_machine/code_renderer.py
|
|
27
|
+
render_machine/conformance_test_helpers.py
|
|
28
|
+
render_machine/implementation_code_helpers.py
|
|
29
|
+
render_machine/render_context.py
|
|
30
|
+
render_machine/render_types.py
|
|
31
|
+
render_machine/render_utils.py
|
|
32
|
+
render_machine/state_machine_config.py
|
|
33
|
+
render_machine/states.py
|
|
34
|
+
render_machine/triggers.py
|
|
35
|
+
render_machine/actions/analyze_specification_ambiguity.py
|
|
36
|
+
render_machine/actions/base_action.py
|
|
37
|
+
render_machine/actions/commit_conformance_tests_changes.py
|
|
38
|
+
render_machine/actions/commit_implementation_code_changes.py
|
|
39
|
+
render_machine/actions/create_dist.py
|
|
40
|
+
render_machine/actions/exit_with_error.py
|
|
41
|
+
render_machine/actions/fix_conformance_test.py
|
|
42
|
+
render_machine/actions/fix_unit_tests.py
|
|
43
|
+
render_machine/actions/prepare_repositories.py
|
|
44
|
+
render_machine/actions/prepare_testing_environment.py
|
|
45
|
+
render_machine/actions/refactor_code.py
|
|
46
|
+
render_machine/actions/render_conformance_tests.py
|
|
47
|
+
render_machine/actions/render_functional_requirement.py
|
|
48
|
+
render_machine/actions/run_conformance_tests.py
|
|
49
|
+
render_machine/actions/run_unit_tests.py
|
|
50
|
+
render_machine/actions/summarize_conformance_tests.py
|
|
51
|
+
standard_template_library/__init__.py
|
|
52
|
+
standard_template_library/golang-console-app-template.plain
|
|
53
|
+
standard_template_library/python-console-app-template.plain
|
|
54
|
+
standard_template_library/typescript-react-app-template.plain
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
python-liquid2==0.3.0
|
|
2
|
+
mistletoe==1.3.0
|
|
3
|
+
langchain==1.0.8
|
|
4
|
+
langchain-core==1.2.3
|
|
5
|
+
langchain-openai==1.0.3
|
|
6
|
+
langchain-anthropic==1.1.0
|
|
7
|
+
langchain-aws==1.0.0
|
|
8
|
+
langchain-cerebras==0.8.0
|
|
9
|
+
langchain-google-genai==4.1.2
|
|
10
|
+
langchain-ollama==1.0.0
|
|
11
|
+
requests==2.32.3
|
|
12
|
+
langsmith==0.4.4
|
|
13
|
+
rich==14.2.0
|
|
14
|
+
tiktoken==0.12.0
|
|
15
|
+
PyYAML==6.0.2
|
|
16
|
+
gitpython==3.1.42
|
|
17
|
+
lizard==1.18.0
|
|
18
|
+
textual==1.0.0
|
|
19
|
+
SQLAlchemy==2.0.36
|
|
20
|
+
psycopg2==2.9.10
|
|
21
|
+
python-dotenv==1.1.0
|
|
22
|
+
transitions==0.9.3
|
|
23
|
+
cryptography==46.0.1
|
|
24
|
+
|
|
25
|
+
[dev]
|
|
26
|
+
pytest==8.3.5
|
|
27
|
+
flake8==7.0.0
|
|
28
|
+
black==24.2.0
|
|
29
|
+
isort==5.13.2
|
|
30
|
+
flake8-bugbear==24.12.12
|
|
31
|
+
flake8-unused-arguments==0.0.13
|
|
32
|
+
flake8-eradicate==1.5.0
|
|
33
|
+
pep8-naming==0.15.1
|
|
34
|
+
mypy==1.11.2
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
code_complexity
|
|
2
|
+
codeplain
|
|
3
|
+
codeplain_REST_api
|
|
4
|
+
codeplain_constants
|
|
5
|
+
codeplain_local_api
|
|
6
|
+
codeplain_models
|
|
7
|
+
codeplain_types
|
|
8
|
+
codeplain_utils
|
|
9
|
+
config
|
|
10
|
+
content_extractor
|
|
11
|
+
event_bus
|
|
12
|
+
file_utils
|
|
13
|
+
git_utils
|
|
14
|
+
hash_key
|
|
15
|
+
llm
|
|
16
|
+
llm_exceptions
|
|
17
|
+
llm_handler
|
|
18
|
+
llm_selector
|
|
19
|
+
plain2code
|
|
20
|
+
plain2code_arguments
|
|
21
|
+
plain2code_console
|
|
22
|
+
plain2code_events
|
|
23
|
+
plain2code_exceptions
|
|
24
|
+
plain2code_nodes
|
|
25
|
+
plain2code_read_config
|
|
26
|
+
plain2code_state
|
|
27
|
+
plain2code_tui
|
|
28
|
+
plain2code_utils
|
|
29
|
+
plain_file
|
|
30
|
+
plain_spec
|
|
31
|
+
render_cache
|
|
32
|
+
render_machine
|
|
33
|
+
spinner
|
|
34
|
+
standard_template_library
|
|
35
|
+
system_config
|
|
36
|
+
tui_components
|