|
1 | 1 | # Codeplain plain2code renderer |
2 | 2 |
|
3 | | -Render ***plain source to software code using the Codeplain API. |
| 3 | +Render \*\*\*plain source to software code using the Codeplain API. |
4 | 4 |
|
5 | 5 | ## Codeplain.ai - Code Generation as a Service |
6 | 6 |
|
7 | | -Codeplain is a platform that generates software code using large language models based on requirements you specify in ***plain specification language. |
| 7 | +Codeplain is a platform that generates software code using large language models based on requirements you specify in \*\*\*plain specification language. |
8 | 8 |
|
9 | 9 | Schematic overview of the Codeplain's code generation service |
10 | 10 |
|
11 | 11 | <img src="https://raw.githubusercontent.com/Codeplain-ai/plain2code_client/main/resources/codeplain_overview.png"> |
12 | 12 |
|
13 | | -### Abstracting Away Code Generation Complexity with ***plain |
| 13 | +### Abstracting Away Code Generation Complexity with \*\*\*plain |
14 | 14 |
|
| 15 | +\*\*\*plain is a novel specification language that helps abstracting away complexity of using large language models for code generation. |
15 | 16 |
|
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 |
| 17 | +An example application in \*\*\*plain |
19 | 18 |
|
20 | 19 | <img src="resources/plain_example.png" width="70%" height="70%"> |
21 | 20 |
|
22 | | - |
23 | 21 | ## Getting started |
24 | 22 |
|
25 | 23 | ### Prerequisites |
26 | 24 |
|
27 | | - |
28 | 25 | #### System requirements |
29 | 26 |
|
30 | 27 | To run the plain2code client, you need Python 3.11 or a later version. |
@@ -63,31 +60,55 @@ export CODEPLAIN_API_KEY="your_actual_api_key_here" |
63 | 60 | After completing the installation steps above, you can immediately test the system with a simple "Hello World" example: |
64 | 61 |
|
65 | 62 | - 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 | 63 |
|
71 | | - *Note: Rendering will take a few minutes to complete.* |
| 64 | + ``` |
| 65 | + cd examples/example_hello_world_python |
| 66 | + python ../../plain2code.py hello_world_python.plain |
| 67 | + ``` |
| 68 | + |
| 69 | + _Note: Rendering will take a few minutes to complete._ |
72 | 70 |
|
73 | 71 | - The system will generate a Python application in the `build` directory. You can run it with: |
| 72 | + ``` |
| 73 | + cd build |
| 74 | + python hello_world.py |
| 75 | + ``` |
| 76 | + |
| 77 | +## Releasing |
| 78 | + |
| 79 | +Releases are built and published with [uv](https://docs.astral.sh/uv/). The version is read from `_version.py`. |
| 80 | + |
| 81 | +1. Bump the version in `_version.py` and commit/tag (`git tag v<version>`). |
| 82 | +2. Build the distributions: |
| 83 | + ```bash |
| 84 | + uv build --python 3.11 |
| 85 | + ``` |
| 86 | + This produces `dist/codeplain-<version>-py3-none-any.whl` and `dist/codeplain-<version>.tar.gz`. |
| 87 | +3. (Optional) Smoke-test the wheel: |
| 88 | + ```bash |
| 89 | + uv run --with dist/codeplain-<version>-py3-none-any.whl --no-project -- codeplain --status |
| 90 | + ``` |
| 91 | +4. (Optional) Publish to TestPyPI first: |
| 92 | + ```bash |
| 93 | + uv publish --publish-url https://test.pypi.org/legacy/ dist/codeplain-<version>* |
74 | 94 | ``` |
75 | | - cd build |
76 | | - python hello_world.py |
| 95 | +5. Publish to PyPI: |
| 96 | + ```bash |
| 97 | + uv publish dist/codeplain-<version>* |
77 | 98 | ``` |
| 99 | + Authenticate with `UV_PUBLISH_TOKEN=pypi-...` (recommended), `--token pypi-...`, or `--username __token__ --password pypi-...`. |
| 100 | +6. Push the tag: `git push origin v<version>`. |
78 | 101 |
|
79 | 102 | ## Additional Resources |
80 | 103 |
|
81 | 104 | ### Examples and Sample Projects |
82 | 105 |
|
83 | 106 | - 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. |
| 107 | +- For example application how to implement task manager in \*\*\*plain see [example-task-manager](https://github.com/Codeplain-ai/example-task-manager) repository. |
| 108 | +- For example application how to implement SaaS connectors in \*\*\*plain see [example-saas-connectors](https://github.com/Codeplain-ai/example-saas-connectors) repository. |
86 | 109 |
|
87 | 110 | ### Documentation |
88 | 111 |
|
89 | 112 | - For more details on the ***plain format, see the [***plain language specification](https://www.plainlang.org/docs/). |
90 | 113 | - 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 | 114 | - For complete CLI documentation and usage examples, see [plain2code CLI documentation](docs/plain2code_cli.md). |
92 | | - |
93 | | - |
|
0 commit comments