A Python Ocean Particle Image Analysis toolbox.
Project description
PyOpia
A Python Ocean Particle Image Analysis toolbox
Documentation:
Current status:
- Under development. See/regester issues, here
Development targets for PyOpia:
- Allow nonfamiliar users to install and use PyOpia, and to contribute & commit code changes
- Not hardware specific
- Smaller dependency list than PySilCam -Eventual optional dependencies (e.g. for classification)
- Can be imported by pysilcam or other hardware-specific tools
- Work on a single-image basis (...primarily, with options for multiprocess to be considered later)
- No use of settings/config files within the core code - pass arguments directly. Eventual use of settings/config files should be handled by high-level wrappers that provide arguments to functions.
- Github workflows
- Tests
Normal functions within PyOpia should:
- take inputs
- return new outputs
- don't modify state of input
- minimum possible disc IO during processing
Contributions
We welcome additions and improvements to the code! We request that you follow a few guidelines. These are in place to make sure the code improves over time.
- All code changes must be submitted as pull requests, either from a branch or a fork.
- Good documentation of the code is needed for PyOpia to succeed and so please include up-to-date docstrings as you make changes, so that the auto-build on readthedocs is complete and useful for users. (A version of the new docs will complie when you make a pull request and a link to this can be found in the pull request checks)
- All pull requests are required to pass all tests before merging. Please do not disable or remove tests just to make your branch pass the pull request.
- All pull requests must be reviewed by a person. The benefits from code review are plenty, but we like to emphasise that code reviews help spreading the awarenes of code changes. Please note that code reviews should be a pleasant experience, so be plesant, polite and remember that there is a human being with good intentions on the other side of the screen.
- All contributions are linted with flake8. We recommend that you run flake8 on your code while developing to fix any issues as you go. We recommend using autopep8 to autoformat your Python code (but please check the code behaviour is not affected by autoformatting before pushing). This makes flake8 happy, and makes it easier for us all to maintain a consistent and readable code base.
Docstrings
Use the NumPy style in docstrings. See style guide here
Installing
For users
Users are expected to be familiar with Python. Please refer to the recommended installation instructions provided on the documentation pages, here
For developers from source
Install Python version 3.10.
A prompt such as is provided by the miniforge installation may be used for the following:
- Navigate to the folder where you want to install pyopia using the 'cd' command.
If you use git: Download repository from github, and move into the new directory:
git clone https://github.com/SINTEF/pyopia.git
cd pyopia
For the next steps, you need to be located in the directory that contains the file 'environment.yml'.
- (optional, but recommended) Create a virtual environment using the environment.yml. This will create an environment called pyopia, but with no dependencies installed. Dependencies are managed by poetry (in step 2):
conda env create -f environment.yml
and activate the environment:
conda activate pyopia
- Install dependencies using poetry:
poetry install
Optional dependecies (for classification), can be installed like this:
poetry install --extras "classification"
or for arm/silicon systems:
poetry install --extras "classification-arm64"
Note: If poetry spends ages resolving dependencies, you can install a development environment with pip, like this: pip install -e ".[classification]"
or for arm/silicon: pip install -e ".[classification-arm64]"
- (optional) Run local tests:
poetry run pytest
Version numbering
The version number of PyOPIA is split into three sections: MAJOR.MINOR.PATCH
- MAJOR: Changes in high-level pipeline use and/or data output that are not backwards-compatible.
- MINOR: New features that are backwards-compatible.
- PATCH: Backwards-compatible bug fixes or enhancements to existing functionality
Build docs locally
sphinx-apidoc -f -o docs/source docs/build --separate
sphinx-build -b html ./docs/ ./docs/build
License
PyOpia is licensed under the BSD3 license. See LICENSE. All contributors should be recognised & aknowledged.
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
File details
Details for the file pyopia-2.8.2.tar.gz
.
File metadata
- Download URL: pyopia-2.8.2.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d76abe54e23f9a621a407a22128bf77a506cb5433932cb8d8888e72b4b011eaa |
|
MD5 | 8ec974201d739d69b318d58b3a078fd1 |
|
BLAKE2b-256 | 3e6ca1a23ebaed2cb35b3c700e8584ead4e8c696ec949ea29f57024eaabb6ce0 |
Provenance
The following attestation bundles were made for pyopia-2.8.2.tar.gz
:
Publisher:
pypi.yml
on SINTEF/pyopia
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyopia-2.8.2.tar.gz
- Subject digest:
d76abe54e23f9a621a407a22128bf77a506cb5433932cb8d8888e72b4b011eaa
- Sigstore transparency entry: 146377677
- Sigstore integration time:
- Predicate type:
File details
Details for the file pyopia-2.8.2-py3-none-any.whl
.
File metadata
- Download URL: pyopia-2.8.2-py3-none-any.whl
- Upload date:
- Size: 62.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 130d45e40a1ea035ca08ad5ddf3d0291781d5a874be01b07286cff6c3929f054 |
|
MD5 | 90359da74a9a566da0544afba67c75dd |
|
BLAKE2b-256 | 02694f9ff9b9d4021f2388abec4df0369fe1c47cd2a6d933d2a605afa7c84783 |
Provenance
The following attestation bundles were made for pyopia-2.8.2-py3-none-any.whl
:
Publisher:
pypi.yml
on SINTEF/pyopia
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyopia-2.8.2-py3-none-any.whl
- Subject digest:
130d45e40a1ea035ca08ad5ddf3d0291781d5a874be01b07286cff6c3929f054
- Sigstore transparency entry: 146377679
- Sigstore integration time:
- Predicate type: