Re: [galaxy-dev] galaxy citation_url setting

2011-11-03 Thread Shantanu Pavgi

On Nov 3, 2011, at 8:36 AM, Nate Coraor wrote:

Shantanu Pavgi wrote:

On Nov 2, 2011, at 3:39 PM, Nate Coraor wrote:

Shantanu Pavgi wrote:

Hi,

It seems like modification of 'citation_url'  in the universe_wsgi.ini config 
file has no effect in the UI (Help --> How to Cite Galaxy). Is it something 
hard-coded in the source?

Hi Shantanu,

Whoops.  This has been fixed in 6205:9a9479f7e53f.



Thanks Nate. I was wondering if 'lib/galaxy/config.py' file needs to be 
modified as well.

{{{
$ hg diff ./lib/galaxy/config.py
diff -r 9e90faf2cb1c lib/galaxy/config.py
--- a/lib/galaxy/config.py Wed Nov 02 14:15:08 2011 -0700
+++ b/lib/galaxy/config.py Wed Nov 02 16:46:08 2011 -0500
@@ -113,6 +113,7 @@
self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', 
"wormbase,tair,modencode_worm,modencode_fly,sgd_yeast" ).lower().split(",")
self.genetrack_display_sites = kwargs.get( 'genetrack_display_sites', 
"main,test" ).lower().split(",")
self.brand = kwargs.get( 'brand', None )
+   self.citation_url = kwargs.get('citation_url', 
'http://wiki.g2.bx.psu.edu/Citing%20Galaxy')
self.support_url = kwargs.get( 'support_url', 
'http://wiki.g2.bx.psu.edu/Support' )
self.wiki_url = kwargs.get( 'wiki_url', 'http://g2.trac.bx.psu.edu/' )
self.blog_url = kwargs.get( 'blog_url', None )

}}}

Also, it seems like the default values are being passed twice here - in the 
mako templates and initialization method of Configuration class. I was 
wondering if default values can be passed only once during initialization and 
then other get methods would only query the necessary configuration option.   I 
don't know all the code in detail, so I might be wrong here.

The template is using Config's get() method, which allows for a default
if the option is not in the kwargs passed to Config.__init__().  It's a
shorthand we've used for config options that are only used in one place
in the code.

--nate



Thanks for explaining it Nate. That's helpful.

--
Shantanu.


___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Re: [galaxy-dev] galaxy citation_url setting

2011-11-03 Thread Nate Coraor
Shantanu Pavgi wrote:
> 
> On Nov 2, 2011, at 3:39 PM, Nate Coraor wrote:
> 
> > Shantanu Pavgi wrote:
> >> 
> >> Hi,
> >> 
> >> It seems like modification of 'citation_url'  in the universe_wsgi.ini 
> >> config file has no effect in the UI (Help --> How to Cite Galaxy). Is it 
> >> something hard-coded in the source? 
> > 
> > Hi Shantanu,
> > 
> > Whoops.  This has been fixed in 6205:9a9479f7e53f.
> > 
> 
> 
> Thanks Nate. I was wondering if 'lib/galaxy/config.py' file needs to be 
> modified as well. 
> 
> {{{
> $ hg diff ./lib/galaxy/config.py
> diff -r 9e90faf2cb1c lib/galaxy/config.py
> --- a/lib/galaxy/config.pyWed Nov 02 14:15:08 2011 -0700
> +++ b/lib/galaxy/config.pyWed Nov 02 16:46:08 2011 -0500
> @@ -113,6 +113,7 @@
>  self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', 
> "wormbase,tair,modencode_worm,modencode_fly,sgd_yeast" ).lower().split(",")
>  self.genetrack_display_sites = kwargs.get( 
> 'genetrack_display_sites', "main,test" ).lower().split(",")
>  self.brand = kwargs.get( 'brand', None )
> +   self.citation_url = kwargs.get('citation_url', 
> 'http://wiki.g2.bx.psu.edu/Citing%20Galaxy')
>  self.support_url = kwargs.get( 'support_url', 
> 'http://wiki.g2.bx.psu.edu/Support' )
>  self.wiki_url = kwargs.get( 'wiki_url', 'http://g2.trac.bx.psu.edu/' 
> )
>  self.blog_url = kwargs.get( 'blog_url', None )
> 
> }}}
> 
> Also, it seems like the default values are being passed twice here - in the 
> mako templates and initialization method of Configuration class. I was 
> wondering if default values can be passed only once during initialization and 
> then other get methods would only query the necessary configuration option.   
> I don't know all the code in detail, so I might be wrong here. 

The template is using Config's get() method, which allows for a default
if the option is not in the kwargs passed to Config.__init__().  It's a
shorthand we've used for config options that are only used in one place
in the code.

--nate

> 
> --
> Shantanu. 
> 
> 
> 
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


Re: [galaxy-dev] galaxy citation_url setting

2011-11-02 Thread Shantanu Pavgi

On Nov 2, 2011, at 3:39 PM, Nate Coraor wrote:

> Shantanu Pavgi wrote:
>> 
>> Hi,
>> 
>> It seems like modification of 'citation_url'  in the universe_wsgi.ini 
>> config file has no effect in the UI (Help --> How to Cite Galaxy). Is it 
>> something hard-coded in the source? 
> 
> Hi Shantanu,
> 
> Whoops.  This has been fixed in 6205:9a9479f7e53f.
> 


Thanks Nate. I was wondering if 'lib/galaxy/config.py' file needs to be 
modified as well. 

{{{
$ hg diff ./lib/galaxy/config.py
diff -r 9e90faf2cb1c lib/galaxy/config.py
--- a/lib/galaxy/config.py  Wed Nov 02 14:15:08 2011 -0700
+++ b/lib/galaxy/config.py  Wed Nov 02 16:46:08 2011 -0500
@@ -113,6 +113,7 @@
 self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', 
"wormbase,tair,modencode_worm,modencode_fly,sgd_yeast" ).lower().split(",")
 self.genetrack_display_sites = kwargs.get( 'genetrack_display_sites', 
"main,test" ).lower().split(",")
 self.brand = kwargs.get( 'brand', None )
+   self.citation_url = kwargs.get('citation_url', 
'http://wiki.g2.bx.psu.edu/Citing%20Galaxy')
 self.support_url = kwargs.get( 'support_url', 
'http://wiki.g2.bx.psu.edu/Support' )
 self.wiki_url = kwargs.get( 'wiki_url', 'http://g2.trac.bx.psu.edu/' )
 self.blog_url = kwargs.get( 'blog_url', None )

}}}

Also, it seems like the default values are being passed twice here - in the 
mako templates and initialization method of Configuration class. I was 
wondering if default values can be passed only once during initialization and 
then other get methods would only query the necessary configuration option.   I 
don't know all the code in detail, so I might be wrong here. 

--
Shantanu. 



___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


Re: [galaxy-dev] galaxy citation_url setting

2011-11-02 Thread Nate Coraor
Shantanu Pavgi wrote:
> 
> Hi,
> 
> It seems like modification of 'citation_url'  in the universe_wsgi.ini config 
> file has no effect in the UI (Help --> How to Cite Galaxy). Is it something 
> hard-coded in the source? 

Hi Shantanu,

Whoops.  This has been fixed in 6205:9a9479f7e53f.

--nate

> 
> --
> Thanks,
> Shantanu. 
> ___
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
> 
>   http://lists.bx.psu.edu/
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


[galaxy-dev] galaxy citation_url setting

2011-10-31 Thread Shantanu Pavgi

Hi,

It seems like modification of 'citation_url'  in the universe_wsgi.ini config 
file has no effect in the UI (Help --> How to Cite Galaxy). Is it something 
hard-coded in the source? 

--
Thanks,
Shantanu. 
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/