Skip to content

Commit 3a168bf

Browse files
authored
Merge pull request #26 from michaeltryby/dev
Configuring coveralls
2 parents e3c3f79 + d4af851 commit 3a168bf

File tree

6 files changed

+26
-51
lines changed

6 files changed

+26
-51
lines changed

.coveralls.yml.enc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
�Y�!ى���~���/)�]��g��J���f~����o�\,&$n��q�:J*�o����[�

README.md

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,16 @@
11
# swmm-python
22

3-
## Build Notes
43

5-
Hints for building SWIG wrapper for SWMM Toolkit on Windows. This package
6-
is currently under active development. The build process is likely to change.
4+
## Build Status
5+
[![Build status](https://ci.appveyor.com/api/projects/status/g13vapirwhinmtob/branch/dev?svg=true)](https://ci.appveyor.com/project/michaeltryby/swmm-python/branch/dev)
76

7+
[![Coverage Status](https://coveralls.io/repos/github/michaeltryby/swmm-python/badge.svg)](https://coveralls.io/github/michaeltryby/swmm-python)
88

9-
### Dependencies
10-
- Python 3.6.5 64 bit
11-
- Visual Studio 14 2015
12-
- CMake
13-
- SWIG
149

10+
## Contents
11+
* swmm-python - SWIG based wrappers for the SWMM Toolkit and Output libraries.
12+
* ...
1513

16-
### Build Process
17-
The idea here is to build the SWMM library seperately and link it with the SWIG
18-
wrapper. This approach uses implicit linking, therefore, an import library
19-
must be created. CMake does this automatically using the Generate Export Header
20-
function. Once built the SWMM library and headers are manually copied to the
21-
swmm-toolkit directory. To run, the resulting swmm-toolkit.pyd needs the
22-
swmm5.dll.
2314

24-
25-
Step 1 - Build SWMM Library
26-
27-
Checkout the feature-reentrancy branch of the OWA SWMM project. Build the SWMM
28-
Library using CMake generator "Visual Studio 14 2015 Win64". Be sure "generate
29-
export header" section of the SWMM Project CMakeLists.txt is not commented out.
30-
31-
32-
Step 2 - Copy SWMM Library
33-
34-
In the swmm\toolkit directory copy swmm5.h, swmm5_export.h, toolkitAPI.h,
35-
swmm5.dll, swmm5.lib, and swmm5.exp all together in the same folder. The
36-
setup.py file is configured to find them there.
37-
38-
39-
Step 3 - Build SWMM Toolkit
40-
41-
Execute the command `python setup.py build`
42-
43-
44-
Step 4 - Running SWMM Toolkit
45-
46-
Install the pyd and the dll in the same directory and add the directory to
47-
the python path.
48-
49-
50-
#### Common Problems
51-
When I used the Developer Command Prompt for Visual Studio 2015 the build
52-
fails with linking errors. Use a regular Command Prompt to build.
15+
## Build Notes
16+
Note that swmm-python wraps the feature-wrapper branch of SWMM v5.1.12.

appveyor.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11

22

33
environment:
4-
matrix:
5-
- PYTHON: "C:\\Python36-x64"
4+
passphrase:
5+
secure: En1qcj1/l2B3Nov+vOHlfRrFZk00bg1HPRouD64Gzfw=
6+
matrix:
7+
- PYTHON: "C:\\Python36-x64"
68

79
install:
810
- choco install swig
11+
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
12+
- appveyor-tools\secure-file -decrypt .coveralls.yml.enc -secret %passphrase%
913
- "%PYTHON%\\python.exe -m pip install wheel tox"
1014

1115

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[aliases]
2+
test=pytest

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def run(self):
6767
cmdclass={
6868
'install': InstallCmd,
6969
'develop': DevelopCmd
70-
71-
}
70+
},
71+
setup_requires=["pytest-runner"],
72+
tests_require=["pytest"]
7273
)

tox.ini

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
envlist = py36
55

66
[testenv]
7-
whitelist_externals =
8-
swig
7+
passenv = APPVEYOR APPVEYOR_*
8+
whitelist_externals = swig
99
skipsdist = True
1010
usedevelop = True
1111
deps =
1212
pytest
1313
numpy
1414
aenum
15+
PyYAML
16+
coveralls
1517
commands =
16-
python -m pytest --color=yes swmm_python -s
18+
coverage run --source=swmm_python setup.py test
19+
coveralls

0 commit comments

Comments
 (0)