Skip to main content

The ASD-STE100 (Simplified Technical English) Issue 9 rules.

Project description

biz.dfch.AsdSte100Rules

ASD-STE100: Issue 9 License: AGPL v3 Python Pylint and unittest TestPyPI version PyPI version PyPI downloads

Introduction

This is a Python library, that implements the ASD-STE100 Issue 9 rules, recommendations, and section-introduction blocks (rule sections 1-11 and the General Recommendations), as a queryable ruleset. A Rule has these properties:

  • type_, is this entry a RULE, a RECOMMENDATION, or an INFORMATION (section-intro) block?
  • id_, the rule id, e.g. R1.5 or GR-3
  • ref, the page reference in the ASD-STE100 Issue 9 document
  • section, the section name, e.g. "Words"
  • category, the category within the section, e.g. "Technical nouns"
  • name, the rule's short title
  • summary, the rule's summary text
  • contents, a list of content blocks that make up the rule's body

Each ContentItem in contents has a type_ (text, heading, note, comment, example, ste_example, nonste_example, not_recommended, technical_nouns, or technical_verbs) and its data.

The Rules class is the query container over a list of Rule entries — loaded from the packaged built-in ASD-STE100 Issue 9 ruleset, from your own JSON file(s), or both — and offers find, by_section, by_category, match, search, filter, examples, overview, and toc.

biz.dfch.AsdSte100Mcp uses this library to expose the ruleset over MCP.

Data model

The built-in ASD-STE100 Issue 9 ruleset ships as a single packaged JSON file, data/asdste100_issue9_rules.json — a pretty-printed JSON array of 66 entries (rules, recommendations, and section-introduction blocks), one object per Rule:

{
  "type_": "rule",
  "id_": "R1.1",
  "ref": "Issue 9 page 1-1-2",
  "section": "Words",
  "category": "Which words can you use?",
  "name": "Use words that are: ...",
  "summary": "Simplified Technical English (STE) has a controlled dictionary ...",
  "contents": [
    { "type_": "text", "data": "A technical noun is a noun term ..." },
    { "type_": "example", "data": "- The word **use** is an approved verb ..." },
    { "type_": "note", "data": "In the context of ISO 1087:2019 ..." }
  ]
}

Loading is resilient: a malformed entry is skipped with a printed [ERROR] entry #N: ... message instead of raising, so one bad entry cannot break the whole ruleset.

You can point Rules (or any rules CLI command, via --file) at your own JSON file(s) in the same shape to extend or replace the built-in ruleset, e.g. to add company-specific rules or recommendations alongside the ASD-STE100 Issue 9 baseline.

Installation

biz-dfch-asdste100rules is on PyPI. Create a virtual environment and install the library with pip:

pip install biz-dfch-asdste100rules

Or install with uv:

uv add biz-dfch-asdste100rules

Command line usage

Installing the package also installs the rules console script:

uv run rules --help
Usage: rules [OPTIONS] COMMAND [ARGS]...

 Commands:
 find      Find a rule or recommendation by exact id.
 match     Find rules matching a regular expression pattern.
 section   Find rules by exact section name.
 category  Find rules by exact category name.
 examples  Find example content items across rules.
 overview  Give a lightweight overview of the rules in the ruleset.
 search    Find rules whose text matches a regular expression pattern.
 toc       List the distinct section/category pairs in the ruleset.

Examples

Look up a single rule by id:

uv run rules find R1.5

List the document structure (section/category pairs and the ids they contain):

uv run rules toc

Full-text search across every rule's section, category, name, summary, and content (notes, examples, technical noun/verb lists, ...), optionally narrowed to one content type:

uv run rules search "technical noun" --content-type note

Get a lightweight overview (id, type, section, category, name, and content stats) without pulling in the rule bodies:

uv run rules overview --section Words

Collect only the STE examples for a section:

uv run rules examples --section Words --kind ste_example

Every command accepts --file (repeatable) to merge in your own JSON rules file(s) alongside, or instead of (--no-builtin), the built-in ASD-STE100 Issue 9 ruleset.

Make a Release

1. Make sure that all tests are satisfactory

Before you make the release, make sure the CI pipeline is green on the dev branch:

uv run --frozen ruff format --check
uv run --frozen ruff check
uv run --frozen pylint $(git ls-files '*.py') || true
uv run --frozen python -m unittest discover -v -s tests -t . -p "test_*.py"

2. Increase the version

Update the version in pyproject.toml:

version = "x.y.z"

3. Commit and push to dev

git add pyproject.toml
git commit -m "chore: bump version to vx.y.z"
git push origin dev

4. Merge dev into main

git checkout main
git merge dev
git push origin main

5. Create and push a version tag

This will create a binary artifact of the application and add it to the release.

export VERSION=x.y.z
git tag v${VERSION}
git push origin v${VERSION}

Then, select the dev branch to continue your work.

git checkout dev

Pushing the tag automatically triggers the publish.yml workflow, which will:

  • build the sdist and wheel with uv build (this step creates the artifact)
  • create a GitHub Release with auto-generated release notes
  • upload the files as a release artifact (this step adds the artifact to the release)

License

This library is licensed under the GNU Affero General Public License. See LICENSE for more information.

ASD-STE100 Simplified Technical English (Standard for Technical Documentation), Issue 9

Copyright 2025 Aerospace, Security and Defence Industries Association of Europe (ASD), https://www.asd-europe.org.

This library or the maintainer is not affiliated with ASD. ASD does not endorse this library or the maintainer.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biz_dfch_asdste100rules-0.1.0.tar.gz (81.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biz_dfch_asdste100rules-0.1.0-py3-none-any.whl (95.7 kB view details)

Uploaded Python 3

File details

Details for the file biz_dfch_asdste100rules-0.1.0.tar.gz.

File metadata

  • Download URL: biz_dfch_asdste100rules-0.1.0.tar.gz
  • Upload date:
  • Size: 81.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for biz_dfch_asdste100rules-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b237d0feb6de2775cdad0935561426682bab878d919b3b19a228097004d7d36
MD5 642b4cd64ef8a77450ed4cfa6d10bf4d
BLAKE2b-256 5a397408d005844e9ad2bc08ffe4c144c62db234ef3b449d61b21dc366275089

See more details on using hashes here.

Provenance

The following attestation bundles were made for biz_dfch_asdste100rules-0.1.0.tar.gz:

Publisher: publish.yml on dfch/biz.dfch.AsdSte100Rules

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biz_dfch_asdste100rules-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for biz_dfch_asdste100rules-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9dc7d3c3627b0839ec147b291b76b61e408a5902f5f27d00d025acff6d759ce
MD5 5466acaa96971c16c59d5bc5893a118d
BLAKE2b-256 d432bfae827353a0aac572bbc2023c85b54bcef97547908acb01712a73fb377d

See more details on using hashes here.

Provenance

The following attestation bundles were made for biz_dfch_asdste100rules-0.1.0-py3-none-any.whl:

Publisher: publish.yml on dfch/biz.dfch.AsdSte100Rules

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page