Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev test ci #142

Merged
merged 10 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions .github/workflow/pytest.yml → .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# .github/workflows/pytest.yml
name: PyTest
on: [push, pull_request, workflow_dispatch]

name: PyTest
on:
push:
branches:
- main
- dev
- dev-test-CI
pull_request:
branches:
- main
- dev
- dev-test-CI
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -11,16 +23,12 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
python-version: "3.*"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
pip install -r requirements-dev.txt
pip install -e .
- name: Run Coverage Pytest
run: pytest --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run Pytest
run: pytest
68 changes: 34 additions & 34 deletions echoshader/tests/test.py → echoshader/tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def get_data():
return MVBS_ds


def test_echogram():
def test_echogram(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the echogram panel
echogram_panel = panel.Row(
Expand All @@ -42,9 +42,9 @@ def test_echogram():
assert isinstance(echogram_panel, panel.Row)


def test_tricolor_echogram():
def test_tricolor_echogram(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the tricolor echogram panel
tricolor_echogram_panel = panel.Row(
Expand All @@ -63,9 +63,9 @@ def test_tricolor_echogram():
assert isinstance(tricolor_echogram_panel, panel.Row)


def test_track():
def test_track(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

track_panel = panel.Row(
panel.Column(MVBS_ds.eshader.tile_select),
Expand All @@ -76,9 +76,9 @@ def test_track():
assert isinstance(track_panel, panel.Row)


def test_track_echogram_integration():
def test_track_echogram_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down Expand Up @@ -106,9 +106,9 @@ def test_track_echogram_integration():
assert isinstance(integration_panel, panel.Column)


def test_track_tricolor_echogram_integration():
def test_track_tricolor_echogram_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down Expand Up @@ -143,9 +143,9 @@ def test_track_tricolor_echogram_integration():
assert isinstance(integration_panel, panel.Column)


def test_track_integration():
def test_track_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down Expand Up @@ -187,9 +187,9 @@ def test_track_integration():
assert isinstance(integration_panel, panel.Column)


def test_curtain():
def test_curtain(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

curtain_panel = panel.Row(
panel.Column(MVBS_ds.eshader.channel_select, MVBS_ds.eshader.curtain_ratio),
Expand All @@ -203,9 +203,9 @@ def test_curtain():
assert isinstance(curtain_panel, panel.Row)


def test_curtain_echogram_integration():
def test_curtain_echogram_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = True
Expand Down Expand Up @@ -235,9 +235,9 @@ def test_curtain_echogram_integration():
assert isinstance(integration_panel, panel.Column)


def test_curtain_tricolor_echogram_integration():
def test_curtain_tricolor_echogram_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = True
Expand Down Expand Up @@ -274,9 +274,9 @@ def test_curtain_tricolor_echogram_integration():
assert isinstance(integration_panel, panel.Column)


def test_curtain_track_integration():
def test_curtain_track_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down Expand Up @@ -306,9 +306,9 @@ def test_curtain_track_integration():
assert isinstance(integration_panel, panel.Column)


def test_curtain_integration():
def test_curtain_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down Expand Up @@ -362,9 +362,9 @@ def test_curtain_integration():
assert isinstance(integration_panel, panel.Column)


def test_hist():
def test_hist(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

stats_panel = panel.Row(
panel.Column(
Expand All @@ -381,9 +381,9 @@ def test_hist():
assert isinstance(stats_panel, panel.Row)


def test_echogram_integration():
def test_echogram_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = True
Expand Down Expand Up @@ -416,9 +416,9 @@ def test_echogram_integration():
assert isinstance(integration_panel, panel.Column)


def test_hist_tricolor_echogram_integration():
def test_hist_tricolor_echogram_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = True
Expand Down Expand Up @@ -455,9 +455,9 @@ def test_hist_tricolor_echogram_integration():
assert isinstance(integration_panel, panel.Column)


def test_hist_track_integration():
def test_hist_track_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down Expand Up @@ -487,9 +487,9 @@ def test_hist_track_integration():
assert isinstance(integration_panel, panel.Column)


def test_hist_integration():
def test_hist_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down Expand Up @@ -546,9 +546,9 @@ def test_hist_integration():
assert isinstance(integration_panel, panel.Column)


def test_integration():
def test_integration(get_data):
# Load sample data for testing
MVBS_ds = get_data()
MVBS_ds = get_data

# Create the panels
MVBS_ds.eshader.control_mode_select.value = False
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ hvplot
geoviews
pyvista
ipykernel
pandas == 1.5.3