librelist archives

« back to archive

hg api rework, tests and more

hg api rework, tests and more

From:
Rafael Martins
Date:
2012-10-17 @ 05:37
Hi all!

I spent the last weeks trying to add a decent test suite to blohg, but
the codebase was too hard to test, then I ended up rewriting some
bits, to make the code more "testable'. Now we have a clean API, with
well isolated classes, that is pretty easy to test. I worked hard to
avoid breakages for users, and current repositories seems to work out
of the box :)

I'm almost happy with the test coverage we have now. everything but
the rst API is tested. I'll add tests for the rst directives and the
parser soon. I also need to update the docs.

It would be nice if some users pull the code from the hg repository
[1] and run their blogs with it, to see if everything is ok. Also, I'd
like to ask the people who cares about the internals to take a look in
the code, and put some though on it, because this will be the base of
our stable 1.0 release, that should happen in some months.

As a bonus, I fixed a design issue that was annoying me for a long
time. The 'blohg' command line tool will not enable the flask debug by
default anymore. I mean, the loading of files from the working
directory instead of the 'default' branch isn't enabled by the debug
flag anymore. I added the concept of 'change context', that is totally
separated from the debug. I'll talk about it in details on the docs,
when I update them. All the blogs should just works as before, but you
will not need to run 'hg update' on your remote repository to debug
deployment errors anymore!

I had to remove the 'scheduled posts' feature, because I found some
big holes on the implementation. I'll probably re-implement it soon.

I'm afraid that I probably broke some of the blohg forks. I'm sorry.

If you want to talk about the changes or ask for help when merging
these changes with your fork feel free to join #blohg @ freenode. :)

[1] http://hg.rafaelmartins.eng.br/blohg/

Best regards,

-- 
Rafael Goncalves Martins
http://rafaelmartins.eng.br/