Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 1fc8e34

Browse files
committed
fix midparental height
1 parent 05da42f commit 1fc8e34

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

rcpchgrowth_python_cli/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def age_calculation (birth_date, observation_date, gestation_weeks, gestation_da
5151
birth_date=birth_date,
5252
observation_date=observation_date)
5353
click.echo(f"Unadjusted: {decimal_age} y,\n{calendar_age}")
54-
5554

5655
@click.command()
5756
@click.argument('decimal_age', type=click.FLOAT)
@@ -154,7 +153,7 @@ def measurement_for_sds(reference, decimal_age, sex, measurement_method, sds):
154153
@click.argument("maternal_height", type=click.FLOAT)
155154
@click.argument("paternal_height", type=click.FLOAT)
156155
@click.argument('sex', default="male", type=click.Choice(['male', 'female'], case_sensitive=True))
157-
def midparental_height(maternal_height: float, paternal_height: float, sex: str)->str:
156+
def midparental_height(maternal_height: float, paternal_height: float, sex: str):
158157
"""
159158
Returns a midparental height
160159
Parameters include paternal_height in cm, maternal_height in cm and sex as one of 'male' or 'female' (default 'male').
@@ -170,12 +169,15 @@ def midparental_height(maternal_height: float, paternal_height: float, sex: str)
170169
return f"Error: {e}"
171170
click.echo(f"Midparental height: {round(result, 2)} cm")
172171

172+
173173
fig = pyfiglet.Figlet(font="standard")
174174
click.echo(fig.renderText("RCPCHGrowth"))
175175
methods.add_command(age_calculation)
176176
methods.add_command(sds_for_measurement)
177177
methods.add_command(measurement_for_centile)
178178
methods.add_command(measurement_for_sds)
179+
methods.add_command(midparental_height)
180+
179181

180182
if __name__ == '__main__':
181183
methods()

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
attrs==20.3.0
22
click==8.0.1
33
iniconfig==1.1.1
4-
marshmallow==3.11.1
54
numpy==1.20.2
65
packaging==20.9
76
pluggy==0.13.1

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name ='rcpchgrowth-python-cli',
12-
version='1.1.1',
12+
version='1.1.2',
1313
author ='Simon Chapman',
1414
author_email ='eatyourpeasapps@gmail.com',
1515
url ='https://github.com/rcpch/rcpchgrowth-python-cli',
@@ -19,7 +19,7 @@
1919
packages=find_packages(),
2020
entry_points ={
2121
'console_scripts': [
22-
'rcpchgrowth = rcpchgrowth_python_cli.__main__:methods'
22+
'rcpchgrowth=rcpchgrowth_python_cli.__main__:methods'
2323
]
2424
},
2525
classifiers =(

0 commit comments

Comments
 (0)