Skip to main content

Check if package dependencies are available in Fedora. Supports Rust, Python, and more.

Project description

๐Ÿ‘ Woolly

Check if package dependencies are available in Fedora.

Woolly analyzes package dependencies from various language ecosystems and checks their availability in Fedora repositories, helping packagers estimate the effort needed to bring a package to Fedora.

โš ๏ธ Experimental Software

This project is still experimental and may not get things right all the time. Results should be verified manually, especially for complex dependency trees. Platform-specific dependencies (like windows-* crates) may be flagged as missing even though they're not needed on Linux.

What does "woolly" mean?

Nothing. I just liked the name. ๐Ÿ‘

Features

  • Multi-language support โ€” Analyze dependencies from Rust (crates.io) and Python (PyPI)
  • Multiple output formats โ€” Console output, JSON, and Markdown reports
  • Optional dependency tracking โ€” Optionally include and separately track optional dependencies
  • Smart caching โ€” Caches API responses and dnf queries to speed up repeated analyses
  • Progress tracking โ€” Real-time progress bar showing analysis status
  • Debug logging โ€” Verbose logging mode for troubleshooting
  • Extensible architecture โ€” Easy to add new languages and report formats

Supported Languages

Language Registry CLI Flag Aliases
Rust crates.io --lang rust -l rs, -l crate
Python PyPI --lang python -l py, -l pypi

Output Formats

Format Description CLI Flag Aliases
stdout Rich console output (default) --report stdout -r console
json JSON file for programmatic use --report json
markdown Markdown file for documentation --report markdown -r md

Installation

# Using uv (recommended)
uv pip install .

# Or run directly without installing
uv run woolly --help

# Using pip
pip install .

Requirements

  • Python 3.10+
  • dnf available on the system (for Fedora package queries)

Usage

Basic Usage

# Check a Rust crate (default language)
woolly check ripgrep

# Check a Python package
woolly check --lang python requests

# Use language aliases
woolly check -l py flask
woolly check -l rs tokio

Options

# Check a specific version
woolly check serde --version 1.0.200

# Include optional dependencies in the analysis
woolly check --optional requests -l python

# Limit recursion depth
woolly check --max-depth 10 tokio

# Disable progress bar
woolly check --no-progress serde

# Enable debug logging
woolly check --debug flask -l py

# Output as JSON
woolly check --report json serde

# Output as Markdown
woolly check -r md requests -l py

Other Commands

# List available languages
woolly list-languages

# List available output formats
woolly list-formats

# Clear the cache
woolly clear-cache

Example Output

Rust

$ woolly check cliclack

Analyzing Rust package: cliclack
Registry: crates.io
Cache directory: /home/user/.cache/woolly

  Analyzing Rust dependencies โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 100% โ€ข 0:00:15 complete!

  Dependency Summary for 'cliclack' (Rust)
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Metric                     โ”‚ Value โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Total dependencies checked โ”‚     7 โ”‚
โ”‚ Packaged in Fedora         โ”‚     0 โ”‚
โ”‚ Missing from Fedora        โ”‚     1 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Missing packages that need packaging:
  โ€ข cliclack

Dependency Tree:
cliclack v0.3.6 โ€ข โœ— not packaged
โ”œโ”€โ”€ console v0.16.1 โ€ข โœ“ packaged (0.16.1)
โ”‚   โ”œโ”€โ”€ encode_unicode v1.0.0 โ€ข โœ“ packaged (1.0.0)
โ”‚   โ””โ”€โ”€ windows-sys v0.61.2 โ€ข โœ— not packaged
...

Python

$ woolly check --lang python requests

Analyzing Python package: requests
Registry: PyPI
Cache directory: /home/user/.cache/woolly

  Analyzing Python dependencies โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 100% โ€ข 0:00:05 complete!

  Dependency Summary for 'requests' (Python)
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Metric                     โ”‚ Value โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Total dependencies checked โ”‚     5 โ”‚
โ”‚ Packaged in Fedora         โ”‚     5 โ”‚
โ”‚ Missing from Fedora        โ”‚     0 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Dependency Tree:
requests v2.32.3 โ€ข โœ“ packaged (2.32.3) [python3-requests]
โ”œโ”€โ”€ charset-normalizer v3.4.0 โ€ข โœ“ packaged (3.4.0) [python3-charset-normalizer]
โ”œโ”€โ”€ idna v3.10 โ€ข โœ“ packaged (3.10) [python3-idna]
โ”œโ”€โ”€ urllib3 v2.2.3 โ€ข โœ“ packaged (2.2.3) [python3-urllib3]
โ””โ”€โ”€ certifi v2024.8.30 โ€ข โœ“ packaged (2024.8.30) [python3-certifi]

With Optional Dependencies

$ woolly check --lang python --optional flask

  Dependency Summary for 'flask' (Python)
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Metric                     โ”‚ Value โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Total dependencies checked โ”‚    15 โ”‚
โ”‚ Packaged in Fedora         โ”‚    12 โ”‚
โ”‚ Missing from Fedora        โ”‚     3 โ”‚
โ”‚                            โ”‚       โ”‚
โ”‚ Optional dependencies      โ”‚     4 โ”‚
โ”‚   โ”œโ”€ Packaged              โ”‚     2 โ”‚
โ”‚   โ””โ”€ Missing               โ”‚     2 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Adding a New Language

To add support for a new language, create a new provider in woolly/languages/:

# woolly/languages/go.py
from typing import Optional

from woolly.languages.base import Dependency, LanguageProvider, PackageInfo


class GoProvider(LanguageProvider):
    """Provider for Go modules."""

    # Required class attributes
    name = "go"
    display_name = "Go"
    registry_name = "Go Modules"
    fedora_provides_prefix = "golang"
    cache_namespace = "go"

    # Required methods to implement:

    def fetch_package_info(self, package_name: str) -> Optional[PackageInfo]:
        """Fetch package info from proxy.golang.org."""
        ...

    def fetch_dependencies(self, package_name: str, version: str) -> list[Dependency]:
        """Fetch dependencies from go.mod."""
        ...

    # Optional: Override these if your language has special naming conventions

    def normalize_package_name(self, package_name: str) -> str:
        """Normalize package name for Fedora lookup."""
        return package_name

    def get_alternative_names(self, package_name: str) -> list[str]:
        """Alternative names to try if package not found."""
        return []

Then register it in woolly/languages/__init__.py:

from woolly.languages.go import GoProvider

PROVIDERS: dict[str, type[LanguageProvider]] = {
    "rust": RustProvider,
    "python": PythonProvider,
    "go": GoProvider,  # Add new provider
}

ALIASES: dict[str, str] = {
    # ... existing aliases
    "golang": "go",
}

Adding a New Output Format

To add a new output format, create a reporter in woolly/reporters/:

# woolly/reporters/html.py
from woolly.reporters.base import Reporter, ReportData


class HtmlReporter(Reporter):
    """HTML report with interactive tree."""

    name = "html"
    description = "HTML report with interactive dependency tree"
    file_extension = "html"
    writes_to_file = True

    def generate(self, data: ReportData) -> str:
        """Generate HTML content."""
        ...

Then register it in woolly/reporters/__init__.py.

Notes

  • Results should be verified manually โ€” some packages may have different names in Fedora
  • Platform-specific dependencies (like windows-* crates) are shown as missing but aren't needed on Linux
  • The tool uses dnf repoquery to check Fedora packages, so it must run on a Fedora system or have access to Fedora repos
  • Cache is stored in ~/.cache/woolly and can be cleared with woolly clear-cache

License

MIT License โ€” see LICENSE for details.

Credits

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

woolly-0.4.0.tar.gz (116.5 kB view details)

Uploaded Source

Built Distribution

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

woolly-0.4.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file woolly-0.4.0.tar.gz.

File metadata

  • Download URL: woolly-0.4.0.tar.gz
  • Upload date:
  • Size: 116.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for woolly-0.4.0.tar.gz
Algorithm Hash digest
SHA256 791dd32f34508706b98d3176b78cf962b5772819eb0028a4431ab8ad3440f2de
MD5 eb6969de39ca94ce0c170c20327462d8
BLAKE2b-256 90f9a7b0d9d203aa359623c9b832ded52601066d52e1c0f0218cdeccbb9a988a

See more details on using hashes here.

File details

Details for the file woolly-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: woolly-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for woolly-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4898efb512fc2c880d29e4980cdbe790018b50c1c73734f4948dda0dd960ff0
MD5 9eff2c1e60bfecaddcbc9835f4892343
BLAKE2b-256 3d40867ea30b0e1992d6cded9e86dd76785efb536a8b70a94dd891b0b714c0da

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