Skip to content

Commit fae7d93

Browse files
committed
Merge pull request #35 from crccheck/maintenance
Maintenance tweaks
2 parents 3d02a3e + e063d5d commit fae7d93

File tree

6 files changed

+31
-21
lines changed

6 files changed

+31
-21
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: python
22
# Generate this env list with:
3-
# tox -l | awk '{ print " - TOX_ENV="$0}
3+
# tox -l | awk '{ print " - TOX_ENV="$0}'
44
env:
55
- TOX_ENV=django14-py26
66
- TOX_ENV=django14-py27
@@ -13,9 +13,10 @@ env:
1313
- TOX_ENV=django17-py33
1414
- TOX_ENV=django17-py34
1515
- TOX_ENV=django18-py27
16-
- TOX_ENV=django18-py33
1716
- TOX_ENV=django18-py34
18-
- TOX_ENV=coveralls-django17-py27
17+
# pending full travisci support for python 3.5
18+
# - TOX_ENV=django18-py35
19+
- TOX_ENV=coveralls-django18-py27
1920
install: pip install tox coveralls
2021
script: tox -e $TOX_ENV
2122
after_success: coveralls

Makefile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ clean:
2323
rm -rf MANIFEST
2424
rm -rf build
2525
rm -rf dist
26+
rm -rf *.egg
2627
rm -rf *.egg-info
28+
find . -name "*.pyc" -delete
29+
find . -name ".DS_Store" -delete
2730

2831
test:
2932
python -W ignore::RuntimeWarning $(MANAGE) test django_object_actions
@@ -40,17 +43,18 @@ resetdb:
4043
python $(MANAGE) migrate --noinput
4144
python $(MANAGE) loaddata sample_data
4245

43-
# Release Instructions:
44-
#
45-
# 1. bump version number above
46-
# 2. `make release`
47-
# 3. git push origin master --tags
48-
#
49-
# If this doesn't work, make sure you have wheels installed:
50-
# pip install wheel
51-
release:
46+
# Set the version. Done this way to avoid fancy, brittle Python import magic
47+
version:
5248
@sed -i -r /version/s/[0-9.]+/$(VERSION)/ setup.py
5349
@sed -i -r /version/s/[0-9.]+/$(VERSION)/ django_object_actions/__init__.py
50+
51+
# Release instructions
52+
# 1. bump VERSION above
53+
# 2. run `make release`
54+
# 3. `git push --tags origin master`
55+
# 4. update release notes
56+
release: clean version
5457
@git commit -am "bump version to v$(VERSION)"
5558
@git tag v$(VERSION)
59+
@-pip install wheel > /dev/null
5660
python setup.py sdist bdist_wheel upload

example_project/polls/factories.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212

1313
class UserFactory(factory.DjangoModelFactory):
14-
FACTORY_FOR = get_user_model()
14+
class Meta:
15+
model = get_user_model()
1516
first_name = factory.Sequence(lambda i: u'John{0}'.format(i))
1617
last_name = factory.Sequence(lambda i: u'Doe{0}'.format(i))
1718
username = factory.LazyAttribute(lambda x: '{0}{1}'.format(
@@ -22,4 +23,5 @@ class UserFactory(factory.DjangoModelFactory):
2223

2324

2425
class CommentFactory(factory.DjangoModelFactory):
25-
FACTORY_FOR = models.Comment
26+
class Meta:
27+
model = models.Comment

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Django==1.8.4
1+
Django==1.8.6
22
dj-database-url==0.3.0
33
django-extensions==1.5.9
4-
tox==2.1.1
5-
factory-boy==2.5.2
6-
coverage==3.7.1
4+
tox==2.2.1
5+
factory-boy==2.6.0
6+
coverage==4.0.2
77

88
# for heroku support
9-
psycopg2==2.5.4
9+
psycopg2==2.6.1

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@
2525
'Programming Language :: Python :: 2.7',
2626
'Programming Language :: Python :: 3',
2727
'Programming Language :: Python :: 3.3',
28+
'Programming Language :: Python :: 3.4',
29+
'Programming Language :: Python :: 3.5',
2830
],
2931
)

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ envlist =
55
django14-{py26,py27},
66
django15-{py26,py27},
77
django16-{py26,py27,py33},
8-
django{17,18}-{py27,py33,py34},
8+
django17-{py27,py33,py34},
9+
django18-{py27,py34,py35},
910
# run one of the tests again but with coverage
1011
coveralls-django18-py27,
1112
skipsdist = True
@@ -18,7 +19,7 @@ commands =
1819
deps =
1920
dj_database_url==0.3.0
2021
django-extensions==1.5.9
21-
factory-boy==2.4.1
22+
factory-boy==2.6.0
2223
coveralls: coverage
2324
django14: Django<1.5
2425
django15: Django<1.6

0 commit comments

Comments
 (0)