Skip to main content

A library for image processing functions.

Project description

oct_analysis

A library for image processing functions.

Installation

pip install oct_analysis

Features

  • Read TIFF image files

Usage

import numpy as np
from oct_analysis import read_tiff

# Read a TIFF image
image = read_tiff('path/to/your/image.tiff')
print(f"Image shape: {image.shape}")

Development

Setup

  1. Clone the repository:
git clone https://github.com/yourusername/oct_analysis.git
cd oct_analysis
  1. Create a virtual environment and install development dependencies:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e ".[dev]"

Testing

Run tests with pytest:

pytest

Code Formatting and Linting

This project uses pre-commit hooks to ensure code quality. After installing the development dependencies, set up the pre-commit hooks:

pre-commit install

This will automatically format your code with Black and check it with Flake8 before each commit. You can also run the hooks manually:

pre-commit run --all-files

Building the package

python -m build

Documentation

This project uses Sphinx for documentation. To build the documentation locally:

cd docs
make html

The generated documentation will be available in docs/build/html/index.html.

ReadTheDocs Integration

The documentation is also configured to be built automatically on ReadTheDocs. To set it up:

  1. Push your code to GitHub
  2. Sign up for a ReadTheDocs account
  3. Import your repository on ReadTheDocs
  4. ReadTheDocs will automatically build and host the documentation

You can customize the build process by modifying .readthedocs.yml and the Sphinx configuration files in the docs directory.

CI/CD

This project uses GitHub Actions for:

  • Running tests on multiple Python versions
  • Linting the code
  • Building and publishing the package to PyPI when a new version tag is pushed

Creating Releases

The CI/CD pipeline is configured to automatically build and publish the package to PyPI when a new version tag is pushed to the repository. This process ensures that only properly versioned, tagged releases get published.

To create and publish a new release:

  1. Update the version number in setup.py
  2. Commit your changes:
    git add setup.py
    git commit -m "Bump version to x.y.z"
    
  3. Create a new version tag (tag name must start with "v"):
    git tag vx.y.z
    
  4. Push the tag to GitHub:
    git push origin vx.y.z
    

Once the tag is pushed, GitHub Actions will:

  1. Run all tests on multiple Python versions
  2. If tests pass, build the package
  3. Publish the package to PyPI using the configured PyPI API token

Note: Make sure you've added a PYPI_API_TOKEN secret to your GitHub repository settings under "Settings > Secrets and Variables > Actions" before triggering a release.

License

MIT License

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

oct_analysis-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

oct_analysis-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for oct_analysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6aecd14a48f2d4a7080bbe7b3390b6b9661a3386b641ee6b9d983463e0914ebe
MD5 ff8a084a7182cf5094c8a6f76816e622
BLAKE2b-256 b6431d5dc7855578726d23cc8e75a8d94d34c76bce5d6a3d95a8635489a2ea1b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for oct_analysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b25e21d2cb7bea0df13ac4215f90c7bb6c2700f5631aeddcb92688c60ad711cc
MD5 77dfb594449303de2f8a87a2c75334ce
BLAKE2b-256 fc78cf22687cd3595868e578d710082fc0220a970c254c707c0e99b77638fc11

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