Commit Graph
100 Commits
Author SHA1 Message Date
David Wobrock 6d595f1555 Add support for positional app_label and migration_name arguments 2021-05-26 18:53:19 +02:00
David Wobrock bf525ae79d Make git commit id a named CLI parameter 2021-05-26 18:53:19 +02:00
David Wobrock e56d96a35b Edit master->main GitHub Actions 2021-05-25 23:15:10 +02:00
David Wobrock 8e57fb2fb0 Add main branch rename to CHANGELOG 2021-05-24 20:23:48 +02:00
David Wobrock 062c60cd31 Add DEFAULT_AUTO_FIELD to settings for explicit PK field 2021-05-02 15:07:16 +02:00
David Wobrock c988ee3d51 Delete apps.py files for Django 3.2 automatic discovery 2021-05-02 15:07:16 +02:00
David-Wobrock b2f4c634b5 Bump to 2.5.3 2021-04-12 18:58:02 +02:00
David-Wobrock f9b172f1b1 Upgrade flake and isort versions for linting 2021-04-12 18:57:03 +02:00
David-Wobrock 09983f5c4c Add Django 3.2 support 2021-04-12 18:57:03 +02:00
David-Wobrock 4665d167df Update CHANGELOG with 2.5.3 info 2021-04-12 18:52:15 +02:00
David-Wobrock 27d9115e2e Update MANIFEST.in content 2021-04-12 18:52:15 +02:00
David-Wobrock 629ff558ef Fix setup 'packages' argument
So that we don't install a 'tests' module globally in each env
2021-04-12 18:52:15 +02:00
David-Wobrock aec14ccd53 Bump to 2.5.2 2021-04-01 23:11:35 +02:00
David-Wobrock 2f3ce1d7cc Remove toml support 2021-04-01 23:11:35 +02:00
David-Wobrock b16081fecf Fix linting 2021-02-04 22:00:59 +01:00
David Wobrock 1586a3f607 Bump to 2.5.1 2021-02-04 19:30:09 +01:00
David Wobrock 48f199a91b Use utf-8 encoding on config files 2021-02-04 19:28:09 +01:00
David-Wobrock bfce31f229 Bump to 2.5.0 2021-01-31 17:51:21 +01:00
David-Wobrock 60364050bd Update CHANGELOG 2021-01-31 17:44:58 +01:00
David-Wobrock 137089573c Implement include migration name options 2021-01-31 17:44:58 +01:00
David-Wobrock 1eccbbfc07 Fix configuration file for boolean values 2021-01-17 16:28:31 +01:00
David-Wobrock 2dc4caadf9 Implement config files 2021-01-17 16:28:31 +01:00
David-Wobrock d207bf14b3 Fix import order which was important 2020-11-30 21:58:28 +01:00
David-Wobrock e51073ef46 Fixes #129 - use single logger 2020-11-30 21:53:38 +01:00
David-Wobrock 6ab1d58c47 Apply isort to the project 2020-11-30 21:46:40 +01:00
David-Wobrock 4b15e11faa Rename data migration lint checks 2020-11-30 21:40:57 +01:00
David-Wobrock 1824410ac5 Fix linting errors 2020-11-26 19:02:57 +01:00
David-Wobrock f795fa07d2 Add tests for RunSQL tests 2020-11-26 19:02:57 +01:00
David-Wobrock f5d0da4932 Run some checks on RunSQL migration operation 2020-11-26 19:02:57 +01:00
David-Wobrock 780630131f Add warning if RunPython model variable name not the same as model class 2020-11-26 19:02:57 +01:00
David-Wobrock 601e02e024 Rename method name and add comments 2020-11-26 19:02:57 +01:00
David-Wobrock a68ff7c306 Make data migration model import check a bit less strict
It now allows:
* get_model(...) calls with one parameter only
* allows the variable name to be not the same as the model name itself (this will become a warning)
2020-11-26 19:02:57 +01:00
David-Wobrock 5e26d9a910 Document the incompatibility codes 2020-11-26 19:02:57 +01:00
David-Wobrock b38da345d7 Add Python 3.9 support 2020-11-26 18:54:02 +01:00
David-Wobrock 06c197f546 Do lint in another job than the build 2020-11-26 18:43:34 +01:00
David-Wobrock 321b41ddd0 Start using GitHub Actions and remove Travis 2020-11-26 18:43:34 +01:00
David-Wobrock 50294a213b Add Dj3.1 support and update flake8 and black versions 2020-10-10 18:14:56 +02:00
David Wobrock 39a21ad46a Add pages referencing the linter to the readme 2020-10-10 16:33:10 +02:00
David Wobrock 00af46c5cf Add new blog post link
https://medium.com/botify-labs/django-and-its-default-values-c21a13cff9f
2020-09-17 17:20:54 +02:00
David Wobrock 3f827563c1 Bump to 2.4.0 2020-07-03 19:14:28 +02:00
David Wobrock be7b9e58c3 Update info to CHANGELOG and README 2020-07-02 19:15:30 +02:00
David Wobrock ae84a5ffad Fix most tests for previous Django and Python versions 2020-07-02 19:15:30 +02:00
David Wobrock ef38433bb8 Unrelated: handle migration files gathered from git command that are not in the installed_apps 2020-07-02 19:15:30 +02:00
David Wobrock c2c26ae106 Add tests for the makemigrations override 2020-07-02 19:15:30 +02:00
David Wobrock 34a6d9d47e Make makemigrations override less strict by suggesting to keep the migration 2020-07-02 19:15:30 +02:00
David Wobrock 0d8bc98f8e Remove forgotten option from lintmigrations command 2020-07-02 19:15:30 +02:00
David Wobrock bf790a0591 Do not lint migrations on dry_run
If the migration file is not generated, we're not able yet to generate the associated SQL.
That'll come in a later version :)
2020-07-02 19:15:30 +02:00
David Wobrock 6e8df8fb66 Update CHANGELOG.md with makemigrations feature 2020-07-02 19:15:30 +02:00
David Wobrock 86ccbfea4f Add documentation for the makemigrations override 2020-07-02 19:15:30 +02:00
David Wobrock 95fc4a538a Add makemigrations override command 2020-07-02 19:15:30 +02:00
David Wobrock 8a7cff3c82 Add method to linter reset_counters 2020-07-02 19:15:30 +02:00
David Wobrock a9cae8a21e Refactor linting configuration parser options to a function 2020-07-02 19:15:30 +02:00
David Wobrock e86f8a7df2 Bump to 2.3.0 2020-06-20 18:09:05 +02:00
David Wobrock b3816613d5 Fix #115 -- Detect correctly if a field ends with a default value or a dropped default 2020-06-20 18:08:16 +02:00
David Wobrock f21ff2c278 Add (failing) tests cases for makeing a column not null with a Django default value 2020-06-20 18:08:16 +02:00
David Wobrock d411ea2f6b Unrelated: remove unused Django boilerplate files 2020-06-20 18:08:16 +02:00
David Wobrock 9c4788d851 Update testing libs 2020-06-20 17:51:30 +02:00
David Wobrock 7780a6d838 Bump Flake8 version to 3.8.3 2020-06-17 22:33:03 +02:00
David Wobrock 31338714dd Fix #112 -- make the behaviour of --include-migrations-from more obvious
* Misspelled filename => fail (instead of linting all migrations and ignoring the error)
* An empty file/a file with no valid migration paths => lint no migrations (instead oflinting all migrations)
* If the option is not specified, keep the behaviour of linting all migrations
2020-06-17 22:32:42 +02:00
David Wobrock 799957a556 Bump to 2.2.2 2020-05-26 18:12:17 +02:00
David Wobrock dd13787bef Fix #110 -- Don't pin dependencies but only define minimal version 2020-05-26 18:10:48 +02:00
David-Wobrock a5e17d0df1 Bump to 2.2.1 and black some files 2020-05-16 21:16:36 +02:00
David Wobrock d02d3455db Bump to 2.2.0 2020-05-11 18:04:53 +02:00
David Wobrock 264e1cd61e Fix #108 -- Don't strictly pin the 'appsdirs' dep 2020-05-11 18:04:15 +02:00
David-Wobrock 87040845ed Fix #106 -- Add forgotten documentation about IgnoreMigration() 2020-05-04 20:41:51 +02:00
David Wobrock 87085a2cd4 Start changelog of unreleased 2.2.0 2020-03-13 23:24:39 +01:00
David Wobrock c048bdf745 Simplify print statements 2020-03-13 23:24:39 +01:00
David Wobrock 41a5dc731b Bump to 2.1.0 and update CHANGELOG 2020-02-08 22:38:05 +01:00
David Wobrock 52254d030c Add six to tox dependencies 2020-02-08 22:38:05 +01:00
David Wobrock cb6961539c Handle for forward and backward data migration imports 2020-02-08 22:38:05 +01:00
David Wobrock 1e8fb95a8a Bump to v2.0.0 and set to production ready tool 2020-02-07 23:29:15 +01:00
David Wobrock 19023626e6 Introduce a first PY2/PY3 difference for inspect.get(full)argspec call 2020-02-07 23:29:15 +01:00
David Wobrock a0e7ca099b Simplify passing migration object directly into analysing data migration 2020-02-07 23:29:15 +01:00
David Wobrock 553ed41cc4 Update Travis config with warnings and info on build 2020-02-07 23:29:15 +01:00
David Wobrock 9f22116541 Black the code 2020-02-07 23:29:15 +01:00
David Wobrock 2e7eec42c2 Remove the 'warn' in front of warning messages 2020-02-07 23:29:15 +01:00
David Wobrock a0d5e2940c Import RunPython directly to avoid shadowing existing names 2020-02-07 23:29:15 +01:00
David Wobrock 1925343f4a Move constants to specific file and remove unused import 2020-02-07 23:29:15 +01:00
David Wobrock e49f6dea9c Document, add to changelog the data migrations and rename to 'warnings-as-errors' (plural) 2020-02-07 23:29:15 +01:00
David Wobrock 71614bd377 Handle warning as error and exclude warning tests 2020-02-07 23:29:15 +01:00
David Wobrock d01875b3be add warnings and RunPython basic linting 2020-02-07 23:29:15 +01:00
David Wobrock 691b1b82cb Add app_data_migration used for tests 2020-02-07 23:29:15 +01:00
David Wobrock d410d2c7ba Refactor some linting code to more intelligible conditions 2020-02-07 23:29:15 +01:00
David Wobrock 902752c3f1 Set theme jekyll-theme-slate 2020-02-07 23:28:15 +01:00
David Wobrock d3fd1518ea Bump to version 1.5.0 2020-01-26 11:56:42 +01:00
David-Wobrock 03863532e7 Update CHANGELOG.md with Django 3.0 2020-01-11 22:50:27 +01:00
David-Wobrock 21e3cfda4c Add Django3 build to travis.yml configuration 2020-01-11 22:50:27 +01:00
David-Wobrock fe230872eb Add Django3 to test matrix and setup.py metadata 2020-01-11 22:50:27 +01:00
David-Wobrock 5bd1145272 Update tox to latest version 2020-01-11 22:50:27 +01:00
David-Wobrock 0fdff490b6 Add information to how to configure test databases 2020-01-11 22:35:20 +01:00
David-Wobrock 83f7da532f Reformat setup.py with black 2020-01-11 22:35:20 +01:00
David-Wobrock 75d34f50f8 Add documentation change to CHANGELOD.md 2020-01-11 22:35:20 +01:00
David-Wobrock 0d5422363d Update setup.py to use markdown readme file 2020-01-11 22:35:20 +01:00
David-Wobrock f9dc725e00 Split documentation to multiple files in docs/ and use markdown 2020-01-11 22:35:20 +01:00
David Wobrock 813c5c8690 Remove apache license headers in each file. The one full copy of the license at the root of the repo shall define the license for all source files. 2020-01-11 22:08:33 +01:00
David Wobrock b91c0c62db Update README.rst
Correct the verbosity parameter
2019-12-02 13:50:40 +01:00
David Wobrock 948717f6e4 Bump to version 1.4.1 2019-12-01 11:37:14 +01:00
David Wobrock 18fa3bdb7a Update testing dependencies (mysqlclient, do not let Django 2.2 overlap to 3.0 under dev, and update black) 2019-12-01 11:36:56 +01:00
David Wobrock e57abd292f Bump to version 1.4.0 2019-10-21 22:30:21 +02:00
David Wobrock 8ebfe4c605 Update all other test dependencies to last status 2019-10-21 22:28:44 +02:00