RhodeCode extensions examples

381 views
Skip to first unread message

marcin

unread,
Oct 17, 2012, 8:12:19 AM10/17/12
to rhod...@googlegroups.com
I shared an new repository with extensions examples for rcextensions. First one is a hipchat notifications when someone does a push to RhodeCode. I'm open to pull requests/suggestions with other nice examples (Email templates, other services etc).  I guess it's a good start for having some nice example what you could do with post-push hooks.


Cheers

valentij...@gmail.com

unread,
Mar 5, 2013, 10:33:39 AM3/5/13
to rhod...@googlegroups.com
How should we use this?

I copied the hipchat folder into ~/rhodecode/venv/lib/python2.7/site-packages/rhodecode/config/rcextensions and ran the make-rcext process.
The resulting __init__.py doesn't contain the hipchat code.

Should I copy over the __init__py from the hipchat folder over the original on in ~/rhodecode/venv/lib/python2.7/site-packages/rhodecode/config/rcextensions ?
What if I have multiple extensions?

I tried to copy the __init_.py from hipchat over the original one and ran make-rcext, but this throws an error:

(venv)git@git:~/rhodecode/venv/bin$ paster make-rcext ../../data/production.ini
Traceback (most recent call last):
  File "/home/git/rhodecode/venv/bin/paster", line 8, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File "/home/git/rhodecode/venv/local/lib/python2.7/site-packages/paste/script/command.py", line 103, in run
    command = commands[command_name].load()
  File "/home/git/rhodecode/venv/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1954, in load
  File "/home/git/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/config/rcextensions/__init__.py", line 1, in <module>
    import requests
ImportError: No module named requests

I am new to python so forgive if this is a basic question

valentij...@gmail.com

unread,
Mar 5, 2013, 11:18:29 AM3/5/13
to rhod...@googlegroups.com
For now I just editted the main __init__.py to do what I want, but that leaves me with just this one extension.

My expectation was that I could have muliple extensions in different folders.
And the the make-rcext process would combine them?

Looking at the code I don't think this is happening. What is the purpose of make-rcext other than copying the __init__.py file into the data/rcextensions folder?

Marcin Kuzminski

unread,
Jun 6, 2013, 6:42:54 PM6/6/13
to rhod...@googlegroups.com
Hi,


Sorry for late response !

Currently unfortunately rcextensions support just loading of one __init__.py file. But you should treat this an an entry point to other Python modules. You can have a lot of stuff connected to this __init__.py but the whole logic and code separated in function and modules in other files. They just must be importable by current python interpreter.

Cheers


Marcin Kuzminski


--
You received this message because you are subscribed to the Google Groups "rhodecode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhodecode+...@googlegroups.com.
To post to this group, send email to rhod...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages