Symlink to plugin

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Symlink to plugin

Jon Schewe
I'm doing some development of a custom report and I wanted to keep the development code out of my .gramps directory. So I put a symlink from .gramps/gramps42/plugins/foo to my development directory. However I don't see my report. If I move the directory there, then I do. Is there a way to have gramps recognize symlinks?

Jon


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

manzi.sam
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

manzi.sam
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

Jon Schewe
Thanks. That will make isolating development from production easier.

On Wed, Jun 1, 2016 at 2:14 AM, Sam Manzi <[hidden email]> wrote:
Jon,

I'm wrong, tested this on my forked Gramps master and forgot I had applied the following to line 106 to make it follow symlinks when I ran into the same issue! I'll submit a patch in the next few days.

To correct this find the file:
https://github.com/gramps-project/gramps/blob/master/gramps/gen/plug/_manager.py
find:
for (dirpath, dirnames, filenames) in os.walk(direct):

Change it to:
for (dirpath, dirnames, filenames) in os.walk(direct, followlinks=True):


-
Sam

Enable "followlinks=True" to follow Symlinks for plugins
https://docs.python.org/3/library/os.html#os.walk




On 1 June 2016 at 12:05, Sam Manzi <[hidden email]> wrote:
Jon,

Works for me as per[1] on Ubuntu 14.04

Only catch I can think of is that you have Gramps running while the link was made if so, closing and restarting Gramps should reload the Addon.

-
Sam

[1] https://gramps-project.org/wiki/index.php?title=Addons_development#Test_your_addon_as_you_develop

On 1 June 2016 at 11:18, Jon Schewe <[hidden email]> wrote:
I'm doing some development of a custom report and I wanted to keep the development code out of my .gramps directory. So I put a symlink from .gramps/gramps42/plugins/foo to my development directory. However I don't see my report. If I move the directory there, then I do. Is there a way to have gramps recognize symlinks?

Jon


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel






--

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

Nick Hall
In reply to this post by manzi.sam
On 01/06/16 08:14, Sam Manzi wrote:

> I'm wrong, tested this on my forked Gramps master and forgot I had
> applied the following to line 106 to make it follow symlinks when I
> ran into the same issue! I'll submit a patch in the next few days.
>
> To correct this find the file:
> https://github.com/gramps-project/gramps/blob/master/gramps/gen/plug/_manager.py
> find:
> for (dirpath, dirnames, filenames) in os.walk(direct):
>
> Change it to:
> for (dirpath, dirnames, filenames) in os.walk(direct, followlinks=True):
>
>

This functionality was added and then removed in the following commits:

d23721d Allow plugin manager to follow links
e80f108 Removed walking of links

See the following thread:

[Gramps-devel] follow links
https://sourceforge.net/p/gramps/mailman/message/23922339/

However, we no longer support the version of python that caused the error.


Nick.


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Fwd: Symlink to plugin

prculley

Funny; the Addons development wiki has had instructions to use a link for this for a long time now.  I guess no-one ever actually tested this...
 https://gramps-project.org/wiki/index.php?title=Addons_development_old#Test_your_addon_as_you_develop

On Wed, Jun 1, 2016 at 6:58 AM, Nick Hall <[hidden email]> wrote:
On 01/06/16 08:14, Sam Manzi wrote:
> I'm wrong, tested this on my forked Gramps master and forgot I had
> applied the following to line 106 to make it follow symlinks when I
> ran into the same issue! I'll submit a patch in the next few days.
>
> To correct this find the file:
> https://github.com/gramps-project/gramps/blob/master/gramps/gen/plug/_manager.py
> find:
> for (dirpath, dirnames, filenames) in os.walk(direct):
>
> Change it to:
> for (dirpath, dirnames, filenames) in os.walk(direct, followlinks=True):
>
>

This functionality was added and then removed in the following commits:

d23721d Allow plugin manager to follow links
e80f108 Removed walking of links

See the following thread:

[Gramps-devel] follow links
https://sourceforge.net/p/gramps/mailman/message/23922339/

However, we no longer support the version of python that caused the error.


Nick.


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Symlink to plugin

Nick Hall
On 01/06/16 14:24, Paul Culley wrote:
> Funny; the Addons development wiki has had instructions to use a link
> for this for a long time now.  I guess no-one ever actually tested this...
> https://gramps-project.org/wiki/index.php?title=Addons_development_old#Test_your_addon_as_you_develop
>

The documentation is correct.  The root plugin directory can be a
symlink, but links are not followed in the subdirectories.


Nick.


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

manzi.sam
In reply to this post by Nick Hall
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

Jon Schewe


On Wed, Jun 1, 2016 at 7:15 PM, Sam Manzi <[hidden email]> wrote:
Hi Nick,

On 1 June 2016 at 21:58, Nick Hall <[hidden email]> wrote:
This functionality was added and then removed in the following commits:

d23721d Allow plugin manager to follow links
e80f108 Removed walking of links

See the following thread:

[Gramps-devel] follow links
https://sourceforge.net/p/gramps/mailman/message/23922339/


Thanks very interesting, did find that previously!
 
However, we no longer support the version of python that caused the error.

So should the patch be reverted?

Or some other variation eg:
* Only enable that option if debug is running?
* Or should I update the wiki and mention the line to patch?


So what's the decision on this? The wiki still says to symlink only the add-on, but that doesn't work. I just tested it again on maintenance/gramps42 SHA e74dc2fa8.

 



--

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

Nick Hall
On 19/11/17 14:23, Jon Schewe wrote:
> So what's the decision on this? The wiki still says to symlink only
> the add-on, but that doesn't work. I just tested it again on
> maintenance/gramps42 SHA e74dc2fa8.
>
The latest version of the wiki contains an error.  The documentation for
v4.1 was correct.

Use:

ln -s ~/addons-source ~/.gramps/gramps42/plugins

We could consider following symlinks again in master.  Opinions?

Nick.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

Jon Schewe


On Sun, Nov 19, 2017 at 9:12 AM, Nick Hall <[hidden email]> wrote:
On 19/11/17 14:23, Jon Schewe wrote:
So what's the decision on this? The wiki still says to symlink only the add-on, but that doesn't work. I just tested it again on maintenance/gramps42 SHA e74dc2fa8.

The latest version of the wiki contains an error.  The documentation for v4.1 was correct.

Use:

ln -s ~/addons-source ~/.gramps/gramps42/plugins


The problem with that is then I effectively have all of the plugins installed weather I want them or not.
 
We could consider following symlinks again in master.  Opinions?

To me following symlinks seems like a good idea. However I'm assuming that someone had a good reason for removing that capability in the first place. Perhaps if I heard that I would have a different opinion.


--

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Symlink to plugin

Nick Hall
On 21/11/17 02:55, Jon Schewe wrote:
We could consider following symlinks again in master.  Opinions?

To me following symlinks seems like a good idea. However I'm assuming that someone had a good reason for removing that capability in the first place. Perhaps if I heard that I would have a different opinion.


Here is a link to the thread containing the original discussion:

https://sourceforge.net/p/gramps/mailman/message/23922339/

Loading all addons into my development environment has never caused a problem.

Nick.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel