PyCharm GitHub Integration

Posted on
Fri May 06, 2016 6:18 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

PyCharm GitHub Integration

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 06, 2016 8:54 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: PyCharm GitHub Integration

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri May 06, 2016 9:27 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: PyCharm GitHub Integration

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 06, 2016 9:35 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: PyCharm GitHub Integration

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri May 06, 2016 10:09 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: PyCharm GitHub Integration

...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..

Posted on
Fri May 06, 2016 10:56 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: PyCharm GitHub Integration

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 06, 2016 10:59 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: PyCharm GitHub Integration

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:

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri May 06, 2016 11:27 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: PyCharm GitHub Integration

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 06, 2016 2:59 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: PyCharm GitHub Integration

LOL - I just type the paths, but your instructions are much more graphical!

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri May 06, 2016 3:20 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: PyCharm GitHub Integration

And less susceptible to typing errors!


Sent from my iPhone using Tapatalk

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 06, 2016 5:40 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: PyCharm GitHub Integration

jay (support) wrote:
All in good time... :twisted:


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

Computer says no.

Posted on
Fri May 06, 2016 10:41 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: PyCharm GitHub Integration

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! :-)

Posted on
Fri May 06, 2016 10:44 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: PyCharm GitHub Integration

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! :-)

Posted on
Sun Aug 06, 2017 12:56 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: PyCharm GitHub Integration

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.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Aug 07, 2017 2:34 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: PyCharm GitHub Integration

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 5 guests