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
- Clone the repository:
git clone https://github.com/yourusername/oct_analysis.git
cd oct_analysis
- 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:
- Push your code to GitHub
- Sign up for a ReadTheDocs account
- Import your repository on ReadTheDocs
- 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:
- Update the version number in
setup.py - Commit your changes:
git add setup.py git commit -m "Bump version to x.y.z"
- Create a new version tag (tag name must start with "v"):
git tag vx.y.z
- Push the tag to GitHub:
git push origin vx.y.z
Once the tag is pushed, GitHub Actions will:
- Run all tests on multiple Python versions
- If tests pass, build the package
- 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
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 oct_analysis-0.1.1.tar.gz.
File metadata
- Download URL: oct_analysis-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49a3949be91b8adb5144c3c2033591eed12ca3c67711f053d0a69322c740e2e1
|
|
| MD5 |
a0ae0626b423d0cfa6baf50704cba71c
|
|
| BLAKE2b-256 |
61efa7a1d65dec41f4ba4c605f4c7ae75e43349156a5bbf2a553efd3355e8951
|
File details
Details for the file oct_analysis-0.1.1-py3-none-any.whl.
File metadata
- Download URL: oct_analysis-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acee37211312df404614d53f1cdaa2bc81a35e5b918d9a780ed22fa9abc831a3
|
|
| MD5 |
aa9c0d936f9a234a0245b858aa458ed6
|
|
| BLAKE2b-256 |
b59cf511e99586a76967cc51dd5b8f0377202b42f93018f457c9b7a95c4db06f
|