Package: pysto
Summarypystoare 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 instructionsInstalling pysto with pipSimply run from your local environment or whole systempip install pystoInstalling pysto from the cloned github repositoryClone the pysto repositorygit clone https://github.com/rcasero/pysto.gitActivate 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 myprojectInstall 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 pystoUninstall the packagepip uninstall pystoDeveloper instructionsInstall pysto project for developmentClone the pysto repositorygit clone https://github.com/rcasero/pysto.gitRuninstall_dependencies.shto install development tools, create
local environments for python 2.7 and 3.6, and install python
dependencies.pystodepends on SimpleITK, and there are two
options:Install the official SimpleITK packagecd pysto
./install_dependencies.shBuild and install SimpleElastix, which is an extension of
SimpleITKcd pysto
./install_dependencies.sh SimpleElastixDeveloping source code for pystoActivate one of the pysto local environmentssource activate pysto_3.6If 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 toPYTHONPATHexport PYTHONPATH=~/Software/pysto:$PYTHONPATHLaunch the development IDE, e.g.spyder&In your code, import the pysto modules/functions in the usual way,
e.g.import pysto.imgproc as pymg
[...]
imf = pymg.imfuse(im1, im2)While developing, you can run all tests (both for python 2.7 and 3.6)
from the command line withmake testYou need to have a local file~/.pypirc(replace<the password>by the password). This will be used bytwineto 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>Protect the file so that it can be read only by youchmod 600 ~/.pypircUninstalling pystoUninstall the packagepip uninstall pystoReleasing a new version of pysto to PyPIWe provide aMakefileto simplify testing and releasing.Run tests to make sure nothing obvious got brokenmake testCommit and push all the code that should go in the release to github.Updatesetup.pywith 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',
)UpdateChangeLog.mdwith 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)Tag the release in github, create the package/wheel and upload to the
test PyPI servermake test-packageYou should be able to see your package inhttps://test.pypi.org/project/pysto/If everything goes well, upload to PyPI Livemake packageYou should be able to see your package inhttps://pypi.org/project/pysto/