blogofile blog template refactorings - would this kind of change welcome? (comments example)

36 views
Skip to first unread message

Péter Zsoldos

unread,
Nov 28, 2012, 4:41:29 PM11/28/12
to blogofil...@googlegroups.com
Hi,

certain features are spread all over the sample blog templates and are hard to replace/configure. I've extracted the comments and made disqus replaceable (provided only the drop-me-an-email barbones version as an alternative) in a sample blog - just clone https://github.com/zsoldosp/blogofile-proof-of-concepts and run blogofile build && blogofile serve with the various config files (see needed values in https://github.com/zsoldosp/blogofile-proof-of-concepts/commit/e247e393e2c761809b22c3ffa71661fde73baed7#_config.py)

Is this something that would be welcome in the core? If so, I'll need to figure out how to test it and then create a pull requests in blogofile_blog itself

Peter

--
http://www.linkedin.com/in/zsoldosp :::: http://zsoldosp.blogspot.com :::: http://twitter.com/zsepi

Doug Latornell

unread,
Nov 29, 2012, 4:37:59 PM11/29/12
to blogofil...@googlegroups.com
On Wed, Nov 28, 2012 at 1:41 PM, Péter Zsoldos <peter....@gmail.com> wrote:
Hi,

certain features are spread all over the sample blog templates and are hard to replace/configure. I've extracted the comments and made disqus replaceable (provided only the drop-me-an-email barbones version as an alternative) in a sample blog - just clone https://github.com/zsoldosp/blogofile-proof-of-concepts and run blogofile build && blogofile serve with the various config files (see needed values in https://github.com/zsoldosp/blogofile-proof-of-concepts/commit/e247e393e2c761809b22c3ffa71661fde73baed7#_config.py)

I just had a quick look, and I think you are doing a good thing! The sample templates haven't gotten much love since I extracted them from the old blogofile/site_src/ directory.

Is this something that would be welcome in the core? If so, I'll need to figure out how to test it and then create a pull requests in blogofile_blog itself

I probably won't have time to take a deeper look until the weekend, but provisionally, yes, this is welcome.

Writing tests in blogofile_blog can be pretty hard because of the way it imports things. For rendered pages I usually just settle for proving to myself that it works in a local test site (build/serve/check in browser). Crude and heretical, I know :(

--
You received this message because you are subscribed to the Google Groups "blogofile-discuss" group.
To post to this group, send email to blogofil...@googlegroups.com.
To unsubscribe from this group, send email to blogofile-disc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/blogofile-discuss?hl=en.

Mike Pirnat

unread,
Nov 29, 2012, 7:07:37 PM11/29/12
to blogofil...@googlegroups.com
On Thu, Nov 29, 2012 at 4:37 PM, Doug Latornell <d...@douglatornell.ca> wrote:
> Writing tests in blogofile_blog can be pretty hard because of the way it
> imports things.

This is the one thing that's always bugged me about Blogofile. I'd
love to take a crack at a remedy, but I've already got a too-high
stack of more urgent things to do. :-(

--
Mike Pirnat
mpi...@gmail.com
http://mike.pirnat.com/

Doug Latornell

unread,
Nov 29, 2012, 7:50:55 PM11/29/12
to blogofil...@googlegroups.com
On Thu, Nov 29, 2012 at 4:07 PM, Mike Pirnat <mpi...@gmail.com> wrote:
On Thu, Nov 29, 2012 at 4:37 PM, Doug Latornell <d...@douglatornell.ca> wrote:
> Writing tests in blogofile_blog can be pretty hard because of the way it
> imports things.

This is the one thing that's always bugged me about Blogofile. I'd
love to take a crack at a remedy, but I've already got a too-high
stack of more urgent things to do. :-(

I've been looking at http://pypi.python.org/pypi/stevedore and wondering if that would help clean up the plugin interface.

Some of the other import funkiness I think just needs some thoughtful refactoring. I've been holding off on that in favour of squashing bugs in the beta so that there can be a 0.8 final release.

Péter Zsoldos

unread,
Nov 30, 2012, 7:37:46 AM11/30/12
to blogofil...@googlegroups.com
On Fri, Nov 30, 2012 at 1:07 AM, Mike Pirnat <mpi...@gmail.com> wrote:
On Thu, Nov 29, 2012 at 4:37 PM, Doug Latornell <d...@douglatornell.ca> wrote:
> Writing tests in blogofile_blog can be pretty hard because of the way it
> imports things.

This is the one thing that's always bugged me about Blogofile. I'd
love to take a crack at a remedy, but I've already got a too-high
stack of more urgent things to do. :-(

Once http://globalday.coderetreat.org/ is over I might have some time to take a look at it. Any pointers to get started are welcome - I'm pretty experienced with testing, but I've only been looking at the blogofile code on a it-doesnt-do-what-i-need-so-lets-find-the-root-cause basis

Peter
 
Reply all
Reply to author
Forward
0 new messages