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

fixes DeprecationWarnings #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 1 addition & 3 deletions paat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import platform
from importlib import metadata

from pip._vendor import pkg_resources
import toml

from . import estimates, features, io, preprocessing, sleep, wear_time
Expand All @@ -46,8 +45,7 @@ def sysinfo():
"""
Prints system the dependency information
"""
paat = pkg_resources.working_set.by_key["paat"]
dependencies = [requirement.project_name for requirement in paat.requires()]
dependencies = [dep.split(" ")[0] for dep in metadata.requires("paat")]

header = ("PAAT Information\n"
"=================\n\n")
Expand Down
2 changes: 1 addition & 1 deletion paat/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,6 @@ def calculate_actigraph_counts(data, sample_freq, epoch_length):
sec_per_epoch = pd.Timedelta(epoch_length).seconds

counts = get_counts(data[["Y", "X", "Z"]].values, sample_freq, sec_per_epoch)
index = data.resample(epoch_length).mean().index
index = data.resample(epoch_length).mean(numeric_only=True).index
counts = pd.DataFrame(counts, columns=["Y", "X", "Z"], index=index[:len(counts)])
return counts
Loading