Skip to main content

A tool for optimal WebP image compression

Project description

tool-webp-converter

A Python project created with pyscaf

Poetry Integration

This project uses Poetry for dependency management and packaging. Poetry provides a modern and efficient way to manage Python dependencies and build packages.

Features

  • Dependency Management: Poetry manages project dependencies through pyproject.toml
  • Virtual Environment: Automatically creates and manages a virtual environment
  • Build System: Integrated build system for creating Python packages
  • Lock File: Generates a poetry.lock file for reproducible installations

Common Commands

# Install dependencies
poetry install

# Add a new dependency
poetry add package-name

# Add a development dependency
poetry add --dev package-name

# Update dependencies
poetry update

# Run a command within the virtual environment
poetry run python script.py

# Activate the virtual environment
poetry shell

Project Structure

The project follows a standard Python package structure:

  • pyproject.toml: Project configuration and dependencies
  • poetry.lock: Locked dependencies for reproducible builds
  • src/: Source code directory
  • tests/: Test files directory

Development

To start developing:

  1. Ensure Poetry is installed
  2. Run poetry install to install all dependencies
  3. Use poetry shell to activate the virtual environment
  4. Start coding!

For more information, visit Poetry's official documentation.

Ruff Integration

Ruff is an extremely fast Python linter and code formatter, written in Rust. It can replace Flake8, Black, isort, pyupgrade, and more, while being much faster than any individual tool.

VSCode Default Configuration

The file .vscode/default_settings.json provides a recommended configuration for using Ruff in VSCode:

{
    "[python]": {
      "editor.formatOnSave": true,
      "editor.codeActionsOnSave": {
        "source.fixAll": "explicit",
        "source.organizeImports": "explicit"
      },
      "editor.defaultFormatter": "charliermarsh.ruff"
    },
    "notebook.formatOnSave.enabled": true,
    "notebook.codeActionsOnSave": {
      "notebook.source.fixAll": "explicit",
      "notebook.source.organizeImports": "explicit"
    },
    "ruff.lineLength": 88
}

Explanation of each line:

  • editor.formatOnSave: Enables automatic formatting on save for all files.
  • [python].editor.defaultFormatter: Sets Ruff as the default formatter for Python files.
  • [python]editor.codeActionsOnSave.source.organizeImports: Organizes Python imports automatically on save.
  • [python]editor.codeActionsOnSave.source.fixAll: Applies all available code fixes (including linting) on save.
  • ruff.lineLength: Line length for your python files

Useful Ruff Commands

You can run the following commands commands directly in the shell

# Lint all Python files in the current directory
ruff check .

# Format all Python files in the current directory
ruff format .

# Automatically fix all auto-fixable problems
ruff check . --fix

For more information, see the official Ruff VSCode extension documentation and the Ruff documentation.

You can enable specific rules over a catalog of over 800+ rules, depending on your needs or framework of choice. Check it out at the Ruff documentation.

Git Integration

This project uses Git for version control, providing a robust system for tracking changes, collaborating, and managing code history.

Features

  • Version Control: Track changes and manage code history
  • Branching: Create and manage feature branches
  • Collaboration: Work with remote repositories
  • Git Hooks: Automated scripts for repository events

Common Commands

# Initialize repository
git init

# Clone repository
git clone <repository-url>

# Create and switch to new branch
git checkout -b feature-name

# Stage changes
git add .

# Commit changes
git commit -m "commit message"

# Push changes
git push origin branch-name

# Pull latest changes
git pull origin branch-name

Project Structure

The project includes:

  • .git/: Git repository data
  • .gitignore: Specifies intentionally untracked files
  • .gitattributes: Defines attributes for paths
  • hooks/: Custom Git hooks (if present)

Development Workflow

  1. Create a new branch for features/fixes
  2. Make changes and commit regularly
  3. Push changes to remote repository
  4. Create pull requests for code review
  5. Merge approved changes to main branch

Best Practices

  • Write clear commit messages
  • Keep commits focused and atomic
  • Use meaningful branch names
  • Regularly pull from main branch
  • Review changes before committing

For more information, visit Git's official documentation.

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

tool_webp_converter-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

tool_webp_converter-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tool_webp_converter-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tool_webp_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8475f8be6b01b7354bef471040de3d73c8b6f9fd1884c0b376817c388fec12a7
MD5 c19be7325d695e0cccfd7ceaa1de7971
BLAKE2b-256 90936d22cbb987c4912319cf471b5e1d8be65f5d989a6050edf011a23a0c45d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tool_webp_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 954cf18d3f5c9933f1771ec1591db76fe87f5347cd8449c8933c5ce659c5feef
MD5 e590f7de635d43b36b3211d11f3b084c
BLAKE2b-256 48ea3c3dd2593c58238ab9fcdee3cdaa45660309179cc03490bf6c7325573b8e

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