Skip to content

Latest commit

 

History

History
74 lines (45 loc) · 2.2 KB

development.rst

File metadata and controls

74 lines (45 loc) · 2.2 KB

Development Tools

The development effort is dependent on several parts of the CEL project.

  1. The language specification. https://github.com/google/cel-spec/blob/master/doc/langdef.md
  2. The test cases. https://github.com/google/cel-spec/tree/master/tests/simple/testdata

The language specification is transformed into a Lark grammar. This is in the src/cel.lark file. This changes very slowly. Any changes must be reflected (manually) by revising the lark version of the EBNF.

The test cases present a more challenging problem.

A tool, gherkinize.py, converts the test cases from Protobuf messages to Gherkin scenarios.

The gherkinize.py Tool

..  automodule:: gherkinize
    :no-members:
    :members: Config


The features/steps Directory

The features/steps directory has step definition modules that implement the Given, When, and Then clauses.

..  py:module:: features.steps.c7n_integration

    Provides step definitions for the ``c7n_interface.feature``.
    This is not part of the CEL language specification.

..  py:module:: features.steps.cli_binding

    Provides step definitions for the ``expr_test_bc.feature``, ``json_query.feature``, neither of which are part of the CEL language specificaiton.

..  py:module:: features.steps.integration_binding

    Provides step definitions for the features generated by the ``gherkinize.py`` tool.

The features/Makefile

This Makefile has the following targets:

.. program-output:: make -C ../../features help

Currently, the following feature files are built from the CEL specification.

.. program-output:: make -C ../../features conformance-feature-list

The docs/Makefile

This is a Sphinx Makefile to build documentation. For more information, see https://www.sphinx-doc.org/en/master/index.html

.. program-output:: make -C ../ help

The Project Makefile

A top-level Makefile has a number of phony targets:

.. program-output:: make -C ../../ help