Skip to main content

Ancile is a release risk assessment tool that analyzes differences between Git tags and evaluates changes based on configurable risk categories.

Project description

Ancile

Your shield against risky releases

Ancile is a release risk assessment tool that analyzes differences between Git tags and evaluates changes based on configurable risk categories.

🛡️ Overview

Ancile helps development teams identify potential risks in releases by:

  • Comparing Git tags to analyze changes between versions
  • Mapping changed files to predefined risk categories
  • Generating risk assessment reports for releases

✨ Features

  • Git tag differential analysis
  • Configurable risk categories and folder mappings
  • Risk assessment scoring
  • Detailed reporting
  • Easy integration with CI/CD pipelines

🚀 Getting Started

Docker Usage

# Print usage
docker run ancile --help

# Assess risk between two tags
docker run -v $(pwd):/var/opt/ancile ancile --risk-config /var/opt/ancile/risk_mappings.yaml --stable 1.0.0 --change 1.1.0 --repo-path /var/opt/ancile

# Use with local repository
docker run -v /path/to/your/repo:/var/opt/ancile ancile --risk-config /var/opt/ancile/risk_mappings.yaml --stable 1.0.0 --change 1.1.0 --repo-path /var/opt/ancile

Prerequisites

  • Python 3.12 or higher
  • Git

Installation

pip install ancile

CLI Usage

The primary way to use Ancile is through its command-line interface:

# Ask for help
ancile --help

# Basic usage
ancile --risk-config risks.yaml --stable 1.0.0 --change 1.0.1

# With optional repository path
ancile --risk-config risks.yaml --stable 1.0.0 --change 1.0.1 --repo-path /path/to/repo

# To generate a default risk mapping configuration
ancile --generate-config --risk-config risk_mappings.yaml

CLI Options:

See also the usage with ancile --help.

  • --generate-config: a flag to generate a risk mappings template
  • --risk-config: Path to risk mapping configuration file (default: risk_mappings.yaml)
  • --stable: The stable tag currently in production
  • --change: The new tag to assess for release
  • --repo-path: Path to the git repository (default: current directory)
  • --debug: very verbose output
  • --verbose: prints out more information
  • --version: prints the current version of Ancile

The primary way to use Ancile is through its command-line interface:

# Basic usage
ancile --risk_mappings=risks.yaml --stable=1.0.0 --change=1.0.1

# With optional repository path
ancile --risk_mappings=risks.yaml --stable=1.0.0 --change=1.0.1 --repo-path=/path/to/repo

Development

  1. Clone the repository
  2. Create a virtual environment: python -m venv venv
  3. Activate the virtual environment:
    • Windows: venv\Scripts\activate
    • Unix/MacOS: source venv/bin/activate
  4. Install development dependencies: pip install -r requirements.txt
  5. Install the package in editable mode: pip install -e .

Testing

Run tests with pytest:

pytest tests/

⚙️ Configuration

Create an ancile.yaml in your project root:

mappings:
  - folder: /docs
    risk: LOW
  - folder: /tests
    risk: LOW
  - folder: /src/core
    risk: HIGH
  - folder: /src/api
    risk: HIGH

Exit Codes

The tool returns different exit codes depending on the risk assessment:

  • 0: LOW risk
  • 1: MEDIUM risk
  • 2: HIGH risk

This allows for easy integration with CI/CD pipelines to automate deployment decisions.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📝 License

This project is licensed under the GNU General Public License v3.0 only - see the LICENSE file for details.

Copyright (C) 2025 Leading Works SàRL

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

🔍 Etymology

The name "Ancile" comes from Greek mythology, referring to the shield of Zeus and Athena. Just as the divine ancile protected the gods, this tool helps protect your releases by identifying potential risks.

✨ Acknowledgments

  • Inspired by the need for better release risk assessment

Made with ❤️ by Leading Works SàRL

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

ancile-1.0.1.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

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

ancile-1.0.1-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

Details for the file ancile-1.0.1.tar.gz.

File metadata

  • Download URL: ancile-1.0.1.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for ancile-1.0.1.tar.gz
Algorithm Hash digest
SHA256 14c87e8b7768c8705ed0dfaccdb0f1d35285c044e090cf0c2c700bc4231d1bd7
MD5 f47d2360cb63b7683fbaab2a52190bf0
BLAKE2b-256 da9e7327e182269d318ab20618ea28b0116c92b4750a7041c366efa47ac77e7b

See more details on using hashes here.

File details

Details for the file ancile-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ancile-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for ancile-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6925eef894290790de6732cd411598dc8fd2f944d74e5f822e042ea1287d3c4c
MD5 ae5b2fde52b216fd2cb81ca52f213416
BLAKE2b-256 75c87de6849f5ad7961e5f67cc8f62560893f234237ea311a0a682717f88cc71

See more details on using hashes here.

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