Skip to content

Commit 0b86a24

Browse files
authored
Merge pull request #165 from ocefpaf/run_doctests
Run doctests
2 parents 124596c + ad1cce7 commit 0b86a24

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ jobs:
3434
run: |
3535
micromamba activate TEST
3636
python -m pytest -rxs tests
37+
38+
- name: Doctests
39+
shell: bash -l {0}
40+
run: |
41+
micromamba activate TEST
42+
python -m pytest -s -rxs --doctest-modules -vv ctd

ctd/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
smooth,
1616
split,
1717
)
18-
from .read import from_bl, from_btl, from_cnv, from_edf, from_fsi, rosette_summary
18+
from .read import (
19+
from_bl,
20+
from_btl,
21+
from_castaway_csv,
22+
from_cnv,
23+
from_edf,
24+
from_fsi,
25+
rosette_summary,
26+
)
1927

2028
try:
2129
from ._version import __version__
@@ -28,6 +36,7 @@
2836
"despike",
2937
"from_bl",
3038
"from_btl",
39+
"from_castaway_csv",
3140
"from_cnv",
3241
"from_edf",
3342
"from_fsi",

ctd/read.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,10 @@ def from_castaway_csv(fname):
522522
--------
523523
>>> import ctd
524524
>>> cast = ctd.from_castaway_csv('tests/data/castaway_data.csv')
525-
>>> downcast, upcast = cast.split() # Upcast often prefiltered
526-
>>> fig, ax = plt.subplots()
527-
>>> ax = downcast['temperature'].plot_cast()
528-
>>> fig.show()
525+
>>> cast.columns
526+
Index(['depth', 'temperature', 'conductivity', 'specific_conductance',
527+
'salinity', 'sound_velocity', 'density'],
528+
dtype='object')
529529
530530
"""
531531
with open(fname) as file:

tests/data/castaway_data.csv

100755100644
File mode changed.

0 commit comments

Comments
 (0)