Page 1 of 2

PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 6:18 am
by DaveL17
Starting to tinker with using PyCharm to manage changes to the GhostXML plugin on GitHub. I've created the link and have pushed a change no problem. I'm thinking that I can make changes to the code locally, copy the plugin file to my Indigo development environment for testing and then push when I'm happy.

Before I go too far down the rabbit hole, is anyone using this approach and are there any land mines I should look out for?

TIA,
Dave

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 8:54 am
by jay (support)
So, you're not developing and testing on the same Mac? I PROMISE YOU you'll want to change that with I7... :twisted:

But, yes, it should work fine.

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 9:27 am
by DaveL17
jay (support) wrote:
So, you're not developing and testing on the same Mac? I PROMISE YOU you'll want to change that with I7... :twisted:

But, yes, it should work fine.

Wow - I could've made that post clearer. :D

All development and testing is on the same Mac (MacBook Air, Mid 2013); I keep it all 100 percent separate from my production environment that runs my house (iMac Mid 2010.) All is Indigo 6.1.8 and Mavericks.

What I do is keep the file I'm working on in a development folder and separate from the main Indigo folder structure on the MacBook. When I want to test some code, I copy the plugin file to the Indigo plugins folder on the same machine and reload (thereby keeping a copy where PyCharm wants it to be.) I've found that PyCharm gets mad when projects move (i.e., getting moved from active plugins to disabled plugins in Indigo.) When I'm happy with the changes in my development environment, I copy them over to my production install to identify any remaining gremlins before pushing the changes out.

Thanks Jay!
Dave

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 9:35 am
by jay (support)
Here's how to deal with that: put a symlink in your Plugins folder that points to your development folder. That way PyCharm is happy because it's not actually moving around, but Indigo can still move the symlink around to enable/disable.

This is another technique you're really want to use in I7.

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 10:09 am
by kw123
...not developing and testing on the same Mac? I PROMISE YOU you'll want to change that with I7...


could you enlighten us a bit more..

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 10:56 am
by DaveL17
jay (support) wrote:
Here's how to deal with that: put a symlink in your Plugins folder that points to your development folder. That way PyCharm is happy because it's not actually moving around, but Indigo can still move the symlink around to enable/disable.

This is another technique you're really want to use in I7.

What a great idea. Glad I thought of it.

Oh, and the super secret preview version of I7 looks great by the way.

Thanks Jay,
Dave

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 10:59 am
by jay (support)
kw123 wrote:
...not developing and testing on the same Mac? I PROMISE YOU you'll want to change that with I7...


could you enlighten us a bit more..


All in good time... :twisted:

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 11:27 am
by DaveL17
Just to add a post for the permanent record. The easiest way (that I know of) to create symlinks is to do this:

Stop your Indigo server.

Open two finder folders.
(1) your development folder containing your *.indigoPlugin files,
(2) the Indigo Plugins (Disabled) folder.

Open a Terminal Shell, and type the following:

Code: Select all
ln -s

That's a lowercase 'L' and a space after the 's'.

Drag your Indigo plugin file and drop it on the Terminal, and then drag and drop the Plugins (Disabled) folder. Switch back to Terminal and hit Enter.

Repeat as needed for each file, and then restart your server.
Dave

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 2:59 pm
by jay (support)
LOL - I just type the paths, but your instructions are much more graphical!

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 3:20 pm
by DaveL17
And less susceptible to typing errors!


Sent from my iPhone using Tapatalk

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 5:40 pm
by durosity
jay (support) wrote:
All in good time... :twisted:


You’ve had plenty of time.. get on with it ;)

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 10:41 pm
by RogueProeliator
And less susceptible to typing errors!

I'm with Jay on this one... that sounds like a lot of extra windows and such - I'd be more likely to mess it all up! LOL And as far as typing errors, that is what Tab to complete the path in terminal is for! :-)

Re: PyCharm GitHub Integration

PostPosted: Fri May 06, 2016 10:44 pm
by RogueProeliator
So, you're not developing and testing on the same Mac? I PROMISE YOU you'll want to change that with I7...

I take back all the nice things I've said about Jay and support over the years after this comment... with the implications there, that was just mean! :-)

Re: PyCharm GitHub Integration

PostPosted: Sun Aug 06, 2017 12:56 pm
by DaveL17
I'm trying to go a little bit further down the integrated development path and am implementing PluginConfig.xml templates (which work great by the way) and wanted to use the following workflow:

Have 'master' template XML files -- template_foo.xml, template_bar.xml.
Create a symlink to the master template XML files that I would place in plugin packages.
Push the package to GitHub for distribution.

However, when I do this, it pushed the symlink and not the underlying template file contents. I've tried this with both PyCharm and GitKraken with similar results. Is this not possible? I can copy the templates to the plugin packages when I make changes, but it would be nice if I didn't have to do that.

Re: PyCharm GitHub Integration

PostPosted: Mon Aug 07, 2017 2:34 pm
by jay (support)
Hmmm. My first thought would be to use hard links (ln without the -s option) rather than symlinks (assuming everything is on the same disk). Hard links should be treated just like normal files by apps though they behave like symlinks in that either can be edited.

Another thought might be to use a git pre- and post- commit hook to do some trickeration with the files. I have no idea if that would work or not.

You might want to post the question on stackoverflow and see how others have solved the problem.