Skip to main content

Daisy framework development tools - Python code style checking and formatting utilities

Project description

DaisyTools - Daisy Framework Development Tools

PyPI version Python versions License: MIT

Overview

DaisyTools is a comprehensive toolset for Python code style checking and formatting in Daisy framework projects. It provides automated code quality tools to help developers maintain consistent code style across Daisy software.

Features

  • Code Style Checking: Check Python code for formatting issues
  • Code Style Fixing: Automatically fix formatting and import sorting
  • Python Environment Management: Python interpreter wrapper
  • Recursive Directory Scanning: Automatically finds all Python files
  • Import File Detection: Skips files marked as imported
  • Multiple Output Formats: Check mode, fix mode, and flake8 reporting

Installation

From PyPI (Recommended)

pip install daisytools

From Source

git clone https://github.com/yourusername/daisytools.git
cd daisytools
pip install .

Development Installation

git clone https://github.com/yourusername/daisytools.git
cd daisytools
pip install -e .

Usage

Code Style Checking

# Check all Python files in current directory
daisy-code-style-check

# Check specific files
daisy-code-style-check file1.py file2.py

# Check with flake8 output
daisy-code-style-check -p

Code Style Fixing

# Fix all Python files in current directory
daisy-code-style-fix

# Fix specific files
daisy-code-style-fix file1.py file2.py

# Preview changes without applying them
daisy-code-style-fix -n

# Preview changes with flake8 output
daisy-code-style-fix -n -p

Python Wrapper

# Use the best available Python interpreter
daisypython script.py

Configuration

The tools automatically look for configuration files in your project:

  • .flake8
  • pyproject.toml

If these files are not found, default configurations are used:

  • Black: Line length 88, Python 3.6+ compatibility
  • isort: Black profile for import sorting
  • flake8: Max line length 88, ignores E203 and W503

Command Line Options

daisy-code-style-check

  • files: Python files to check (optional, defaults to all Python files in current directory)
  • -p, --flake8: Show flake8 output instead of code changes

daisy-code-style-fix

  • files: Python files to fix (optional, defaults to all Python files in current directory)
  • -n, --check: Only show what would be changed without applying fixes
  • -p, --flake8: Show flake8 output (only with -n option)

Development

Running Tests

python -m pytest tests/

Building the Package

python -m build

Publishing to PyPI

python -m twine upload dist/*

License

MIT License - see LICENSE file for details.

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

daisytools-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

daisytools-1.0.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file daisytools-1.0.0.tar.gz.

File metadata

  • Download URL: daisytools-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for daisytools-1.0.0.tar.gz
Algorithm Hash digest
SHA256 77bb63dd1f183ce9a7f12d6b452107e57171f9c04c148f70d0c6956b3f009e82
MD5 59fa68241e4e9ee1ab5939322cd5f2f7
BLAKE2b-256 449b7162e7fd327d82d4d7962ab8b6e443a442e49d39b83b5cd70c7311cc5a7f

See more details on using hashes here.

File details

Details for the file daisytools-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: daisytools-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for daisytools-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48df260a460b8a9405093c8ee478472c75f7036e7a95c351fb0d86cfc8583c7d
MD5 2194983534d28d23ee32131a4a9d9d43
BLAKE2b-256 66ee3f93f25cbc6befbb8ad9a839238a7be923f29dc68991c681004912634982

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