Skip to main content

Summary

pysto are a few miscellaneous processing python functions.

The name is a play of words on “pisto”, a Manchego dish made of tomatoes, onions, courgettes, green and red peppers and olive oil.

User instructions

Installing pysto with pip

  1. Simply run from your local environment or whole system

    pip install pysto

Installing pysto from the cloned github repository

  1. Clone the pysto repository

    git clone https://github.com/rcasero/pysto.git
  2. Activate the local environment of the other project, or you can also work without a local environment. For example, to activate a local conda environment called “myproject”

    source activate myproject
  3. Install pysto from the pysto root directory (note that if you are installing it system-wide, you may need to run the command as root)

    cd pysto
    pip install .

Uninstalling pysto

  1. Uninstall the package

    pip uninstall pysto

Developer instructions

Install pysto project for development

  1. Clone the pysto repository

    git clone https://github.com/rcasero/pysto.git
  2. Run install_dependencies.sh to install development tools, create local environments for python 2.7 and 3.6, and install python dependencies. pysto depends on SimpleITK, and there are two options:

    1. Install the official SimpleITK package

      cd pysto
      ./install_dependencies.sh
    2. Build and install SimpleElastix, which is an extension of SimpleITK

      cd pysto
      ./install_dependencies.sh SimpleElastix

Developing source code for pysto

  1. Activate one of the pysto local environments

    source activate pysto_3.6
  2. If you are making changes to the code, you want your python environment to import the code you are working with in ~/Software/pysto, not the package installed in your local conda environment. Thus, add the project’s source directory to PYTHONPATH

    export PYTHONPATH=~/Software/pysto:$PYTHONPATH
  3. Launch the development IDE, e.g.

    spyder&
  4. In your code, import the pysto modules/functions in the usual way, e.g.

    import pysto.imgproc as pymg
    [...]
    imf = pymg.imfuse(im1, im2)
  5. While developing, you can run all tests (both for python 2.7 and 3.6) from the command line with

    make test
  6. You need to have a local file ~/.pypirc (replace <the password> by the password). This will be used by twine to release packages to PyPI

    [distutils]
    index-servers =
      pypi
      pypitest
    
    [pypi]
    username=rcasero
    password=<the password>
    
    [pypitest]
    repository = https://test.pypi.org/legacy/
    username=rcasero
    password=<the password>
  7. Protect the file so that it can be read only by you

    chmod 600 ~/.pypirc

Uninstalling pysto

  1. Uninstall the package

    pip uninstall pysto

Releasing a new version of pysto to PyPI

We provide a Makefile to simplify testing and releasing.

  1. Run tests to make sure nothing obvious got broken

    make test
  2. Commit and push all the code that should go in the release to github.

  3. Update setup.py with release version, any new dependencies, the new download URL, changes to the description…

    from setuptools import setup, find_packages
    
    setup(
        name='pysto',
        version='1.0.0',
        download_url = 'https://github.com/rcasero/pysto/archive/1.0.0.tar.gz',
        packages=find_packages(),
        python_requires='>=3.6',
        install_requires=['matplotlib>=2.0','numpy>=1.13','opencv-python>=3.3.0'],
        description='Miscellanea image processing functions',
        url='https://github.com/rcasero/pysto',
        author='Ramón Casero',
        author_email='rcasero@gmail.com',
        license='GPL v3',
    )
  4. Update ChangeLog.md with the main changes to this release. For example,

    ## v1.0.0
    ### Added
    
    - imgproc.matchHist(): "Modify image intensities to match the
      histogram of a reference image" by
      [rcasero](https://github.com/rcasero)
    - imgproc.imfuse(): "Composite of two images" by
      [rcasero](https://github.com/rcasero)
    - testdata/*.png: Stereo cloud images with ROI masks (left_mask.png,
      left.png, right_mask.png, right.png) by
      [rcasero](https://github.com/rcasero)
  5. Tag the release in github, create the package/wheel and upload to the test PyPI server

    make test-package
  6. You should be able to see your package in

    https://test.pypi.org/project/pysto/
  7. If everything goes well, upload to PyPI Live

    make package
  8. You should be able to see your package in

    https://pypi.org/project/pysto/

Metadata

Release files for pysto 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysto 1.4.1
File Size Uploaded
pysto-1.4.1.tar.gz 12.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysto 1.4.1
File Interpreter ABI Platform
pysto-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / pysto-1.4.1.tar.gz

Download URL pysto-1.4.1.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
804e98d2af630aa520bccd91af919f0c622116c198229cbac2b12edbd90baa43
BLAKE2b-256 checksum
How to use checksums
19e5d5e76bb4ecf308e9575d5ecd35173078e2ca20410335258e6ad9ae4e6ca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pysto-1.4.1-py3-none-any.whl

Download URL pysto-1.4.1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c59580b6aeca6ada515081d2b5beb789a25ea2852d976aefaee98104ebf0438b
BLAKE2b-256 checksum
How to use checksums
75a7552c5e1aafffa83f6089ba1a9fffa8f8a69295877551fcc89ff9adc88107
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page