David Wobrock
42d43fd6aa
Update README and add CHANGELOG file
2019-05-12 15:32:57 +02:00
David Wobrock
e45e031820
Bump to 1.0.0 and update setup.py to drop command line usage
2019-05-12 15:32:57 +02:00
David Wobrock
5390fd507f
Update Tests:
...
* don't use the project fixtures anymore but the one Django project
* update and refactor cache tests to be less brittle
* explicitly test mysql, postgresql and sqlite3 databases
* remove 'multiple_call' tests since it is not possible anymore
(with the Django singleton)
* update Travis and tox (dropping Python 3.4)
2019-05-12 15:32:57 +02:00
David Wobrock
f35c9177f4
Delete examples folder since it is not relevant anymore
2019-05-12 15:32:57 +02:00
David Wobrock
484a775fda
Linter Core: change lots of behaviour
...
* Use the Django migration classes to manipulate these objects
this includes the discovery of migrations through the MigrationLoader
(instead of manually walking through the Django project and find the migrations through a regex)
and representing a Migration through the Django class.
* Get the SQL of a migration through a 'call_command' call of 'sqlmigrate'
That speeds up greatly the linter since we don't have to setup Django for each migration
* Add the database to the cache path
2019-05-12 15:32:57 +02:00
David Wobrock
0eb584889a
Add Django management command to launch the linter
2019-05-12 15:32:57 +02:00
David Wobrock
f05a986973
Update .gitignore: remove fixture and add some stuff
2019-05-12 15:32:57 +02:00
David Wobrock
26ed4ecf62
Tests: add test project
...
* manage.py file at the root of the project
* targetting the project located at tests/test_project/settings.py
That allows testing the linter through just calling it on the project itself.
Using the new method coming soon: `python manage.py lintmigrations`
2019-05-12 15:32:57 +02:00
David Wobrock
fdd6b9b06a
Tests: Delete all fixture Django projects
...
We won't need all these different django projects to test the linter.
That adds up to much complexity to the tests.
2019-05-12 15:32:57 +02:00
David Wobrock
64c54b72d4
Bump to version 0.1.5
2019-04-21 12:53:13 +02:00
David-Wobrock
1245e7939d
Bump to version 0.1.4
2019-02-24 18:19:49 +01:00
David-Wobrock
36e7dfaa0e
Do not create cache folder if no-cache option
2019-02-24 18:18:45 +01:00
David-Wobrock
c3c1af113c
Handle postgresql alter column type
...
ALTER TABLE table ALTER COLUMN column TYPE
2019-02-24 15:55:05 +01:00
David-Wobrock
999ee2fa5e
unrelated: fix some warnings and redundant elements
2019-02-24 15:55:05 +01:00
David-Wobrock
5c7dab8db2
Update linter tests for multiple backends
...
Create a base test class and have 3 different backends for now:
* mysql
* sqlite3
* postgresql
2019-02-24 15:55:05 +01:00
David-Wobrock
ba83526339
Fix caching tests issues on Windows
2019-02-24 15:55:05 +01:00
David-Wobrock
f5a587c2be
Fix split path function
...
So it also works on windows
and does not return empty stuff
and update tests
2019-02-24 15:55:05 +01:00
David-Wobrock
c403754564
Add blog post to readme
...
The article written by Felix about the linter and handling backward
incompatible migrations in Django
2019-02-24 15:55:05 +01:00
David-Wobrock
f8d9ab777a
Do not manually retrieve python interpreter path
...
Instead of doing custom and wrong path detection, just
use sys.executable which does exactly that
2019-02-24 11:04:21 +01:00
David-Wobrock
3591a4422a
Bump to version 0.1.3
2019-02-03 19:39:31 +01:00
David Wobrock
d22401f101
Add tests for version option
...
From Python 3.4 on, version is printed on stdout instead
of stderr.
2019-02-03 19:38:38 +01:00
David Wobrock
fea623630e
Add --version option
2019-02-03 19:38:38 +01:00
David Wobrock
4d68f7bac8
Bump version to 0.1.2
2019-01-21 22:08:57 +01:00
David Wobrock
4c5d12800e
Add in the readme what is looked for by the linter
2019-01-21 22:03:17 +01:00
David Wobrock
1a9024e799
add test for git on non root location
2019-01-20 12:17:11 +01:00
David Wobrock
009153fbf4
handle linting a project in pwd
...
When calling "django-migration-linter ."
be able to handle it (especially with cache)
2019-01-20 12:17:11 +01:00
David Wobrock
75c969c6a9
Revert "don't assume git root is django_path"
...
This reverts commit c14f9aef37 .
2019-01-20 11:46:30 +01:00
David-Wobrock
f52bb3d9b8
Bump version to 0.1.1
2019-01-07 19:37:51 +01:00
David-Wobrock
7a34ac9010
Fix tests and git migration gathering
2019-01-05 17:39:09 +01:00
David-Wobrock
c6df7e53a0
Add Migration class to hold the path, app name and migration name in one object + adapt existing logic
2019-01-05 16:59:36 +01:00
David-Wobrock
f0021dc139
Add test migration in folder
2019-01-04 22:00:19 +01:00
David-Wobrock
574af4b7fe
Do not check if .git folder exists
...
git commands will fail anyway if not present
2019-01-04 21:42:39 +01:00
David-Wobrock
99534e4eb9
Bump version to 0.1.0 and set to dev status Beta
2019-01-03 22:13:37 +01:00
David-Wobrock
952e596d92
Bump copyright version to 2019 in files
2019-01-03 22:05:00 +01:00
David-Wobrock
1e2068eed5
Add black to lint tests and increase line length for flake8
2018-12-30 11:56:21 +01:00
David-Wobrock
f05b199925
Black all files
2018-12-30 11:56:21 +01:00
David-Wobrock
03bd7753e5
Change ubuntu dist to xenial
2018-12-30 11:56:03 +01:00
David-Wobrock
d041f7dbf7
Add django 2.1 to tested envs
2018-12-30 11:56:03 +01:00
David-Wobrock
ef23a622ca
Add python 3.7 to tests
2018-12-30 11:56:03 +01:00
David Wobrock
6eaae00d86
Merge pull request #26 from 3YOURMIND/cache
...
#23 - Cache
2018-12-24 15:56:28 +01:00
David-Wobrock
95274b9a67
Update Readme for new linter ignore migration operation
...
Use master for PRs. No need for a dev branch
2018-12-23 17:46:57 +01:00
David-Wobrock
fe6433a065
Use a custom migration operation instead of a RunSQL statement
2018-12-23 17:46:57 +01:00
David-Wobrock
395379178b
Fix linting through using a raw python string
2018-12-23 12:25:41 +01:00
David-Wobrock
178d8036c2
Bump to version 0.0.7
2018-09-06 21:48:52 +02:00
David-Wobrock
c26bd2b628
Provide a default value to next() function in case of empty errors array
2018-09-06 21:47:28 +02:00
David-Wobrock
6174c76c36
Bump to version 0.0.6
2018-07-19 22:14:25 +02:00
David-Wobrock
d672f06635
Drop django 1.10 support (and fix some PEP8)
2018-07-19 22:14:13 +02:00
David-Wobrock
555d17adcd
Rename log object to logger (to follow the standard)
2018-07-19 22:03:37 +02:00
David-Wobrock
7364455073
Add test to assert that a not null FK on a new table is accepted
2018-05-07 20:36:20 +02:00
David-Wobrock
f692a39030
Add sentence about example integration in readme
2018-01-20 16:24:31 +01:00
David-Wobrock
7a69d36393
Bump version to 0.0.5
2018-01-20 16:20:09 +01:00
David-Wobrock
416a102186
Merge branch 'dev'
2018-01-20 16:19:32 +01:00
David-Wobrock
6add9fefbf
Merge branch 'add-example-to-readme' into dev
2018-01-20 16:15:27 +01:00
David-Wobrock
eebbcc4cc0
Fix PEP8 requirement
2018-01-20 16:10:41 +01:00
David-Wobrock
07de522fce
Remove git samples
2018-01-20 16:02:58 +01:00
David-Wobrock
3037585cc2
Fix #9 - add information message when altering columns - may be backward compatible
2018-01-20 15:59:38 +01:00
David Wobrock
cbbcdc2e2c
Merge pull request #14 from 3YOURMIND/only-consider-added-migrations
...
Only consider added migrations
2018-01-20 15:57:42 +01:00
David-Wobrock
698e658faa
Fix test : do not consider deleted migrations
...
* Change way to detect deleted migrations (diff-filter of 'git diff' command)
2018-01-20 15:50:45 +01:00
David-Wobrock
fffdf5714e
Fix that linter actually ignores deleted files and add a specific test for this
2018-01-18 23:56:33 +01:00
David Wobrock
ced0b8c3ef
Merge pull request #13 from 3YOURMIND/create-readme-rst
...
Fix #11 - Change readme to reStructuredText
2018-01-17 18:02:16 +01:00
David Wobrock
3e27f117ba
Migrate the complete readme to reStructuredText
2018-01-17 17:41:24 +01:00
David-Wobrock
e4880c5600
Consider altering a column as backward incompatible
...
* Resolves #9
* With test
* For mysql only currently
2018-01-14 15:52:46 +01:00
David-Wobrock
7007e788be
Add django as a requirement to the linter
...
Obviously it is needed when generating the sql through the sqlmigrate command
2018-01-14 13:51:01 +01:00
David-Wobrock
3ad331f644
Bump version
2018-01-13 00:48:42 +01:00
David-Wobrock
5f078506a4
Merge branch 'dev'
2018-01-13 00:48:07 +01:00
David-Wobrock
b24315c1d9
Add contributing section to README
2018-01-13 00:47:29 +01:00
David Wobrock
69f5846890
Merge pull request #10 from 3YOURMIND/small-improvements
...
Improve Error Reporting
2018-01-13 00:47:13 +01:00
David-Wobrock
306551234a
Fix import errors for python3 & print error message on stderr (through exception message)
2018-01-13 00:40:03 +01:00
David-Wobrock
61cd48dc8c
Merge branch 'dev' into small-improvements
2018-01-13 00:11:53 +01:00
David Wobrock
388f4e565c
Merge pull request #8 from 3YOURMIND/better-description-for-pypi
...
Use pypandoc to convert markdown to pypi friendly format
2018-01-13 00:09:45 +01:00
David-Wobrock
8da1466f8d
Merge branch 'dev' into better-description-for-pypi
2018-01-12 23:55:52 +01:00
David-Wobrock
317156bf2b
Remove django 1.9 support and fix PEP8
2018-01-12 23:23:11 +01:00
David-Wobrock
dcbcb0883c
Use python exe in current venv
2018-01-12 23:01:11 +01:00
David-Wobrock
8adffed958
Call venv linter in tests
2018-01-07 17:34:08 +01:00
David-Wobrock
d1d296b826
Add manifest for tox tests on travis
2018-01-07 12:44:59 +01:00
David-Wobrock
55e1e13ad5
Update copyright year to 2018
2018-01-07 12:15:23 +01:00
David-Wobrock
ad3b17229c
Add tox to test different python and django versions
2018-01-07 12:09:07 +01:00
David Wobrock
71b29d9694
Bump version to 0.0.3
2017-12-01 14:55:36 +01:00
David Wobrock
dce73390fb
Bump version to 0.0.2 and add missing LICENSE header in some files
2017-12-01 14:38:31 +01:00
David Wobrock
15b2fbb9e1
Add tests from command line directly
...
* Test options
* Syntax error fix
* Ajust the commit id for a test (was wrongly set)
2017-11-30 17:44:12 +01:00
David-Wobrock
fc8f405801
Fix tests, flake8 and update README
2017-11-30 00:09:18 +01:00
David Wobrock
50ce4f4cad
Large code refactoring
...
* Add tests
* Remove git dependency (only needed when a git identifier is specified)
2017-11-29 23:57:23 +01:00
David Wobrock
b8ca768a15
Remove pycodestyle because flake8 already includes it
2017-11-24 15:53:36 +01:00
David-Wobrock
844fbc3c1a
Add pycodestyle and flake8 tests to Travis
...
Refactor style issues for pycodestyle tests to pass
2017-11-22 17:10:01 +01:00
David-Wobrock
174bb19319
Adapt code to python3.4 and add it to travis
...
Added to travis explicitly python 2.7, 3.4, 3.5, 3.6
2017-11-22 17:03:48 +01:00
David Wobrock
c07aeea780
Remove from test git folders all hook .sample files
2017-11-21 15:50:47 +01:00
David-Wobrock
8f01e1e99d
Add basic travis.yml and refactor some tests
2017-11-20 23:11:33 +01:00
David Wobrock
f66867611a
Merge pull request #5 from David-Wobrock/test-structure-refactoring
...
Test and structure refactoring
Approved by @jkhlr
2017-11-20 22:09:02 +01:00
David Wobrock
767ce8c994
Fix typo and clean up todo comments in setup.py
2017-11-16 16:38:04 +01:00
David-Wobrock
6f84056aeb
Change git fixtures, do not use submodule or subtree
...
Just rename git folder when testing and delete them at the end
2017-11-01 15:28:17 +01:00
David-Wobrock
c5fc3ae896
Add entry point for console script in setup.py
2017-10-31 17:24:14 +01:00
David-Wobrock
1cd36825c1
Start large refactoring of tests and project structure
...
* Put tests in tests/ diretory
* Write functional tests
* Create setup.py
* Put sources into django_migration_linter folder (for future PyPi publishing)
2017-10-30 23:31:13 +01:00