-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add Makefile with targets for common development commands. - Use/enforce isort. Repair sort order in various code files. - Update .travis.yml to use latest linux dist - Just use requirements.txt for development requirements. setup.py captures installation requirements.
- Loading branch information
Showing
18 changed files
with
139 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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,35 +1,40 @@ | ||
dist: xenial | ||
language: python | ||
os: linux | ||
dist: bionic | ||
cache: pip | ||
|
||
matrix: | ||
python: | ||
- '3.8' | ||
- '3.7' | ||
- '3.6' | ||
- '2.7' | ||
- 'pypy3' | ||
- 'nightly' | ||
|
||
env: | ||
- MAKE_TARGET=test | ||
|
||
jobs: | ||
include: | ||
- python: '2.7' | ||
env: | ||
- COVERAGE=--cov | ||
- FLAKE8=--flake8 | ||
- python: 'pypy2.7-6.0' | ||
- python: '3.4' | ||
- python: '3.5' | ||
- python: '3.6' | ||
- python: '3.7' | ||
env: | ||
- COVERAGE=--cov | ||
- FLAKE8=--flake8 | ||
- python: 'pypy3.5-6.0' | ||
- python: '3.8-dev' | ||
- python: 'nightly' | ||
- python: '3.8' | ||
env: MAKE_TARGET=lint | ||
- python: '3.8' | ||
env: MAKE_TARGET=coverage | ||
allow_failures: | ||
- python: '3.8-dev' | ||
- python: 'nightly' | ||
|
||
install: | ||
- pip install -r requirements-dev.txt | ||
- if [ -n "$COVERAGE" ]; then pip install coveralls; fi | ||
- pip install -e . | ||
- | | ||
if [ "$MAKE_TARGET" = "coverage" ]; then | ||
pip install coveralls | ||
fi | ||
- pip install --upgrade -r requirements.txt -e . | ||
|
||
script: | ||
- py.test $FLAKE8 $COVERAGE | ||
- make "$MAKE_TARGET" | ||
|
||
after_success: | ||
- if [ -n "$COVERAGE" ]; then coveralls; fi | ||
- | | ||
if [ "$MAKE_TARGET" = "coverage" ]; then | ||
coveralls | ||
fi |
This file contains 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,39 @@ | ||
PYTHON ?= python | ||
|
||
.PHONY: lint | ||
lint: lint-isort lint-flake8 | ||
|
||
.PHONY: lint-isort | ||
lint-isort: | ||
isort --check-only --quiet --diff --recursive . | ||
|
||
.PHONY: lint-flake8 | ||
lint-flake8: | ||
flake8 . | ||
|
||
.PHONY: format | ||
format: format-isort | ||
|
||
.PHONY: format-isort | ||
format-isort: | ||
isort --recursive . | ||
|
||
.PHONY: test | ||
test: | ||
pytest | ||
|
||
.PHONY: coverage | ||
coverage: | ||
pytest --cov | ||
|
||
.PHONY: docs | ||
docs: | ||
$(MAKE) -C docs html | ||
|
||
.PHONY: build | ||
build: | ||
$(PYTHON) setup.py build | ||
|
||
.PHONY: dist | ||
dist: | ||
$(PYTHON) setup.py sdist bdist_wheel |
This file contains 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 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 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 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,4 +1,5 @@ | ||
from __future__ import division | ||
|
||
import re | ||
|
||
_unit_map = {'s': 1e0, | ||
|
This file contains 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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,4 +1,10 @@ | ||
pyvcd >= 0.1.1 | ||
PyYAML >= 3.11 | ||
simpy >= 3.0.8 | ||
six >= 1.10.0 | ||
colorama | ||
flake8 | ||
isort | ||
progressbar2 | ||
pytest | ||
pytest-cov | ||
setuptools_scm | ||
Sphinx | ||
sphinx-rtd-theme | ||
tox |
This file contains 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,12 +1,18 @@ | ||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[tool:pytest] | ||
|
||
[wheel] | ||
universal = 1 | ||
[flake8] | ||
ignore = D, E121, E123, E126, E226, E24, E704, W503, W504 | ||
exclude = build/, .*/ | ||
|
||
[isort] | ||
force_grid_wrap = 0 | ||
from_first = True | ||
include_trailing_comma = True | ||
line_length = 79 | ||
multi_line_output = 3 | ||
use_parentheses = True | ||
use_parentheses = True | ||
skip_glob = .* | ||
known_third_party = pyvcd, simpy |
This file contains 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 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 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 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 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 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