Skip to content

Commit

Permalink
Fix various things - WIP (#241)
Browse files Browse the repository at this point in the history
* Django 1.11.17 is required to work with python 3.7+ so make sure to install that.

* First pass at cleaning up the models some

Adding proper verbose_name and help_text for all fields.  Add validators to some as well.
Verified that manage.py test still passes.

This is a WIP though, it will need a migration before we're done.

* Fix flake8 errors

* Fix pydocstyle errors

*  Add migration, fix migration history, add tests around migrations.

Migrations were broken if you went backward and forward again, so I fixed the history with a new migration.  I then was able to properly add my own new migration.  Lastly, I added tests to try and ensure no migration issues happened again.

* Make raw sql a tuple format to avoid sqlparse requirement

* Must add absolute_import to every file for python2

* Don't have to clear our django's migration history, apparently it works fine without that.

* sqlite won't let you run things like migrations inside another transaction (like a test)

* Fix django 2.2 tests

* Setting TOXENV seems to no longer handle the django env variable, so just let it do one test with latest django.

* Run migration backward/forward for all tests
  • Loading branch information
liquidpele authored and auvipy committed Apr 29, 2019
1 parent a994d5a commit 0c2586b
Show file tree
Hide file tree
Showing 15 changed files with 414 additions and 260 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ os:
- linux
matrix:
include:
- {python: 3.7, env: DJANGO=1.11 TOXENV=python37, dist: xenial, sudo: true}
- {python: 3.7, env: DJANGO=2.0 TOXENV=python37, dist: xenial, sudo: true}
- {python: 3.7, env: DJANGO=2.2 TOXENV=python37, dist: xenial, sudo: true}
- {python: 3.7, env: TOXENV=python37, dist: xenial, sudo: true}
- { python: 3.5, env: TOXENV=flake8 }
- { python: 2.7, env: TOXENV=flakeplus }
- { python: 3.5, env: TOXENV=pydocstyle }
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@


class Migration(migrations.Migration):
replaces = [
('django_celery_beat', '0005_add_solarschedule_events_choices'),
('django_celery_beat', '0006_auto_20180210_1226'),
('django_celery_beat', '0006_auto_20180322_0932'),
('django_celery_beat', '0007_auto_20180521_0826'),
('django_celery_beat', '0008_auto_20180914_1922'),
]

dependencies = [
('django_celery_beat', '0004_auto_20170221_0000'),
]
Expand Down
32 changes: 0 additions & 32 deletions django_celery_beat/migrations/0006_auto_20180210_1226.py

This file was deleted.

54 changes: 0 additions & 54 deletions django_celery_beat/migrations/0006_auto_20180322_0932.py

This file was deleted.

28 changes: 0 additions & 28 deletions django_celery_beat/migrations/0007_auto_20180521_0826.py

This file was deleted.

60 changes: 0 additions & 60 deletions django_celery_beat/migrations/0008_auto_20180914_1922.py

This file was deleted.

1 change: 0 additions & 1 deletion django_celery_beat/migrations/0009_periodictask_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class Migration(migrations.Migration):

dependencies = [
('django_celery_beat', '0006_periodictask_priority'),
('django_celery_beat', '0008_auto_20180914_1922'),
]

operations = [
Expand Down
Loading

0 comments on commit 0c2586b

Please sign in to comment.