-
Notifications
You must be signed in to change notification settings - Fork 19
Build on travis #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1edbe61
add missing test for 100% branch coverage
mattbennett aba807d
update tox, Makefile, README and add travis file
mattbennett b48ad96
don't need htmlcov dir
mattbennett 700d6f3
add mysql-connector as a dependency link because the package on pypi
mattbennett 0437097
use https
mattbennett c1a37ef
latest version of mysql-connector is 2.1.4
mattbennett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| sudo: false | ||
| language: python | ||
| python: | ||
| - '2.7' | ||
| install: | ||
| - pip install tox | ||
| env: | ||
| - TOX_ENV=py27-test | ||
| - TOX_ENV=py33-test | ||
| - TOX_ENV=py34-test | ||
| script: | ||
| - tox -e $TOX_ENV | ||
| deploy: | ||
| provider: pypi | ||
| user: mattbennett | ||
| password: | ||
| secure: nS/snIn4e/AWu3yrpzDLPXB+wHXXVU0qLdf07ldUxBx3lJ5K4ggqM1o6huP+ny2lZM6Q+jlRaYj0L6Tb/pppC7Pimx+dni9EFHXvLVO5sLD80+qV/AQPf7tbdWY6FWBV8kMGpXPwdnbKRGnQ17nerBJUfvL0dxigGoAqpOgwxppw/qNk0J3ay2AUnKUnWUKUXgATBLH72MSW6/iT84asIV6jOlfmRLpFKiO42emyBmYTo/TwM6lkjLG465gI2oWc/2sVTR6rkq00Yz5AC3Ry/pUZYfg55M3hTgHSQ54qtd/7IlbsP9inYTiZGsYkDaHlKsM1DdXreApVIo7LzRfCblMGrGvQfZm3BVMmmOWGSzM9dqBOXxjVcG9xHoG4/jzxGJ40gXX4cRS0AgkAWak2Q34QKj30FIBeLrZNzpDUmyPrKFBkfLi8CR8pW06m0Kxs3XWoUvP7ajVocbGnQHXQpz4q7FoKmnXhg0u9XyJTdtZAMt/h7aN9Bb2N0Zfasex025dB93Z2qLmwMVYkwQhIxjfw4vCstq9t+q67JKDMP4O6T7ektJ1Qt2TNR2BEr0/V/r5uplH5qyNH8PKL5YV9afyI+f1Dbdk+8wsRBGFJOm+rHg/JLtkzpTjNeAy4VYsYb8R+1rRe9IyBR7ti0mpW22lemhAHUUdaaol7mZm5yTI= | ||
| on: | ||
| tags: true | ||
| repo: Overseas-Student-Living/sqlalchemy-diff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,13 @@ | ||
| .PHONY: test | ||
|
|
||
| HTMLCOV_DIR ?= htmlcov | ||
| test: flake8 pylint pytest | ||
|
|
||
| test: flake8 test_lib | ||
| pylint: | ||
| pylint sqlalchemydiff -E | ||
|
|
||
| flake8: | ||
| flake8 sqlalchemydiff test | ||
|
|
||
| test_lib: | ||
| coverage run --source=sqlalchemydiff -m pytest test $(ARGS) | ||
|
|
||
| coverage-html: test | ||
| coverage html -d $(HTMLCOV_DIR) | ||
|
|
||
| coverage-report: test | ||
| coverage report -m | ||
|
|
||
| coverage: coverage-html coverage-report test | ||
| pytest: | ||
| coverage run --source=sqlalchemydiff --branch -m pytest test $(ARGS) | ||
| coverage report --show-missing --fail-under=100 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,26 +7,37 @@ SQLAlchemy Diff | |
| inspection API. | ||
|
|
||
|
|
||
| Documentation | ||
| ------------- | ||
|
|
||
| See `<http://sqlalchemy-diff.readthedocs.org>`_. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Super nice! 🌮 |
||
|
|
||
|
|
||
| Running tests | ||
| ------------- | ||
|
|
||
| Makefile targets that can be used to run the tests. | ||
| Tests are written with pytest. Makefile targets to invoke tests are also provided for convenience. | ||
|
|
||
| Test databases will be created, used during the tests and destroyed afterwards. | ||
|
|
||
| Example of usage: | ||
| Example: | ||
|
|
||
| .. code-block:: shell | ||
| $ # using default settings | ||
| $ pytest test | ||
| $ make test | ||
| $ make coverage | ||
| $ # or overridding the database URI | ||
| $ pytest test --test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff | ||
| # or | ||
| $ py.test test | ||
| $ # overridding the database URI | ||
| $ py.test test --test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff | ||
| # or | ||
| $ make test ARGS="--test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff" | ||
| $ make coverage ARGS="--lf -x -vv --test-db-url=mysql+mysqlconnector://root:password@localhost:3306/sqlalchemydiff" | ||
| # providing other pytest args via Make | ||
| $ make test ARGS="--lf -x -vv" | ||
| License | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| [tox] | ||
| envlist = py27,py33,py34 | ||
| envlist = {py27,py33,py34}-test | ||
| skipdist=True | ||
| skip_missing_interpreters=True | ||
|
|
||
| [testenv] | ||
| whitelist_externals = make | ||
|
|
||
| commands = | ||
| pip install -e ".[dev]" --process-dependency-links | ||
| py.test | ||
| pip install --editable .[dev] --process-dependency-links | ||
| make test |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious why you use both flake8 and pylint? the other projects just seem to use flake8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They pick up different errors. Flake8 is pyflakes + pep8 checking, whereas pylint has its own set of rules. There is some overlap but it's nicer to use both.