Skip to content

Commit

Permalink
Add testing and coverage information
Browse files Browse the repository at this point in the history
  • Loading branch information
hschovanec-usgs committed Jun 29, 2018
1 parent 58670ad commit 68d4748
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 34 deletions.
7 changes: 7 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
exclude_paths:
- doc_source/**
- docs/**
- tests/**
- versioneer.py
- setup.cfg
- _version.py
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ python:
- "3.5"

install:
# Install shakemap and requirements
# Install faultproduct and requirements
- bash install.sh
- . $HOME/miniconda/etc/profile.d/conda.sh
- conda activate smdb
- conda activate faultproduct
before_script:
# This is to take care of Invalid DISPLAY variable
- "export DISPLAY=:99.0"
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
finite-fault-product
=====
Status
=======

[![Build Status](https://travis-ci.org/hschovanec-usgs/finite-fault-product.svg?branch=master)](https://travis-ci.org/hschovanec-usgs/finite-fault-product)

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/81d612b63c864f3fb894f4e5bec90b49)](https://www.codacy.com/app/hschovanec-usgs/finite-fault-product?utm_source=github.com&utm_medium=referral&utm_content=hschovanec-usgs/finite-fault-product&utm_campaign=Badge_Grade)

[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/81d612b63c864f3fb894f4e5bec90b49)](https://www.codacy.com/app/hschovanec-usgs/finite-fault-product?utm_source=github.com&utm_medium=referral&utm_content=hschovanec-usgs/finite-fault-product&utm_campaign=Badge_Coverage)


# finite-fault-product

Load finite fault data and createproducts.

# Introduction
## Introduction

fault is a package designed to read finite fault data from fsp, dat, and syn files.

Expand Down
10 changes: 0 additions & 10 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,11 @@ channels:
- conda-forge
- defaults
dependencies:
- ipython
- jupyter
- libcomcat
- lxml
- matplotlib
- numpy
- obspy
- pandas
- pytest
- pytest-cov
- python=3.5
- pyyaml
- spyder
- xlrd
- xlwt
- openpyxl
- obspy
- xlsxwriter
6 changes: 0 additions & 6 deletions fault/Untitled.ipynb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {
"scrolled": true
},
Expand All @@ -18,7 +18,7 @@
"import cartopy.crs as ccrs\n",
"\n",
"# Local imports\n",
"from finite_faults.fsp import FSPFile"
"from fault.io.fsp import FSPFile"
]
},
{
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from distutils.core import setup
import glob

setup(name='finite-fault-product',
version='0.1dev',
Expand Down
300 changes: 300 additions & 0 deletions tests/data/timeseries/MAJO2.P.syn
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
-10 0
-9.8 0
-9.6 0
-9.4 0
-9.2 0
-9 0
-8.8 0
-8.6 0
-8.4 0
-8.2 0
-8 0
-7.8 0
-7.6 0
-7.4 0
-7.2 0
-7 0
-6.8 0
-6.6 0
-6.4 0
-6.2 0
-6 0
-5.8 0
-5.6 0
-5.4 0
-5.2 0
-5 0
-4.8 0
-4.6 0
-4.4 0
-4.2 0
-4 0
-3.8 0
-3.6 0
-3.4 0
-3.2 0
-3 0
-2.8 0
-2.6 0
-2.4 0
-2.2 0
-2 0
-1.8 0
-1.6 0
-1.4 0
-1.2 0
-1 0
-0.799999999999999 0
-0.6 0
-0.399999999999999 0
-0.199999999999999 0.00233984380135602
0 0.00249578981978572
0.200000000000001 0.000951116749380655
0.4 -0.0013523005108578
0.600000000000001 -0.00226958058793424
0.800000000000001 0.000896684285210887
1 0.0103754758542738
1.2 0.0269653869978787
1.4 0.0495601986644981
1.6 0.0753882990329541
1.8 0.100877480262634
2 0.122784330942892
2.2 0.139122807441612
2.4 0.149540295190452
2.6 0.155052366594401
2.8 0.157335842177242
3 0.157947390566708
3.2 0.15781356092783
3.4 0.157157736741536
3.6 0.155791377397636
3.8 0.153531484130016
4 0.150488009483392
4.2 0.1470915665337
4.4 0.143909604740941
4.6 0.141428214577609
4.8 0.139978079058886
5 0.139864942901614
5.2 0.14160555358807
5.4 0.146069567947813
5.6 0.154354094240709
5.8 0.167367523249068
6 0.185281593183485
6.2 0.207130313456723
6.4 0.230805366132246
6.6 0.25353022837173
6.8 0.272665862234591
7 0.286528726237206
7.2 0.294882053934759
7.4 0.298898416995822
7.6 0.300631245518255
7.8 0.3022426251173
8 0.305323654600913
8.2 0.310565354760854
8.4 0.317850167755747
8.6 0.326631396562984
8.8 0.336357391873758
9 0.346722585838596
9.2 0.35766389576428
9.4 0.36917259619418
9.6 0.381085202728026
9.8 0.392988435291571
10 0.40427528509103
10.2 0.414263162012333
10.4 0.422246895874586
10.6 0.427404053434461
10.8 0.428601445489803
11 0.424255047927224
11.2 0.412423859336678
11.4 0.391216872816388
11.6 0.359420483469298
11.8 0.317099012060173
12 0.265876395770913
12.2 0.208712274117531
12.4 0.149205072579586
12.6 0.0906748863612446
12.8 0.0353940189235109
13 -0.0157312141950445
13.2 -0.0629233357208462
13.4 -0.106899519233235
13.6 -0.148171047012937
13.8 -0.186618297765994
14 -0.22152619673912
14.2 -0.252025617704848
14.4 -0.277681466947351
14.6 -0.298915278351205
14.8 -0.317047307834051
15 -0.333957419653725
15.2 -0.351557019414672
15.4 -0.371347298348065
15.6 -0.394263766898719
15.8 -0.420828478569836
16 -0.45144757978531
16.2 -0.486602739333527
16.4 -0.52675216159923
16.6 -0.57193605442987
16.8 -0.621277273610806
17 -0.672675519192674
17.2 -0.722951246570026
17.4 -0.768496951071943
17.6 -0.806271103592807
17.8 -0.834772689768807
18 -0.854613081122044
18.2 -0.868427601378457
18.4 -0.880106742991616
18.6 -0.893564580730312
18.8 -0.911436438320484
19 -0.934097864132024
19.2 -0.959296157503454
19.4 -0.982486416733822
19.6 -0.997792518427958
19.8 -0.999328906264601
20 -0.98258487289987
20.2 -0.945550025961181
20.4 -0.889328017800875
20.6 -0.818095276444574
20.8 -0.738400021271248
21 -0.657964870957866
21.2 -0.584269192599893
21.4 -0.523279311948222
21.6 -0.478642882565435
21.8 -0.451523927530838
22 -0.44104282648669
22.2 -0.445072749379004
22.4 -0.461039155899325
22.6 -0.486405237443552
22.8 -0.518706170424794
23 -0.555234999834629
23.2 -0.592671925247834
23.4 -0.626986552125789
23.6 -0.653823226847192
23.8 -0.66930088988456
24 -0.670952831065786
24.2 -0.658379330147873
24.4 -0.633287746752818
24.6 -0.598833394657179
24.8 -0.558482166728973
25 -0.514841146871661
25.2 -0.468914411111562
25.4 -0.420073962394343
25.6 -0.366711486821937
25.8 -0.30725369023438
26 -0.241083718221283
26.2 -0.168987982039473
26.4 -0.092991082406455
26.6 -0.0157345687793847
26.8 0.0602466250316961
27 0.132985922595885
27.2 0.201082982453048
27.4 0.263301501727729
27.6 0.318036055355476
27.8 0.362991199728473
28 0.39530439551363
28.2 0.412116699680925
28.4 0.411370083581031
28.6 0.392492322335111
28.8 0.356677801253317
29 0.306654463604617
29.2 0.246054339667759
29.4 0.178665220913528
29.6 0.107864625483651
29.8 0.0364232454890126
30 -0.0333272766087074
30.2 -0.0991386382498196
30.4 -0.158551569482668
30.6 -0.208863731537037
30.8 -0.247417751222257
31 -0.272106902408067
31.2 -0.281894801296296
31.4 -0.277137894581509
31.6 -0.259585990053097
31.8 -0.232067019996565
32 -0.197974656439567
32.2 -0.160732756773239
32.4 -0.123387920300972
32.6 -0.0884085079569385
32.8 -0.0576829031103482
33 -0.0326377002337538
33.2 -0.0143785502807091
33.4 -0.00376704522374694
33.6 -0.00139232258862131
33.8 -0.00744394645800405
34 -0.0215337136020967
34.2 -0.042541052241726
34.4 -0.0685633411848687
34.6 -0.0970373950078479
34.8 -0.125060672875379
35 -0.149882356672731
35.2 -0.169466172436365
35.4 -0.182975419622243
35.6 -0.191015868952603
35.8 -0.195516671724091
36 -0.199228528139863
36.2 -0.204946473155691
36.4 -0.214674414007471
36.6 -0.228995600306405
36.8 -0.24686675042712
37 -0.265922381285593
37.2 -0.283204563083666
37.4 -0.296077854183824
37.6 -0.30302266914902
37.8 -0.304039597537134
38 -0.300538684931013
38.2 -0.29477398797526
38.4 -0.289043131641849
38.6 -0.284944702123817
38.8 -0.282946100908845
39 -0.28237959474145
39.2 -0.281817922948676
39.4 -0.279642749148487
39.6 -0.274572020773897
39.8 -0.26595728311212
40 -0.253784917376116
40.2 -0.238445328794366
40.4 -0.220423310812026
40.6 -0.200073246671076
40.8 -0.177575600038746
41 -0.153068622238017
41.2 -0.126859178145703
41.4 -0.0995842850517069
41.6 -0.0722319240522105
41.8 -0.0460086902010705
42 -0.0221294677359439
42.2 -0.00163908893734138
42.4 0.0146449066355506
42.6 0.0260568783039929
42.8 0.0319496626048683
43 0.031626183986983
43.2 0.0244391491665744
43.4 0.0100781853974413
43.6 -0.0110461804814719
43.8 -0.0374955628400017
44 -0.0667540470053319
44.2 -0.0955381493176781
44.4 -0.120429695723872
44.6 -0.138660476151706
44.8 -0.148794091781074
45 -0.151072497166143
45.2 -0.14730646038115
45.4 -0.140344666148996
45.6 -0.133300039034627
45.8 -0.128784143581398
46 -0.128373811296554
46.2 -0.132436926297542
46.4 -0.140310707615077
46.6 -0.150719293039921
46.8 -0.162266314732055
47 -0.173849830056993
47.2 -0.184907695575657
47.4 -0.195465262276909
47.6 -0.206009504970061
47.8 -0.21723975721299
48 -0.229750941862931
48.2 -0.2437102575348
48.4 -0.258595002211726
48.6 -0.2730684713112
48.8 -0.285059430087367
49 -0.292072280031975
49.2 -0.291690836083277
49.4 -0.282159276961499
49.6 -0.262880144710519
49.8 -0.234667265028612
Loading

0 comments on commit 68d4748

Please sign in to comment.