Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.05 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.05 KB

fedramp-automation Python usage example

This is a simple example of how to use the fedramp-automation validation rules with saxonc and its Python bindings.

saxonc is not bundled for installation via PyPI; it is available for download from the Saxonica website, and must be built and installed manually. An example of this process may be found in the provided Dockerfile.

This example is implemented as a pytest module ./test_validate_oscal.py.

Prerequisites

Compiled Schematron XSLT artifacts are required to run this example. The following command will build the artifact:

cd ../../..
make build-validations

Usage

To get a bash prompt within the container, run:

docker-compose run example bash -l

You may now run and interact with the example code.

Developer notes

To run tests:

docker-compose run example pytest

To auto-format code:

docker-compose run example black

To type-check code:

docker-compose run example mypy .