Proposal: testdb cached by hash on migrations dirs

2015-04-17 Thread Andrew Farrell
Hi Folks,

I've been working on speeding up a django-1.7 applications unit tests to
encourage developers to write more of them. Currently, django's strategy
for ensuring that its database is fresh for each test run is to create a
new test database and run all of the migrations on it. I've noticed that
the bulk of the time is spent on spinning up the test database. This was
also the case in a previous project that I worked on that ran django-1.4.

I recently had an idea: why not, after running the migrations on the
newly-spun-up database, store a representation of that database somewhere
that could be more quickly loaded? I suspect this would be particularly
useful for an in-memory test database like sqlite, especially if someone
was using a tool likewatchdog  to
automatically run their tests each time they changed one of their
applications' files. This cache could be accompanied by a hash of all of
the migrations that needed to be run and would only need to change when one
of the applications listed in settings.INSTALLED_APPS had a change to its
migrations.

This is of course going to be running up against one of the 2 hard things
in computer science: cache invalidation. So, I wanted to get y'alls
opinions on whether this was worth attempting.

cheers,
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CA%2By5TLaBPLg%2Bg-Cuft%2B1e5w19bCxA-Mfq3EQE6mChLoNYfd6RA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: testdb cached by hash on migrations dirs

2015-04-18 Thread Andrew Farrell
Ah, thank you.
It seems I should have read that part of the release notes
<https://docs.djangoproject.com/en/1.8/releases/1.8/#tests> more closely.
Also, thank you to Greg Chapple for his work on that.

On Fri, Apr 17, 2015 at 5:19 PM, Tim Graham  wrote:

> You might like to know about the --keepdb option in Django 1.8:
> https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-option---keepdb
>
>
> On Friday, April 17, 2015 at 6:04:00 PM UTC-4, Andrew Farrell wrote:
>>
>> Hi Folks,
>>
>> I've been working on speeding up a django-1.7 applications unit tests to
>> encourage developers to write more of them. Currently, django's strategy
>> for ensuring that its database is fresh for each test run is to create a
>> new test database and run all of the migrations on it. I've noticed that
>> the bulk of the time is spent on spinning up the test database. This was
>> also the case in a previous project that I worked on that ran django-1.4.
>>
>> I recently had an idea: why not, after running the migrations on the
>> newly-spun-up database, store a representation of that database somewhere
>> that could be more quickly loaded? I suspect this would be particularly
>> useful for an in-memory test database like sqlite, especially if someone
>> was using a tool likewatchdog <https://pythonhosted.org/watchdog/> to
>> automatically run their tests each time they changed one of their
>> applications' files. This cache could be accompanied by a hash of all of
>> the migrations that needed to be run and would only need to change when one
>> of the applications listed in settings.INSTALLED_APPS had a change to its
>> migrations.
>>
>> This is of course going to be running up against one of the 2 hard things
>> in computer science: cache invalidation. So, I wanted to get y'alls
>> opinions on whether this was worth attempting.
>>
>> cheers,
>> Andrew
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/527efd9a-e12f-42e4-93ca-1920b7bef43c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/527efd9a-e12f-42e4-93ca-1920b7bef43c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CA%2By5TLb6Ni_mKR804Pm1KtxrPok%3DSdDX9rBD_AiSZATdgcTzMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrong translation in Brazillian portuguese

2014-04-07 Thread Andrew Farrell
According to https://code.djangoproject.com/wiki/Version1.7Roadmap, the
translation string freeze is not until the 1st of May, so it should be.

-- Andrew

On Mon, Apr 7, 2014 at 10:45 AM, Bruno Ribeiro da Silva <
bruno.dev...@gmail.com> wrote:

> Hi everyone,
>
> I found a wrong translation in Brazillian portuguese that affects django
> 1.7 and it's present in master too. I'm going to open a ticket for this and
> make a pull request. Do you think it's possible to fix for the 1.7?
>
> Thank you!
>
> --
> Bruno Ribeiro da Silva
> Python Dev and Homebrewer!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAE-2%3DJyri-hr-Q9%2BzdezBxkLG2-qzViBQmF9bwotmPFBvZ%3DS%3Dg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CA%2By5TLZFRmb2x0r%2Bwjk3GJXaiAyddUZ_X_auRg%3Dq2RBQqZvXCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: DEPs: Django Enhancement Proposals

2014-04-14 Thread Andrew Farrell
Who is responsible then for deciding what the conclusion of the discussion
was? If there is no such person, how does the process handle the case when
people talk past each other and don't actually come to a conclusion?


On Mon, Apr 14, 2014 at 2:22 PM, Michael Manfre  wrote:

> I think there would be value in adding DEPs for the major features that
> will ship with 1.7.
>
> Regards,
> Michael Manfre
>
>
>
>
> On Mon, Apr 14, 2014 at 2:17 PM, Aymeric Augustin <
> aymeric.augus...@polytechnique.org> wrote:
>
>> On 14 avr. 2014, at 19:51, Adrian Holovaty  wrote:
>>
>> > One idea was to start doing a Django equivalent of Python's PEPs, which
>> would serve as a formal way to document large new features/changes in
>> Django.
>>
>> Would it be interesting to retro-spec the major features added in the
>> past?
>>
>> --
>> Aymeric.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-developers@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/58B4EA9B-C450-476D-A9E9-8008718FF912%40polytechnique.org
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAGdCwBv7qvwv8Ksdajz1UUWgYcXEt%3DPLHfZCRjGW0YjT_TW51Q%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CA%2By5TLa1o9PO4yNAt_7EELaU4H9MoXH-3DuVObKKW%3DjYopizyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.