Skip to content

RyanHartzell/imagepypelines_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imagepypelines_template

How to make an ImagePypelines Plugin

  1. clone this project
  2. rename the 'imagepypelines_template' directories to the name of your project
  3. edit the DIRECTORY_NAME and NAME variables in setup.py
  4. Put a license in the LICENSE file
  5. Add the names of dependencies you need (e.g. numpy or scipy) in requirements.txt
    • each dependency should be it's own line
    • you can optionally specify the version you need as well
    • e.g. numpy>=1.14
  6. If you need to ship data with your project (for examples or tests):
    • Put your files in the data directory. It will be automatically included

      when you package your plugin

    • see __init.__.py for examples on how to fetch the filenames at runtime
  7. Start coding!
    • place your code files in code directory
  8. Import your code in __init__.py
    • some examples are listed in __init__.py to help you get started
  9. run pip install -e . to install your plugin!
    • the -e installs your plugin in editable mode (This allows your source code changes to be reflected in the installed library)
  10. Test an import with imagepypelines!
    • `python -c "import imagepypelines as ip; ip.require('<your_plugin_name>')"`

How to upload your plugin to pypi so other people can install it with pip

Note: This is a super quick guide, for more help see https://packaging.python.org/tutorials/packaging-projects/

1. install some quick dependencies `pip install twine wheel`

2. create the necessary dists using setup.py `python setup.py sdist bdist_wheel`

3. if everything worked, then upload it to pypi! `twine upload dist/*`

4. You can then install it using pip! `pip install <your_plugin_name>`

Other information

If you need help working with rst files, please see this helpful guide https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html

About

The official imagepypelines plugin template repository. Simply fork and play!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages