Skip to content
Rob Campbell edited this page Apr 8, 2020 · 10 revisions

This page covers issues a developer might run into when adding features and also guidelines for contributing.

Contribution guidelines

  • Lasagna adheres to PEP8 and commits should be passed through Black.
  • Class names are camel case.
  • Method names and variable names are snake case. You may mix snake and camel case in rare exceptions (e.g. because the snake case name becomes overly long).
  • Preference is for commits to go to development and only merge commits into master. Exceptions to this are things like modifications to the readme, changelog, or perhaps small bugfixes.
  • Please avoid creating a branch per feature in this repository. If you wish to do this, clone the repo, branch, make changes, then merge or pull request into development or perhaps master.

How to add a plugin directory

Say you want a new sub-menu under "Plugins" called "awesome_plugins" and you want to bundle these with Lasagna:

  • mkdir lasagna/lasagna/plugins/awesome_plugins
  • touch lasagna/lasagna/plugins/awesome_plugins/__init__.py
  • Add the new directory to pluginPaths in lasagna_prefs.yml
  • Add your plugin to the new directory. It should have a file name ending in _plugin.py

How to start the embedded console

lasagna -C

The Lasagna object is called tasty.

Examples

  • To change the z-spread in axis three you can do: tasty.view3Z_spinBox.setValue(2)

  • Access the PyQtGraph border viewBox property of the first axis: tasty.axes2D[0].view.getViewBox().border