Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#19196 closed New feature (fixed)

Add tests/requirements.txt

Reported by: Anssi Kääriäinen Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: timograham@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Adding testing requirements will make it easier to run all Django's tests. A first draft version available here: https://github.com/akaariai/django/compare/add_test_requirements

I have commented out those packages which either do not have py3 support or which require compiling. We might want to add all packages uncommented and let testers comment them out if they can't install some of the packages.

The list is based on http://apolloner.eu/~apollo13/django/before_script.sh

As said, this is just first draft. Some packages might be missing. The requires compiling/no py3 support comments might be inaccurate, too.

Change History (19)

comment:1 by Aymeric Augustin, 12 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham, 12 years ago

Cc: timograham@… added

Might be nice if we could refer to this in the contributing tutorial (#16779).

comment:3 by Carl Meyer, 12 years ago

Some other things that could be mentioned here include python-memcached/pylibmc (also requires configuration in settings.CACHES to run memcached tests) and coverage (if you want to generate test coverage data).

One way to handle the compiled/non and py2/py3 differences would be with multiple requirements files; requirements files can also include each other with a -r line, so we could provide a requirements/all.txt that includes everything. Of course the downside here is that if we split along more than one axis, the number of requirements files can get silly...

comment:4 by Carl Meyer, 12 years ago

Also, in the draft patch I don't quite understand "Note that in some cases installing a package will activate an alternate set of tests. These packages are: pytz, enter more here." I think every requirement in this file (except the database adapters) will automatically enable some additional (not alternate) tests in the test suite, so I'm not sure why pytz is specifically called out. And I can't find any tests that are _disabled_ by installing pytz, so I don't think the word "alternate" is correct.

comment:5 by Aymeric Augustin, 12 years ago

Component: UncategorizedDocumentation
Type: UncategorizedNew feature

comment:6 by Tim Graham, 12 years ago

Patch needs improvement: set

comment:7 by Tim Graham, 12 years ago

We also need bcrypt instead of py-bcrypt for Django 1.6+ due to 8f0a4665d67868dce2e204dd592b0f133edf7943.

comment:8 by Tim Graham, 12 years ago

There's also the list that the djangocore-box uses below. I was going to send a pull request there to add bcrypt, but I thought it may be more productive to try to complete this ticket and that modify djangocore-box to use Django's included requirements. Any thoughts on how we can move forward with this?

https://github.com/jphalip/djangocore-box/tree/master/requirements

comment:9 by Tim Graham, 11 years ago

Patch needs improvement: unset

Here's my proposal: https://github.com/timgraham/django/commit/ac14164267829091f2af705a42580da7dc3b8d80

Would this breakdown be sufficient for use on Jenkins? I can work on versions for 1.5/1.4 if this looks good.

Version 0, edited 11 years ago by Tim Graham (next)

comment:10 by Tim Graham, 11 years ago

feedback from apollo13 in IRC: I am not sure if it's worth to add requirements-database.txt -- or at least structure it under an requirements directory.

Using a directory makes sense to me. My thought regarding the individual database requirements files is that it would allow automated installation of selected databases in environments such as the djangocore-box, which doesn't have Oracle support as of now.

comment:11 by Tim Graham, 11 years ago

Updated in a pull request.

comment:12 by loic84, 11 years ago

Triage Stage: AcceptedReady for checkin

Looks good to me; I've tried the various requirements files in a fresh virtualenv.

Optionally for GeoDjango we could have a paragraph in internals/contributing/writing-code/unit-tests.txt that links to https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/.

comment:13 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 4d92a0bd8630affbb6f289317f71d60607d26369:

Fixed #19196 -- Added test/requirements

comment:14 by Tim Graham <timograham@…>, 11 years ago

In aecbaaed0c1a0d7da99a8d3deb9328ad2b5c601d:

[1.6.x] Fixed #19196 -- Added test/requirements

Backport of 4d92a0bd86 from master.

comment:15 by Tim Graham <timograham@…>, 11 years ago

In 13546cae9c7922088266c32a5be2bda77545a04b:

[1.5.x] Fixed #19196 -- Added test/requirements

Backport of 4d92a0bd86 from master.

comment:16 by Tim Graham <timograham@…>, 11 years ago

In 77856dc875ca17cc86944e028e4c9a36b0b46dbe:

Added some missing test requirements in the docs; refs #19196

comment:17 by Tim Graham <timograham@…>, 11 years ago

In 2e3250fc90499b2977c39ca8af8d0c245c9bcd77:

[1.6.x] Added some missing test requirements in the docs; refs #19196

Backport of 77856dc875 from master

comment:18 by Tim Graham <timograham@…>, 11 years ago

In 14b50739787d9bb69e763894f78b10971fe2bc63:

[1.5.x] Added a missing test requirement in the docs; refs #19196

comment:19 by Tim Graham <timograham@…>, 11 years ago

In e8971345b4bf0e7ce2124d033ee3385919f47309:

[1.4.x] Fixed #19196 -- Added test/requirements

Backport of 4d92a0bd86 from master

Note: See TracTickets for help on using tickets.
Back to Top