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