Nion Swift Plug-in Distribution Nion Swift Workshop Chris Meyer 2018 October 5 Nion Swift is software for integrating instrument control, data acquisition, organization, visualization, and analysis using Python.
Nion Swift Plug-in Distribution In this session, we will learn how to publish a plug-in for Nion Swift on PyPI and Anaconda distribution sites.
Nion Swift Plug-in Distribution In this talk you'll learn about: Structuring your plug-in for distribution and testing. How the Python packaging infrastructure works. How to publish to PyPI and Anaconda.
Nion Swift Plug-in Distribution Run Scripts Run Scripts - no layout needed ● Run Scripts - subdirectory named scripts ● Run Scripts - may provided "automatic" scripts in the future ●
Nion Swift Plug-in Distribution Nion Swift plug-in packages Plug-in - specific folder structure required ● Plug-in - naming conventions ● Plug-in - name unique on PyPI ● Plug-in - split into libraries and nionswift_plugin ● ● Plug-in - include documentation for readthedocs.io ● Plug-in - include continuous integration config (CI / Travis) Plug-in - include conda release config ● Plug-in - include test suites ●
Nion Swift Plug-in Distribution Nion Swift plug-in packages Recommended Basic Files Optional Files CHANGES.rst .travis.yml README.rst meta.yaml LICENSE requirements.txt setup.py test-requirements.txt samplelib/__init__.py samplelib/test/samplelib_test.py nionswift_plugin/sample/__init__.py docs/conf.py docs/index.rst
Nion Swift Plug-in Distribution Nion Swift plug-in packages Use the sample package here as starting point: https://github.com/nion-software/nionswift-plugin-sample
Nion Swift Plug-in Distribution Installation Options Local install (easy) ● ○ pip install -e . ● Install from zip file or tar/gz file (easy) ○ No automatic updates ● Install from PyPI (moderate) Automatic updates ○ Install from Anaconda (difficult) ● May eventually win you inclusion in conda ○ ○ Use conda-forge if possible (but not Nion Swift yet!)
Nion Swift Plug-in Distribution Tour of GitHub Tour of GitLab
Nion Swift Plug-in Distribution Tour of Travis
Nion Swift Plug-in Distribution Tour of PyPI
Nion Swift Plug-in Distribution Tour of Anaconda Cloud Tour of conda-forge
Nion Swift Plug-in Distribution Versioning Several versioning styles ● Semantic versioning ● ○ https://semver.org/ Calendar versioning ● ○ https://calver.org/
Nion Swift Plug-in Distribution Duties as a maintainer Keep version up to date with Nion Swift releases ● Respond to bugs and feature requests ● Implement a test suite ● Write documentation ● ● Maintain build system ● Consider sharing your source code with Nion
Nion Swift Plug-in Distribution In this talk you've learned: Structuring your plug-in for distribution and testing. How the Python packaging infrastructure works. How to publish to PyPI and Anaconda.
Recommend
More recommend