No project description provided
Project description
kraken-re
(Work in progress)
The kraken-re provides a rule engine to describe the components of a project. These components are translated into
build tasks using various rules.
The rule engine is strongly inspired by Pants.
Concepts
Targets
A Target is an addressable set of metadata. The metadata is comprised of fields. Each field is of a particular type, and no two fields can be of the same type (subclasses of another field type are accepted).
Field
A Field is a strongly typed description of a piece of data, such as "PythonProjectSourceDirectory". A field may be a subclass of another field, allowing it to be taken into consideration when a generic request of fields matching its parent class is requested.
Rules
A rule describes how to translate a set of input types to an output type. Often, the inputs and output types will be targets, but they can be arbitrary Python types. Every session begins with a set of initial objects that are usually created by a script.
Every object in the rule system must be immutable and hashable. If two rules produce the same result, the results are merged.
Example script
docker_grpc_rust_template(name="template")
docker_image(dockerfile_target=":template", platforms=["linux/arm64", "linux/amd64"])
Example rules
@rule
def get_dockerfile_resource_from_grpc_rust_template(request: DockerGrpcRustTemplateRequest) -> DockerfileResource:
...
return DockerfileResource(path_to_dockerfile)
@rule
def get_docker_build_requests(image: DockerImageTarget) -> DockerBuildRequests:
...
for platform in image[DockerPlatforms]:
requests.append(...)
return DockerBuildRequests(requests)
@rule
def build_docker(request: DockerBuildRequest) -> DockerBuildResult:
...
return DockerBuildResult(...)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kraken-re-0.1.0.tar.gz.
File metadata
- Download URL: kraken-re-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3b4a87f5b7afa4d9b787c7d21807d1e66192601f2f183b193fcf555f073076f
|
|
| MD5 |
4b16ea5111bc31d107124cee25673848
|
|
| BLAKE2b-256 |
e0ec73ec2c8b3988a87f12b94e18b1925b4553a8b779887337ed3db41cebeceb
|
File details
Details for the file kraken_re-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kraken_re-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2df5766f7d7304ec12ea59f9f25baf424bba65b2ad424c3755d2e88a9e6761d1
|
|
| MD5 |
c7ba541f9761e52381d84b23aa89105d
|
|
| BLAKE2b-256 |
6a160b8307da5d328175a99d3d80b6f0f85f2b4221d03ef89b2e52b6c4e8bd79
|