Skip to content

Commit

Permalink
implemented mypy, redesigned Block & Package class
Browse files Browse the repository at this point in the history
 - replaced dict with OrderedDict for attribute types in Block & Package
 - removed 'type(key) is str' from Block and Package
 - redesigned Block class to take optional dict or list of ModelElements as default args
 - redesigned Package class to take optional dict or list of ModelElements as default args
 - un-stringified uuid's
 - added script for mypy in travis
 - replaced pep8 with black
  • Loading branch information
capsulecorplab committed Dec 6, 2018
1 parent 64479c6 commit 3acf153
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 290 deletions.
16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@ python:
# - "2.6"
# - "2.7"
# - "3.3"
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
# - "3.4"
# - "3.5"
# - "3.5-dev" # 3.5 development branch
- "3.6"
- "3.6-dev" # 3.6 development branch
# - "3.7-dev" # 3.7 development branch
# command to install dependencies
install:
- pip install --upgrade pip
- pip install black
- pip install coverage
- pip install mypy
- pip install python-coveralls
- pip install pytest
- pip install pytest-black
- pip install pytest-cov
- pip install pytest-pep8
- pip install -r requirements.txt
script:
before_script:
- python setup.py install
- pytest -v --cov-report term-missing --cov=sysml/ --pep8 # or py.test for Python versions 3.5 and below
script:
- pytest -v --cov-report term-missing --cov=sysml/ --black # or py.test for Python versions 3.5 and below
- mypy sysml/ --ignore-missing-imports
after_success:
- coveralls
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

setup(
# ...,
name='sysml',
version='0.1.0',
packages=['sysml'],
name="sysml",
version="0.1.0",
packages=["sysml"],
author="Sean Marquez",
author_email="capsulecorplab@gmail.com",
description="A Python package for the Systems Modeling Language (SysML)",
Expand All @@ -14,8 +14,8 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
setup_requires=['pytest-runner'],
install_requires=['pint', 'pyyaml', 'uuid'],
tests_require=['pytest'],
setup_requires=["pytest-runner"],
install_requires=["pint", "pyyaml", "uuid"],
tests_require=["pytest"],
# ...,
)
3 changes: 2 additions & 1 deletion sysml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from sysml.element import *
from sysml.system import *
__version__ = '0.1.0'

__version__ = "0.1.0"
Loading

0 comments on commit 3acf153

Please sign in to comment.