Zynthian PyCharm Config

From ZynthianWiki
Revision as of 19:27, 1 August 2018 by Wyleu (talk | contribs)
Jump to navigation Jump to search

1 Context

Zynthian

The Zynthianis a synthesizer system using various linux engines. It runs on a raspberry pi 3 with various configurable control and interface options which are configured via a web interface. It's default hostname is available via avahi as zynthian.local the default password is raspberry and is run as root. This example will however operate against a zynthian with a host name of zynthian-nord. Cos that's what I've got.

PyCharm

PyCharm is an interactive development environment (IDE) from JetBrains that allows easy development of python code within projects. Many tasks are presented simply and efficiently to ease the development process. A paid version (Professional) is available which also offers various additions including the ability to deploy and debug to a remote server which in this case will be the Zynthian raspberry pi.

Git Hub

The Zynthian site at github is where the zynthian repository is maintained. It has a modular structure and this needs to be accommodated within the PyCharm environment. It is also wise to fork this if you intend to do development as we have a benevolent dictatorship operated from a roof top in Barcelona :-)


2 Acquiring the code

The best way to build a zynthian is using the Images. In some ways this is different from the normal approach to development as we will assume you have a working zynthian and have used the upgrade facility in the admin section or the update function in the Web Interface


The Zynthian webconf software Update feature.


Webconf-software-Update.png


Notice that the various zynthian code components are displayed along with the branch name and latest commit hash. A Very helpful sanity check in a world of chaos.

Make sure you have a working zynthian first ...


3 Setting up Pycharm

Create a new, blank PyCharm project.

Call it Zynthian.

Go to VCS->Checkout from Version Control->Git.

Use the GitHub URL for the given “repositoryname” and use the directory PyCharmProjects/Zynthian/repositoryname.

When you Click Clone, it will ask you “Would you like to open the directory …/PyCharmProjects/Zynthian/repositoryname?” Click Yes.

Then it will ask you “How would you like to open the project?” Select “Open in current window” and check “Add to currently opened projects”.

When you click “Okay” it will add it as a sub-project to Zynthian. You will see it in Bold letters. If it is not bolded, something went wrong somehwere.

Go into Settings->Version Control->Ignored Files. Make sure to add repositoryname/.idea folder to the list.

If you go to Settings->Version Control, you should see a list of all repositories that have been added and they all should say “Git”.

Pycharm-zynth-projects1.png