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.
-
Navigate to this directory:
cd path/to/pixel-canon/python
-
Create a virtual environment:
python -m venv .venv
-
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
- Windows (Command Prompt, cmd.exe):
-
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.
-
Install build tools:
pip install build twine
-
Clean up previous builds (optional but recommended):
rm -rf build dist pixel_canon.egg-info
-
Build the package: This command creates the
dist/directory with a wheel (.whl) and a source archive (.tar.gz).python -m build
-
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/*
- For username, enter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8be92556c1e0f19b659d5c87d2a72bb0ef865e8794d4c91c75ec1212d487ad5
|
|
| MD5 |
4c9cd520fc67f7ff5bd8bbf7471a21ec
|
|
| BLAKE2b-256 |
fe6d9dc8012c4ee9badd72edfb17d197e66fe3a1e401edd1bad4a45e9cb3f05d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09bd11de5dd56ec971776d6f39b28cc7356b8a519778c1bbd7fca536504d2aa2
|
|
| MD5 |
e9a05fd47a3c218d8c5a0d1054dc70bc
|
|
| BLAKE2b-256 |
fad14b479d3af5eb1997e2cd4b3579e821993a80fe782379fe51eab61ec8f2d4
|