Skip to main content

The canon for pixel data topology. A cross-language specification to define the logical layout of images.

Project description

Pixel-Canon: Python Implementation

This directory contains the Python implementation of the Pixel-Canon specification.

Development Setup

To work on this package locally, it is recommended to install it in "editable" mode inside a virtual environment.

  1. Navigate to this directory:

    cd path/to/pixel-canon/python
    
  2. Create a virtual environment:

    python -m venv .venv
    
  3. Activate the virtual environment:

    • Windows (Command Prompt, cmd.exe):
      .venv\Scripts\activate.bat
      
    • Windows (PowerShell):
      # Если вы получаете ошибку о политике выполнения, сначала выполните:
      # Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
      .venv\Scripts\Activate.ps1
      
    • macOS / Linux (bash/zsh):
      source .venv/bin/activate
      
  4. Install the package in editable mode: This command will install the package and its dependencies, making it available system-wide (within the virtual environment) while allowing you to edit the source code directly.

    pip install -e .
    

    If you need the dependencies for running tests or specific backends, you can install them as extras:

    pip install -e ".[numpy]"
    

Running Tests

From the root of the python directory (pixel-canon/python), run the following command:

python -m unittest discover -s tests

This command explicitly tells unittest to start discovery in the tests subdirectory, ensuring all tests are found and executed correctly.

Publishing to PyPI

This is a guide for project maintainers.

  1. Install build tools:

    pip install build twine
    
  2. Clean up previous builds (optional but recommended):

    rm -rf build dist pixel_canon.egg-info
    
  3. Build the package: This command creates the dist/ directory with a wheel (.whl) and a source archive (.tar.gz).

    python -m build
    
  4. Upload to PyPI: You will be prompted for a username and password.

    • For username, enter __token__.
    • For password, paste your PyPI API token (including the pypi- prefix).
    python -m twine upload dist/*
    

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

pixel_canon-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

pixel_canon-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pixel_canon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8be92556c1e0f19b659d5c87d2a72bb0ef865e8794d4c91c75ec1212d487ad5
MD5 4c9cd520fc67f7ff5bd8bbf7471a21ec
BLAKE2b-256 fe6d9dc8012c4ee9badd72edfb17d197e66fe3a1e401edd1bad4a45e9cb3f05d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pixel_canon-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pixel_canon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09bd11de5dd56ec971776d6f39b28cc7356b8a519778c1bbd7fca536504d2aa2
MD5 e9a05fd47a3c218d8c5a0d1054dc70bc
BLAKE2b-256 fad14b479d3af5eb1997e2cd4b3579e821993a80fe782379fe51eab61ec8f2d4

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