Skip to content

Commit

Permalink
addresses flake8 errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
biblicabeebli committed Nov 30, 2023
1 parent de77f9b commit 985a4d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions forest/jasmine/traj2stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1611,8 +1611,8 @@ def gps_stats_main(
else:
frequencies = [frequency]

# Ensure that the correct output folder structures exist, centralize folder names.
# Note that frequencies
# Ensure that the correct output folder structures exist, centralize folder
# names. Note that frequencies
trajectory_folder = f"{output_folder}/trajectory"
logs_folder = f"{output_folder}/logs"
os.makedirs(output_folder, exist_ok=True)
Expand All @@ -1636,7 +1636,7 @@ def gps_stats_main(
if participant_ids is None:
participant_ids = get_ids(study_folder)

# Create a record of processed user participant_id and starting/ending time.
# Create a record of processed participant_id and starting/ending time.
# These are updated and saved to disk after each participant is processed.
all_memory_dict_file = f"{output_folder}/all_memory_dict.pkl"
all_bv_set_file = f"{output_folder}/all_bv_set.pkl"
Expand Down Expand Up @@ -1737,7 +1737,8 @@ def gps_stats_main(
index=False
)

# generate summary stats. (variable "frequency" is already declared in signature)
# generate summary stats.
# (variable "frequency" is already declared in signature)
for freq in frequencies:
gps_stats_generate_summary(
traj=traj,
Expand Down Expand Up @@ -1766,8 +1767,7 @@ def gps_stats_generate_summary(
logs_folder: str,
parameters: Hyperparameters,
places_of_interest: Optional[list] = None,
osm_tags: Optional[List[OSMTags]] = None,
):
osm_tags: Optional[List[OSMTags]] = None):
"""This is simply the inner functionality of gps_stats_main.
Runs summaries code, writes to disk, saves logs if required. """
summary_stats, logs = gps_summaries(
Expand Down
4 changes: 2 additions & 2 deletions forest/sycamore/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def get_submits_for_tableau(
end_date:
The latest survey data to read in, in YYYY-MM-DD format
users:
List of users in study for which we are generating a survey schedule
List of users in study that we are generating a survey schedule for
interventions_filepath:
filepath where interventions json file is.
submits_timeframe:
Expand Down Expand Up @@ -305,4 +305,4 @@ def get_submits_for_tableau(
ss_summary = summarize_submits(ss_detail, freq, False)
write_data_by_user(
ss_summary, f"{output_folder}/{freq.name.lower()}", users
)
)
6 changes: 3 additions & 3 deletions forest/willow/log_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,9 @@ def log_stats_inner(

# num_uniq_individuals_call_or_text is the cardinality of the union of
# several sets. It should should always be at least as large as the
# cardinality of any one of the sets, and it should never be larger than the
# sum of the cardinalities of all of the sets. (it may be equal if all the
# sets are disjoint)
# cardinality of any one of the sets, and it should never be larger than
# the sum of the cardinalities of all of the sets. (it may be equal if all
# the sets are disjoint)
num_uniq_column = "num_uniq_individuals_call_or_text" # legibility hax.
sum_all_set_cols = pd.Series([0]*stats_pdframe.shape[0])
for column in [
Expand Down

0 comments on commit 985a4d1

Please sign in to comment.