AppOmni ALIGN Tools
Tools for working with ALIGN parser files, including a schema validator/linter.
Installation
Using Poetry:
poetry add appomni-align-tools
Using pip:
pip install appomni-align-tools
Tools
ALIGN Linter
A linter for validating ALIGN parser files. The linter checks for:
- Valid ALIGN commands
- Valid field paths according to the schema
- Valid enum values
- Type compatibility for conversions
Usage
Basic usage:
align-lint path/to/file.conf --schema path/to/schema.json
Lint multiple files:
align-lint path/to/*.conf --schema path/to/schema.json
Options:
--schema: Path to JSON schema file (required)--verbose,-v: Enable verbose output
GitHub Action
Add this to your repository's workflow file (e.g., .github/workflows/align-lint.yml):
name: ALIGN Linter
on:
push:
paths:
- '**.conf'
pull_request:
paths:
- '**.conf'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
run: |
pipx install poetry
- name: Install dependencies
run: |
poetry install appomni-align-tools
- name: Run ALIGN linter
env:
SCHEMA_PATH: ${{ inputs.schema-path || 'schemas/ACES.json' }}
run: |
poetry run align-lint $(find . -name "*.conf") --schema "$SCHEMA_PATH"
Supported Commands
The linter validates the following ALIGN commands:
appendcopyconvertconvert_nesteddatededupedelfrom_jsonhttpparse_ipparse_sqlparse_user_agentregex_capturerenamesetsplitto_jsontranslate
Development
Setup
# Install dependencies
poetry install
# Run tests
pytest tests/
Supporting Changes to Align
Generate new Lexer, Listener, and Parser via ANTLR and push generated files into align folder.
antlr4 -Dlanguage=Python3 -o align Align.g4
Adding New Validations
The linter can be extended by adding new validation methods to the AlignParserLinter class in linter.py.
GitHub Annotations
When used in GitHub Actions, the linter will create annotations in pull requests for any issues found, showing:
- The specific line and column where the issue was found
- A description of the error
- The file containing the error
This makes it easy to spot and fix issues directly in the PR interface.
Metadata
Release files for appomni-align-tools 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| appomni_align_tools-0.1.0.tar.gz | 14.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| appomni_align_tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.7 kB
Release files / appomni_align_tools-0.1.0.tar.gz
| Download URL | appomni_align_tools-0.1.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7a3024d6c8127ef799608d7f24dac412ac025189efd97813e4efc682a537932
|
|
BLAKE2b-256 checksum How to use checksums |
032d7d492fdc612909319147625b65c505bf0bd2d7d9f681f177e463280bd506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.5 Darwin/24.2.0
|
Release files / appomni_align_tools-0.1.0-py3-none-any.whl
| Download URL | appomni_align_tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ae4856ddb0e31d3d62af05cff565932703bb61fbed2a1493d606d2c7d8b596c
|
|
BLAKE2b-256 checksum How to use checksums |
e8f572c55d6e854db508d72d5c53ac49da7c4de96b076d4d0497a755912caf51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.5 Darwin/24.2.0
|
Security for appomni-align-tools 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.