Skip to content

Commit

Permalink
clean up collar_voltage related code
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgitonga committed Nov 27, 2023
1 parent 6cde6b3 commit 66147a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
10 changes: 3 additions & 7 deletions notebooks/01. IO/EarthRanger_IO.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -644,9 +644,7 @@
"metadata": {},
"outputs": [],
"source": [
"spatial_feature = er_io.get_spatial_feature(\n",
" spatial_feature_id=\"8868718f-0154-45bf-a74d-a66706ef958f\"\n",
" )\n",
"spatial_feature = er_io.get_spatial_feature(spatial_feature_id=\"8868718f-0154-45bf-a74d-a66706ef958f\")\n",
"spatial_feature"
]
},
Expand All @@ -663,9 +661,7 @@
"metadata": {},
"outputs": [],
"source": [
"spatial_features = er_io.get_spatial_features_group(\n",
" spatial_features_group_id=\"15698426-7e0f-41df-9bc3-495d87e2e097\"\n",
" )\n",
"spatial_features = er_io.get_spatial_features_group(spatial_features_group_id=\"15698426-7e0f-41df-9bc3-495d87e2e097\")\n",
"spatial_features"
]
},
Expand Down
17 changes: 0 additions & 17 deletions tests/test_earthranger_io.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import datetime
import uuid
from tempfile import TemporaryDirectory

import geopandas as gpd
import pandas as pd
import pytest
import pytz
from shapely.geometry import Point

import ecoscope
Expand Down Expand Up @@ -78,21 +76,6 @@ def test_get_events(er_events_io):
assert not events.empty


@pytest.mark.filterwarnings("ignore:All-NaN slice encountered:RuntimeWarning")
@pytest.mark.filterwarnings("ignore:Mean of empty slice:RuntimeWarning")
def test_collar_voltage(er_io):
start_time = pytz.utc.localize(datetime.datetime.now() - datetime.timedelta(days=31))
observations = er_io.get_subjectgroup_observations(
group_name=er_io.GROUP_NAME,
include_subject_details=True,
include_subjectsource_details=True,
include_details="true",
)

with TemporaryDirectory() as output_folder:
ecoscope.plotting.plot.plot_collar_voltage(observations, start_time=start_time, output_folder=output_folder)


def test_das_client_method(er_io):
er_io.pulse()
er_io.get_me()
Expand Down

0 comments on commit 66147a6

Please sign in to comment.