Changes

Jump to navigation Jump to search
Line 73: Line 73:     
PyCharm handles remote file systems with the deployment feature this is one of the features that is only in the paid edition. Such is marketing . . .
 
PyCharm handles remote file systems with the deployment feature this is one of the features that is only in the paid edition. Such is marketing . . .
You define a relationship between the local file structure on the local machine and a file structure on the remote machine which in our case will be maintained over ssh. You can set it up so that files that are changed in the local environment where you would edit, are auto-majically copied to the remote directory. Also you can used the Right Hand click on a Project object (file, directory or whole project)  
+
You define a relationship between the local file structure on the local machine and a file structure on the remote machine which in our case will be maintained over ssh. You can set it up so that files that are changed in the local environment where you would edit, are auto-majically copied to the remote directory. Also you can used the Right Hand click on a Project object (file, directory or whole project).
 +
 
 +
[[File:Pycharm Projects.png]]
 +
 
 +
This allows a pretty fine granularity of deployment and copying both ways which is handy.
 +
 
 +
To set it up we have to venture into the wonderful world of PyCharm settings [File | Settings...| Build Execution Deployment | Deployment]
 +
 
 +
[[File:Pycharm-zynth-Deployment-setup.png]]
 +
 
 +
'''Connection Tab'''
 +
 
 +
''Name''
 +
 
 +
The first thing to do is come up with a decent name for this deployment instance. The reason being you will pick this definition up in other functions and it's very easy to get confused with exactly which configuration you are relating to which.
 +
 
 +
''Type''
 +
 
 +
Choose SFTP
 +
 
 +
''SFTP host''
 +
 
 +
Use the zynthian local name you have chosen in the webconf (avoid IP addresses at all costs that way lies madness)
 +
so zynthian.local
 +
 
 +
''Port''
 +
 
 +
Leave at 22
 +
 
 +
''Root Path ''
 +
 
 +
I'm finding leaving this as / avoids all kinds of involved directory mappings at a later date.
 +
 
 +
''User name''
 +
 
 +
root in the zynthian world.
 +
 
 +
The rest are pretty self explanatory . . .
 +
 
 +
'''Mapping Tab'''
 +
 
 +
[[File:Pycharm-zynthian-deployment-settings=mapping.png]]
 +
 
 +
''Local path''
 +
 
 +
This points to the root of the local file structure.
 +
 
 +
''Deployment path on ....''
 +
 
 +
The Deployment location on the remote device relative to the root we defined in the Connection tab.
 +
 
 +
''Web Path on ....''
 +
 
 +
Just put in /
 +
 
 +
This gives you a deployment mapping and if you return to the connections tab you can test the connection. Make sure this works before you go any further.
 +
 
 +
 
 +
 
 +
 
    
The trick with the remote debug is to define a remote Interpreter.
 
The trick with the remote debug is to define a remote Interpreter.
584

edits

Navigation menu