Skip to content

Commit 31e1faa

Browse files
committed
Rename to reflect new state of this project
1 parent 827d98e commit 31e1faa

8 files changed

Lines changed: 33 additions & 72 deletions

File tree

ARCHITECTURE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
# cdd-python-client Architecture
2+
# cdd-python-all Architecture
33

44
<!-- BADGES_START -->
55
<!-- Replace these placeholders with your repository-specific badges -->
66
[![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7-
[![CI/CD](https://github.com/offscale/cdd-python-client/workflows/CI/badge.svg)](https://github.com/offscale/cdd-python-client/actions)
8-
[![Coverage](https://codecov.io/gh/offscale/cdd-python-client/branch/master/graph/badge.svg)](https://codecov.io/gh/offscale/cdd-python-client)
7+
[![CI/CD](https://github.com/offscale/cdd-python-all/workflows/CI/badge.svg)](https://github.com/offscale/cdd-python-all/actions)
8+
[![Coverage](https://codecov.io/gh/offscale/cdd-python-all/branch/master/graph/badge.svg)](https://codecov.io/gh/offscale/cdd-python-all)
99
<!-- BADGES_END -->
1010

11-
The **cdd-python-client** tool acts as a dedicated compiler and transpiler. Its fundamental architecture follows standard compiler design principles, divided into three distinct phases: **Frontend (Parsing)**, **Intermediate Representation (IR)**, and **Backend (Emitting)**.
11+
The **cdd-python-all** tool acts as a dedicated compiler and transpiler. Its fundamental architecture follows standard compiler design principles, divided into three distinct phases: **Frontend (Parsing)**, **Intermediate Representation (IR)**, and **Backend (Emitting)**.
1212

1313
This decoupled design ensures that any format capable of being parsed into the IR can subsequently be emitted into any supported output format, whether that is a server-side route, a client-side SDK, a database ORM, or an OpenAPI specification.
1414

DEVELOPING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Developing
22

3-
To develop `cdd-python-client`, you will need Python 3.9+.
3+
To develop `cdd-python-all`, you will need Python 3.9+.
44

55
```bash
66
make install_deps

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ all: help
7676

7777
build_docker:
7878
@echo "Building Docker images"
79-
docker build -t cdd-python-client-alpine -f alpine.Dockerfile .
80-
docker build -t cdd-python-client-debian -f debian.Dockerfile .
79+
docker build -t cdd-python-all-alpine -f alpine.Dockerfile .
80+
docker build -t cdd-python-all-debian -f debian.Dockerfile .
8181

8282
run_docker: build_docker
83-
docker run -d -p 8080:8080 --name cdd_alpine cdd-python-client-alpine
83+
docker run -d -p 8080:8080 --name cdd_alpine cdd-python-all-alpine
8484
sleep 3
8585
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "missing", "id": 1}' || echo "container failed to respond"
8686
docker stop cdd_alpine
8787
docker rm cdd_alpine
88-
docker run -d -p 8080:8080 --name cdd_debian cdd-python-client-debian
88+
docker run -d -p 8080:8080 --name cdd_debian cdd-python-all-debian
8989
sleep 3
9090
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "missing", "id": 1}' || echo "container failed to respond"
9191
docker stop cdd_debian

PUBLISH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Publishing cdd-python-client
1+
# Publishing cdd-python-all
22

33
## Publishing to PyPI
44
This project should be published to PyPI (the standard Python package index).

README.md

Lines changed: 16 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
2-
cdd-LANGUAGE
3-
============
1+
cdd-python-all
2+
==============
43

54
[![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6-
[![CI/CD](https://github.com/offscale/cdd-python-client/workflows/CI/badge.svg)](https://github.com/offscale/cdd-python-client/actions)
7-
[![Test Coverage](https://img.shields.io/badge/Test_Coverage-100.0%25-brightgreen)](https://github.com/offscale/cdd-python-client/actions)
8-
[![Doc Coverage](https://img.shields.io/badge/Doc_Coverage-100.0%25-brightgreen)](https://github.com/offscale/cdd-python-client/actions)
5+
[![CI/CD](https://github.com/offscale/cdd-python-all/workflows/CI/badge.svg)](https://github.com/offscale/cdd-python-all/actions)
6+
[![Test Coverage](https://img.shields.io/badge/Test_Coverage-100.0%25-brightgreen)](https://github.com/offscale/cdd-python-all/actions)
7+
[![Doc Coverage](https://img.shields.io/badge/Doc_Coverage-100.0%25-brightgreen)](https://github.com/offscale/cdd-python-all/actions)
98

109
OpenAPI ↔ Python. This is one compiler in a suite, all focussed on the same task: Compiler Driven Development (CDD).
1110

1211
Each compiler is written in its target language, is whitespace and comment sensitive, and has both an SDK and CLI.
1312

1413
The CLI—at a minimum—has:
15-
- `cdd-LANGUAGE --help`
16-
- `cdd-LANGUAGE --version`
17-
- `cdd-LANGUAGE from_openapi -i spec.json`
18-
- `cdd-LANGUAGE to_openapi -f path/to/code`
19-
- `cdd-LANGUAGE to_docs_json --no-imports --no-wrapping -i spec.json`
14+
- `python3 -m cdd_python_all --help`
15+
- `python3 -m cdd_python_all --version`
16+
- `python3 -m cdd_python_all from_openapi -i spec.json`
17+
- `python3 -m cdd_python_all to_openapi -f path/to/code`
18+
- `python3 -m cdd_python_all to_docs_json --no-imports --no-wrapping -i spec.json`
2019

2120
The goal of this project is to enable rapid application development without tradeoffs. Tradeoffs of Protocol Buffers / Thrift etc. are an untouchable "generated" directory and package, compile-time and/or runtime overhead. Tradeoffs of Java or JavaScript for everything are: overhead in hardware access, offline mode, ML inefficiency, and more. And neither of these alterantive approaches are truly integrated into your target system, test frameworks, and bigger abstractions you build in your app. Tradeoffs in CDD are code duplication (but CDD handles the synchronisation for you).
2221

2322
## 🚀 Capabilities
2423

25-
The `cdd-python-client` compiler leverages a unified architecture to support various facets of API and code lifecycle management.
24+
The `cdd-python-all` compiler leverages a unified architecture to support various facets of API and code lifecycle management.
2625

2726
* **Compilation**:
2827
* **OpenAPI → `Python`**: Generate idiomatic native models, network routes, client SDKs, database schemas, and boilerplate directly from OpenAPI (`.json` / `.yaml`) specifications.
@@ -32,7 +31,7 @@ The `cdd-python-client` compiler leverages a unified architecture to support var
3231

3332
## 📦 Installation
3433

35-
Requires Python 3.9+. Run `pip install cdd-python-client`
34+
Requires Python 3.9+. Run `pip install cdd-python-all`
3635

3736
## 🛠 Usage
3837

@@ -41,13 +40,13 @@ Requires Python 3.9+. Run `pip install cdd-python-client`
4140

4241
```bash
4342
# Generate a Python SDK and an interactive CLI from an OpenAPI spec
44-
cdd-python from_openapi to_sdk_cli -i ./openapi.json -o ./my_generated_client
43+
python3 -m cdd_python_all from_openapi to_sdk_cli -i ./openapi.json -o ./my_generated_client
4544

4645
# Extract an OpenAPI spec from your modified Python client code
47-
cdd-python to_openapi -f ./my_generated_client/client.py -o ./updated_openapi.json
46+
python3 -m cdd_python_all to_openapi -f ./my_generated_client/client.py -o ./updated_openapi.json
4847

4948
# Extract documentation JSON from your OpenAPI spec
50-
cdd-python to_docs_json --no-imports --no-wrapping -i ./openapi.json -o docs.json
49+
python3 -m cdd_python_all to_docs_json --no-imports --no-wrapping -i ./openapi.json -o docs.json
5150
```
5251

5352

@@ -79,7 +78,7 @@ We use `libcst` to safely parse and generate Python ASTs. This allows us to modi
7978

8079
## 🏗 Supported Conversions for Python
8180

82-
*(The boxes below reflect the features supported by this specific `cdd-python-client` implementation)*
81+
*(The boxes below reflect the features supported by this specific `cdd-python-all` implementation)*
8382

8483

8584
| Concept | Parse (From) | Emit (To) |
@@ -111,41 +110,3 @@ at your option.
111110
Unless you explicitly state otherwise, any contribution intentionally submitted
112111
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
113112
dual licensed as above, without any additional terms or conditions.
114-
115-
116-
## WebAssembly (WASM)
117-
118-
| Concept | Possible | Implemented |
119-
|---------|----------|-------------|
120-
| WebAssembly (WASM) Build | [x] | [ ] | |
121-
122-
For more details, see [WASM.md](WASM.md).
123-
\n## CLI Usage\n\n```
124-
usage: cdd-python [-h] [--version]
125-
{from_openapi,to_openapi,sync,to_docs_json,server_json_rpc}
126-
...
127-
128-
CDD Python Client generator and extractor.
129-
130-
positional arguments:
131-
{from_openapi,to_openapi,sync,to_docs_json,server_json_rpc}
132-
from_openapi Generate code from OpenAPI
133-
to_openapi Extract OpenAPI from code
134-
sync Sync a directory containing client.py, mock_server.py,
135-
test_client.py, cli_main.py
136-
to_docs_json Generate JSON documentation
137-
server_json_rpc Run JSON-RPC server
138-
139-
options:
140-
-h, --help show this help message and exit
141-
--version show program's version number and exit
142-
```\n
143-
```
144-
usage: cdd-python from_openapi [-h] {to_sdk,to_sdk_cli,to_server} ...
145-
146-
positional arguments:
147-
{to_sdk,to_sdk_cli,to_server}
148-
149-
options:
150-
-h, --help show this help message and exit
151-
```\n

make.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,18 @@ goto :EOF
8282

8383
:build_docker
8484
echo Building Docker images
85-
docker build -t cdd-python-client-alpine -f alpine.Dockerfile .
86-
docker build -t cdd-python-client-debian -f debian.Dockerfile .
85+
docker build -t cdd-python-all-alpine -f alpine.Dockerfile .
86+
docker build -t cdd-python-all-debian -f debian.Dockerfile .
8787
goto :EOF
8888

8989
:run_docker
9090
call :build_docker
91-
docker run -d -p 8080:8080 --name cdd_alpine cdd-python-client-alpine
91+
docker run -d -p 8080:8080 --name cdd_alpine cdd-python-all-alpine
9292
timeout /t 3
9393
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d "{"jsonrpc": "2.0", "method": "missing", "id": 1}"
9494
docker stop cdd_alpine
9595
docker rm cdd_alpine
96-
docker run -d -p 8080:8080 --name cdd_debian cdd-python-client-debian
96+
docker run -d -p 8080:8080 --name cdd_debian cdd-python-all-debian
9797
timeout /t 3
9898
curl -X POST http://localhost:8080 -H "Content-Type: application/json" -d "{"jsonrpc": "2.0", "method": "missing", "id": 1}"
9999
docker stop cdd_debian

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dev = [
2525
]
2626

2727
[project.scripts]
28-
"cdd-python-client" = "openapi_client.cli:main"
28+
"cdd-python-all" = "openapi_client.cli:main"
2929
"cdd-python" = "openapi_client.cli:main"
3030

3131
[tool.hatch.build.targets.wheel]

scripts/update_badges.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def get_color(cov):
7474
test_color = get_color(test_cov)
7575
doc_color = get_color(doc_cov)
7676

77-
test_badge = f"[![Test Coverage](https://img.shields.io/badge/Test_Coverage-{test_cov:.1f}%25-{test_color})](https://github.com/offscale/cdd-python-client/actions)"
78-
doc_badge = f"[![Doc Coverage](https://img.shields.io/badge/Doc_Coverage-{doc_cov:.1f}%25-{doc_color})](https://github.com/offscale/cdd-python-client/actions)"
77+
test_badge = f"[![Test Coverage](https://img.shields.io/badge/Test_Coverage-{test_cov:.1f}%25-{test_color})](https://github.com/offscale/cdd-python-all/actions)"
78+
doc_badge = f"[![Doc Coverage](https://img.shields.io/badge/Doc_Coverage-{doc_cov:.1f}%25-{doc_color})](https://github.com/offscale/cdd-python-all/actions)"
7979

8080
# Regex search for existing badges
8181
if "![Test Coverage]" in content and "![Doc Coverage]" in content:

0 commit comments

Comments
 (0)