Hi,

Thank you for your reply. I have installed my plugin in development
mode, however I'm a bit confused at this point. I read the "Egg
Cooking Tutorial"[1], but I'm not sure if this is the way to test
things like request handling. I haven't developed a template yet for
what I've written so far, and I'm not sure how to check if specific
methods (for example like the ones in IRequestHandler), work.

Also, I was wondering if the following way is the right way to start
the Python interpreter so that I can see things such as ticket
details:
1. opening the Python interpreter
2. importing trac.env
3. env = trac.env.Environment("bloodhound/environments/main")
4. following the steps used in methods from the BookmarkPlugin[2] and
write something like:
    db = env.get_db_cnx()
    cursor = db.cursor()
    and then using cursor.execute() to select resources

[1] http://trac-hacks.org/wiki/EggCookingTutorial/AdvancedEggCooking
[2] http://trac-hacks.org/wiki/BookmarkPlugin

Thanks,
Antonia

On Tue, Jun 18, 2013 at 6:54 PM, Ryan Ollos <[email protected]> wrote:
> On Tue, Jun 18, 2013 at 7:56 AM, Antonia Horincar <
> [email protected]> wrote:
>
>> Hi,
>>
>> I have started to work on the back-end implementation of BEP-007
>> (https://issues.apache.org/bloodhound/wiki/Proposals/BEP-0007), and I
>> would like to verify if the code I wrote actually does what it is
>> supposed to do. It might sound silly, but I'm not sure what framework
>> Bloodhound is based on, and therefore how to verify methods in the
>> console. Can you help me out please?
>>
>
> I'm not sure if I'll be answering the right question, but I will give it a
> shot. Trac is the framework for the Bloodhound project, and Trac isn't
> built on top of another major Python framework such as Django.
> Trac/Bloodhound is a component architecture where plugins provide
> components and the plugins install as eggs. So you'll need to add a
> `setup.py` to your project and you can then install it in "development
> mode" with `python setup.py develop`. That will allow you to manually test
> your code in real time.
>
> You will probably also want to write unit tests for the code you are
> developing, and you can then run your unit tests from the console
> `PYTHONPATH=. python setup.py tests` or `PYTHONPATH=. python
> /path/to/test/module. If you look at bloodhound_search,
> bloodhound_relations, ... you can see how the tests are organized and
> integrated into the project. Those plugins are fairly complex though, so it
> may help to start with a simple one such as [1].
>
> There is a fair bit of development documentation in Trac [2], and you may
> want to start with [3].
>
> When I first started developing on Trac I had no experience developing web
> applications, and although there is a fair bit of documentation for
> developing in Trac, I have experienced that it can be a bit overwhelming
> and confusing to get things working the first time. If what I've said here
> isn't helpful in solving your problem, or you have more questions, don't
> hesitate to ask, either here on the mailing list or on IRC.
>
> [1] http://trac-hacks.org/wiki/BookmarkPlugin
> [2] 
> http://trac.edgewall.org/wiki/TracDev<http://trac.edgewall.org/wiki/TracDev/PluginDevelopment>
> [3] http://trac.edgewall.org/wiki/TracDev/PluginDevelopment

Reply via email to