
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Reclass defines a syntax and directory structure for recursively merging YAML data sources.
Reclass is a library which defines a syntax and directory structure for recursively merging YAML data sources.
This repository contains a Rust implementation of Reclass which is based on the Reclass fork maintained by kapicorp.
The Reclass implementation provided in this repository can be used both from other Rust programs and in Python programs.
The reclass-rs
Python module is implemented directly in Rust with PyO3.
Please note that this implementation doesn't yet support all the features and extensions which are available in Kapitan Reclass. However, for features which are implemented, we aim to be compatible with Kapitan Reclass.
The implementation currently supports the following features of Kapicorp Reclass:
nodes_path
and classes_path
ignore_class_notfound
ignore_class_notfound_regexp
reclass-config.yaml
componse_node_name
compose_node_name
which preserves literal dots in node namesclass_mappings
and class_mappings_match_path
regex
crate\\1
(the Python variant) or ${1}
(the native Rust variant) when using backreferences in mapped classesfancy-regex
crate for regex patterns in class_mappings
.
The fancy-regex
crate should support most regex patterns supported by Python.The following Kapicorp Reclass features aren't supported:
allow_none_override
can't be set to False
yaml_git
and mixed
storage typesDocumentation for the original Reclass can be found at https://reclass.pantsfullofunix.net/. Documentation on Reclass extensions introduced in the Kapicorp Reclass fork can be found at https://github.com/kapicorp/reclass/blob/develop/README-extensions.rst.
Create a local virtualenv for running Python tests and install maturin, pytest and the Kapitan reclass fork
python -m venv .venv
source .venv/bin/activate
pip install maturin pytest kapicorp-reclass
Build the reclass-rs Python library and install it in the virtualenv
maturin develop
Run Python tests
pytest
You should be able to run the Rust tests through Cargo if you have the Rust toolchain setup:
cargo test
cargo fmt
to format codecargo check
for checking that the code compilescargo clippy
to check for code issuesYou can run benchmarks for Reclass::render_inventory()
with
cargo bench -F bench
The benchmarks are implemented with criterion
.
If you're using Kapitan, you can use reclass-rs by installing Kapitan with the optional reclass-rs
dependency and specifying --inventory-backend=reclass-rs
when running Kapitan.
KAPITAN_VENV=/path/to/your/kapitan/virtualenv
source ${KAPITAN_VENV}/bin/activate
pip install kapitan[reclass-rs]
See the upstream Kapitan docs for more details.
We generate the package version of reclass-rs
from the latest Git tag when building Python wheels.
To ensure this always works, we keep the version in the committed Cargo.toml
as 0.0.0
.
We generate the package version from Git by calling git describe --tags --always --match=v*
.
This command produces something like v0.1.1-61-g531ca91
.
We always strip the leading v
, since neither Cargo nor maturin support versions with leading v
.
If we're building a branch or PR, we discard the component derived from the commit hash.
For the example output above, the package version for a branch or PR build will become 0.1.1.post61
.
For tag builds, the command ouptut will be just the tag, so the package version will match the tag.
The version is injected with cargo-edit's cargo set-version
before the Python wheels are built.
See the "Python" workflow for more details.
FAQs
Reclass defines a syntax and directory structure for recursively merging YAML data sources.
We found that reclass-rs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.