Skip to content

Commit 2818629

Browse files
committed
initial examples etc
1 parent d4aa110 commit 2818629

File tree

7 files changed

+105
-4
lines changed

7 files changed

+105
-4
lines changed

.github/workflows/TagBot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: TagBot
2+
on:
3+
schedule:
4+
- cron: 0 * * * *
5+
jobs:
6+
TagBot:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: JuliaRegistries/TagBot@v1
10+
with:
11+
token: ${{ secrets.GITHUB_TOKEN }}

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ uuid = "aa3b323a-0e68-4b14-b952-9911d94e084a"
33
authors = ["gaelforget <gforget@mit.edu>"]
44
version = "0.1.0"
55

6+
[deps]
7+
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
8+
69
[compat]
710
julia = "1"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://gaelforget.github.io/OceanDistributions.jl/stable)
44
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://gaelforget.github.io/OceanDistributions.jl/dev)
5-
[![Build Status](https://travis-ci.com/gaelforget/OceanDistributions.jl.svg?branch=master)](https://travis-ci.com/gaelforget/OceanDistributions.jl)
5+
[![Build Status](https://travis-ci.org/gaelforget/OceanDistributions.jl.svg?branch=master)](https://travis-ci.org/gaelforget/OceanDistributions.jl)
66
[![Codecov](https://codecov.io/gh/gaelforget/OceanDistributions.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/gaelforget/OceanDistributions.jl)
77
[![Coveralls](https://coveralls.io/repos/github/gaelforget/OceanDistributions.jl/badge.svg?branch=master)](https://coveralls.io/github/gaelforget/OceanDistributions.jl?branch=master)
88

99
Probabilistic, geographic, and temporal distributions of ocean properties, compounds, species, etc.
1010

11-
Initial focus is expected to be on oceanic water mass distributions.
11+
_This package is in early developement stage when breaking changes can be expected._

examples/Scensus.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
V,S
2+
102573159473068,32
3+
135650267551765,32.2
4+
204022738612965,32.4
5+
329841462900159,32.6
6+
372040875559584,32.8
7+
637006480841138,33
8+
580968302197485,33.2
9+
753835609950212,33.4
10+
1.01898092524757e+15,33.6
11+
3.06853019422823e+15,33.8
12+
1.48610234596848e+16,34
13+
3.65024520634126e+16,34.2
14+
1.01044998988441e+17,34.4
15+
5.81240569966186e+17,34.6
16+
3.77019783761358e+17,34.8
17+
1.46286100773465e+17,35
18+
2.07553062354222e+16,35.2
19+
1.37261906093227e+16,35.4
20+
1.19801208171095e+16,35.6
21+
5.89792963181886e+15,35.8
22+
3.72230842055469e+15,36
23+
2.93405876132488e+15,36.2
24+
2.83104334912876e+15,36.4
25+
2.4249259982532e+15,36.6
26+
1.12986135935386e+15,36.8
27+
652553363790564,37
28+
418116108405281,37.2
29+
109690092127229,37.4
30+
19197565717342.2,37.6
31+
24484189964338.7,37.8
32+
35500491277534.6,38

examples/Tcensus.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
V,T
2+
1.12844683794796e+15,-2
3+
1.80728319547503e+16,-1
4+
7.80315467527652e+16,0
5+
3.46383052524353e+17,1
6+
3.42462947325181e+17,2
7+
1.76741275888157e+17,3
8+
9.58168166649668e+16,4
9+
5.26557054699274e+16,5
10+
3.55559883712727e+16,6
11+
2.94625750514692e+16,7
12+
2.31799097430338e+16,8
13+
1.93034483137828e+16,9
14+
1.7178677178597e+16,10
15+
1.4370906711083e+16,11
16+
1.17755649230206e+16,12
17+
1.15322671158069e+16,13
18+
8.88337572591412e+15,14
19+
6.57687437125613e+15,15
20+
5.50102953180709e+15,16
21+
5.25707476451638e+15,17
22+
4.85112426248035e+15,18
23+
4.21066587678847e+15,19
24+
3.48564010866542e+15,20
25+
3.17051134566343e+15,21
26+
2.93130541225427e+15,22
27+
2.65869232045115e+15,23
28+
2.45542654370048e+15,24
29+
2.34641919993748e+15,25
30+
2.33677853792536e+15,26
31+
2.3911172211018e+15,27
32+
2.35754876235092e+15,28
33+
1.62119993550745e+15,29
34+
307906795568123,30
35+
3225397287770.91,31
36+
0,32
37+
0,33
38+
0,34
39+
0,35

src/OceanDistributions.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
module OceanDistributions
22

3-
greet() = print("Hello World!")
3+
using CSV
4+
export readoceandistribution
5+
6+
"""
7+
readoceandistribution(fil::String)
8+
9+
Read a distribution from csv file
10+
11+
```
12+
Tcensus=readoceandistribution("examples/Tcensus.txt")
13+
```
14+
"""
15+
function readoceandistribution(file::String)
16+
return CSV.File(file)
17+
end
418

519
end # module

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ using OceanDistributions
22
using Test
33

44
@testset "OceanDistributions.jl" begin
5-
# Write your own tests here.
5+
Tcensus=readoceandistribution("../examples/Tcensus.txt")
6+
tmp=sum(Tcensus)[1]
7+
@test isapprox(tmp,1.3349978769392906e18; atol=1e16)
68
end

0 commit comments

Comments
 (0)