Pycon Pune 2017

2017 saw a new chapter of Pycon in India, Pycon Pune. Pycon Pune 2017 felt more community focused, had loads of upstream contributors as speakers and participants, community booths (Pyladies, PSF) and loads of hacking. Pycon Pune 2017 was a 4 day event, from 16 Feb - 19 Feb. The first 2 days were conference days, and the remainder 2 were for devsprints. This was my first year as a Pycon volunteer....

February 21, 2017 · Ratnadeep Debnath

#Django #TransactionTestCase with REUSE_DB=1 of #django-nose

Lately, I found out that Django’s TransactionTestCase leaves test data in database after the test case is executed. It’s not until the next execution of _pre_setup method of a TransactionTestCase instance that the database is flushed. This is troublesome when tests are run with Django Nose’s test runner with REUSE_DB =1. An easy fix to this is to customize the TransactionTestCase so that it deletes the test data on exit. I wrote a simple wrapper around Django’s TransactionTestCase and extend it to write other transaction test cases....

September 8, 2012 · Ratnadeep Debnath

My talk got selected for #Pycon India 2012

My proposed talk titled Develop for an international audience got selected for Pycon India, 2012. It’s time to start working on the slides. I am thinking to use rst to write my slides. Also, I have booked by flight tickets for Pycon Thanks everyone who voted for my talk.

September 2, 2012 · Ratnadeep Debnath

Validate Python string translation in Transifex

Transifex already supported validating translations of old styled Python strings, e.g., [sourcecode language=”python”] “A sample string with a %(keyword)s argument.” % {‘keyword’: ‘key word’} [/sourcecode] The validation is done by checking if all the positional and keyword arguments are present in the translation string and the translation string does not contain any extra argument which is not in the source string. You can have a look at the validator code here....

September 2, 2012 · Ratnadeep Debnath

App specific logging in Transifex

Yesterday, I was working on adding app specific loggers in Transifex. By app specific logger I mean a logger which shows the app name which generated the log. As of now, the logs in Transifex look something like this: [sourcecode language=”python”] 2012-06-29 13:01:43,300 tx DEBUG Saved: Project Avant Window Navigator 2012-06-29 13:01:43,312 tx DEBUG Saved: Project Switchdesk 2012-06-29 13:01:43,324 tx DEBUG Saved: Project Usermode 2012-06-29 13:01:43,342 tx DEBUG Saved: Project desktop-effects...

June 30, 2012 · Ratnadeep Debnath

Add plug-n-play functionality to your Django project using Django-addons

What is Django-addons? A Django app used to add true plug-n-play functionality to your own Django applications and projects. Django-addons is brought to you by Indifex, the company behind Transifex. Django-addons is a bunch of code that makes writing addon/plugins for your Django project much easier. Add django-addons to your Django project and you can drop all the addons to ‘/addons’ directory. How to install Django-addons? You can install the latest version of django-addons running...

October 19, 2011 · Ratnadeep Debnath

A brief introduction to coverage.py

Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not. Coverage measurement is typically used to gauge the effectiveness of tests. It can show which parts of your code are being exercised by tests, and which are not. Getting started: Install coverage: pip install coverage easy_install coverage Use coverage to run your program and gather data: $ coverage run my_program....

September 22, 2011 · Ratnadeep Debnath

Testing coverage of your Django code

Just writing tests for your Django codebase is not enough. You need to check how much of the code is covered in your tests. For this, there are some tools available. Again, it is not just the number of lines of code tested that matters. What matters is “Are these lines important?”. Well, for this, we have to use our head. covergae is a tool for checking test coverage of python applications....

June 12, 2011 · Ratnadeep Debnath

Quite some time ... since I wrote last

A lot has happened since I last blogged. I’m now not going to recollect my memories :P. Any ways, if I were to summarise, I was busy with college seminars, project reports, semester exams, etc. What a drag! After the exams ended, I felt like a free bird ready to fly high. I started studying Django. I am also revising python. Yesterday, I packaged python-keyring-0.5.1 for F14. It fixes some bugs in keyring v 0....

January 11, 2011 · Ratnadeep Debnath

Installed scribe beta in my Nokia C5

I was tired of searching for a mobile blog app. Alas! WordPress blogging app is not for Nokia C5. Finally, I came across scribe, a blog app for s60 platforms. It’s written in Python. This is my first blog using Scribe.

December 6, 2010 · Ratnadeep Debnath