Skip to content

Commit

Permalink
Run doctests in fmudesign as part of GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyod committed Nov 29, 2024
1 parent e946978 commit 3df85c3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ jobs:

- name: "Run tests"
run: pytest tests -n logical --durations 5 --ert-integration

- name: "Run doctests on fmudesign"
run: pytest .\src\semeio\fmudesign\ --doctest-modules -v
10 changes: 5 additions & 5 deletions src/semeio/fmudesign/_designsummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def summarize_design(filename, sheetname="DesignSheet01"):
'senstype', 'casename1', 'startreal1', 'endreal1',
'casename2', 'startreal2', 'endreal2']
Example::
>>> from semeio.fmudesign import summarize_design
>>> designname = 'design_filename.xlsx'
>>> designsheet = 'DesignSheet01'
>>> designtable = summarize_design(designname, designsheet)
Example:
>> from semeio.fmudesign import summarize_design
>> designname = 'design_filename.xlsx'
>> designsheet = 'DesignSheet01'
>> designtable = summarize_design(designname, designsheet)
"""

Expand Down
26 changes: 13 additions & 13 deletions src/semeio/fmudesign/_tornado_onebyone.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ def calc_tornadoinput(
* (int): Average response value for realizations in
reference sensitivity.
Example::
>>> import pandas as pd
>>> from semeio.fmudesign import calc_tornadoplot
>>> designtable = pd.read_csv('designsummary.csv')
>>> results = pd.read_csv('resultfile.csv')
>>> response = 'STOIIP_OIL'
>>> selectors = ['ZONE', 'REGION']
>>> selection = [['Nansen','Larsson'], ['SegmentA']]
>>> reference = 'rms_seed'
>>> scale = 'percentage'
>>> cutbyref = True
>>> sortsens = False
>>> (tornadotable, ref_value) = calc_tornadoinput(
Example:
>> import pandas as pd
>> from semeio.fmudesign import calc_tornadoplot
>> designtable = pd.read_csv('designsummary.csv')
>> results = pd.read_csv('resultfile.csv')
>> response = 'STOIIP_OIL'
>> selectors = ['ZONE', 'REGION']
>> selection = [['Nansen','Larsson'], ['SegmentA']]
>> reference = 'rms_seed'
>> scale = 'percentage'
>> cutbyref = True
>> sortsens = False
>> (tornadotable, ref_value) = calc_tornadoinput(
designtable, results, response, selectors,
selection, reference, scale, cutbyref, sortsens)
Expand Down

0 comments on commit 3df85c3

Please sign in to comment.