src package

Subpackages

Submodules

src.main module

src.one_rep_max module

acsm_1rm, epley or brzycki formulas are used to implement the 1RM estimation.

ACSM 1RM formula

\[\frac{w}{\frac{100 - r \cdot 2.5}{100}}\]

Epley 1RM formula

\[w \cdot \frac{1 + r}{30}\]

Brzycki 1RM formula

\[w \cdot \frac{36}{37 - r}\]
class src.one_rep_max.ACSMStrategy[source]

Bases: OneRepMaxStrategy

ACSM formula for one-repetition-maximum estimation.

estimate(weight, reps)[source]
class src.one_rep_max.BrzyckiStrategy[source]

Bases: OneRepMaxStrategy

Brzycki formula for one-repetition-maximum estimation.

estimate(weight, reps)[source]
class src.one_rep_max.EpleyStrategy[source]

Bases: OneRepMaxStrategy

Epley formula for one-repetition-maximum estimation.

estimate(weight, reps)[source]
class src.one_rep_max.OneRepMaxStrategy[source]

Bases: ABC

Abstract class for one-repetition-maximum estimation strategies.

abstractmethod estimate(weight, reps)[source]

src.one_rep_max_calc module

Definition of popular 1-repetition-maximum formulas.

class src.one_rep_max_calc.BrzyckiInvertedStrategy[source]

Bases: OneRepMaxStrategy

estimate(one_rm, reps, progression)[source]
class src.one_rep_max_calc.EpleyInvertedStrategy[source]

Bases: OneRepMaxStrategy

estimate(one_rm, reps, progression)[source]
class src.one_rep_max_calc.InvertedCalculator(strategy)[source]

Bases: object

calculate(one_rm, reps, progression)[source]
static validate_inputs(one_rm, reps, progression)[source]

Ensure that inputs are either scalars or Pandas Series.

class src.one_rep_max_calc.OneRepMaxCalculator(strategy)[source]

Bases: object

calculate(weight, reps)[source]
static validate_inputs(weight, reps)[source]
src.one_rep_max_calc.main() None[source]

src.one_rep_max_plot module

Plots of popular 1-repetition-maximum formulas.

src.one_rep_max_plot.get_data() tuple[source]

Get data for plotting 1-repetition-maximum formulas.

Returns:

tuple of dataframes

Return type:

tuple

src.one_rep_max_plot.make_plots(df1: DataFrame, df2: DataFrame, df3: DataFrame, df4: DataFrame) None[source]

Make plots of 1-repetition-maximum formulas.

Parameters:
  • df1 (pd.DataFrame) – dataframe with weight, one_rep_max, and variable columns

  • df2 (pd.DataFrame) – dataframe with reps, one_rep_max, and variable columns

  • df3 (pd.DataFrame) – dataframe with weight, inverse_one_rep_max, and variable columns

  • df4 (pd.DataFrame) – dataframe with reps, inverse_one_rep_max, and variable columns

src.plot module

Plot weight-training data.

src.plot.compare_workouts(dfs_1: dict, dfs_2: dict) tuple[dict[Any, Any], dict[Any, Any]][source]

Compare two workouts and return common exercises.

Parameters:
  • dfs_1 (dict) – Dataframes with training data

  • dfs_2 (dict) – Dataframes with training data

Returns:

Dataframes with common exercises

Return type:

tuple[dict[Any, Any], dict[Any, Any]]

src.plot.create_barplots(dfs: dict, date: str) None[source]

Plot training data for specific date.

Parameters:
  • dfs (dict) – Dataframes with training data

  • date (str) – Date of the workout

src.plot.get_data(date: str, split: str) dict[str, DataFrame] | dict[source]

Prepare pandas dataframes with training data for plotting.

Parameters:
  • date (str) – Date of the workout

  • split (str) – Split of the workout

Returns:

Dataframes with training data

Return type:

dict[str, pd.DataFrame] | dict

src.plot.main() None[source]

Get data and create figure.

src.plot.validate_date_format(date: str) str[source]

Validate date format and return year.

Parameters:

date (str) – Date of the workout

src.user_settings module

User Settings. TODO: Implement/integrate this module

Module contents