Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
43 lines (30 loc) · 1.52 KB

File metadata and controls

43 lines (30 loc) · 1.52 KB
Copy raw file
Download raw file
Edit and raw actions

Development

This section describes aspects of the project relevant to anybody who wants to modify the code generation process. Note that code is generated and then checked in, so that anybody who wants to use the library can use it immediately–no build step is required in that scenario.

You'll first need to install the extra dependencies specified in requirements.txt, ideally inside a virtual environment.

Next, a Makefile is included that provides the following build targets:

mypy-generate:
Run MyPy type checker on the generator script.
test-generate:
Run automated tests for the generator script.
generate
Parse the CDP spec and generate the equivalent Python code in the cdp/ directory.
test-import:
Verify that the generated code can be imported. This is a simple smoke check to ensure that code generation hasn't gone completely haywire, e.g. produced blank files.
mypy-cdp:
Run MyPy type checker on the generated CDP code.
test-cdp:
Run a few automated tests on the generated CDP code.

Note that the verification in this project occurs in two phases:

  1. Verify the generator code.
  2. Run the generator.
  3. Verify the generated code.

We focus on more effort on step 1, because if the generator is correct then the generated code is correct by definition. The default make target runs all of these targets in order, serving as a quick way to verify the entire project.

To make documentation (i.e. the docs you're reading right now) go into the docs/ directory and run make html.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.